How to set a bean property before executing this f:event listener
Posted
by
user
on Stack Overflow
See other posts from Stack Overflow
or by user
Published on 2012-06-17T04:20:59Z
Indexed on
2012/06/17
9:16 UTC
Read the original article
Hit count: 228
How to set a bean property from jsf page before executing this f:event listener:
<f:event type="preRenderComponent" listener="bean.method}"/>
I tried the below code but it does not set the value to the bean property.
<f:event type="preRenderComponent" listener="bean.method}">
<f:setPropertyActionListener target="#{bean.howMany}" value="2"/>
</f:event>
JSF2.1.6 with PF 3.3
EDIT
Any issues with this below code? (This works! but I just want to confirm if there are any issues with this!?)
<f:event type="preRenderComponent" listener="#{bean.setHowMany(15)}"/> <f:event type="preRenderComponent" listener="#{bean.method}"/>
© Stack Overflow or respective owner