开发者

How do I set managed bean property from view?

开发者 https://www.devze.com 2023-02-15 19:18 出处:网络
I have 4 JSF views and 1 managed bean. And I want to set type property of bean from view during render.According to this开发者_运维技巧 type value, I will have different kinds of operations.

I have 4 JSF views and 1 managed bean. And I want to set type property of bean from view during render.According to this开发者_运维技巧 type value, I will have different kinds of operations. Does anyone has suggestions?

Thanks in advance!


On thing that comes to mind is to use four different methods, and initialize the field there to different values

<f:view beforePhase="#{bean.initFoo}">
0

精彩评论

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