开发者

get a backing bean property value from another bean

开发者 https://www.devze.com 2022-12-27 04:38 出处:网络
It is possible to access or to ge开发者_运维技巧t a backing bean property value from another backing bean in JSF?Yes, it is possible.

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

精彩评论

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