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}"/>
try
And if that wont work , try
and in you managed bean add the following
I think you better avoid two subsequent
<f:event>calls , when you don’t really need them, Although I think i saw somewhere that the order of declaration will be the order of execution, It still may vary between different JSF implementation and you never can be 100% sure that you can count on it…so INMO using only one is better in this case