It is possible to access or to ge开发者_运维技巧t a backing bean property value from another backing bean in JSF?
Yes, it is possible.
You can access another beans in the context by Application#evaluateExpressionGet()
. You can also inject a bean as managed property of other bean in faces-config.xml
. If you're already on JSF2, you can even use @ManagedProperty
annotation like follows:
@ManagedProperty(value="#{bean}")
private Bean bean;
精彩评论