开发者

get a backing bean property value from another bean

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;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜