How to set hidden value in managed bean?

Hi

I have the following :

<a4j:commandButton

id="commandButton3"

action="#{backing_CustSearchBean.serchCustomer}"

image="images/btn_search.gif"

style="position: relative; margin-right: 5px;"

actionListener="#{backing_CustSearchBean.checkText}"

immediate="true"

status="wait"

oncomplete="showQuickCreate()"

>

<h:inputHidden id="jsfHidden" binding="#{backing_CustSearchBean.jsfHidden}" />

<a4j:status id="wait">

<f:facet name="start" >

<h:graphicImage url="images/SpinGear2.gif" style="position: absolute; left: 378px; top: 216px; width: 19px; height: 18px;"/>

</f:facet>

</a4j:status>

</a4j:commandButton>

when the action goes in the managed bean I want to set the value of hidden parameter "jsfHidden" in managed bean and catch it in showQuickCreate (oncomplete="showQuickCreate()" ) javascript function on return to the page.

Please help, how should I do it?

[1397 byte] By [tizia] at [2007-11-26 21:47:02]
# 1

I know nothing about a4j, but if you want to pass new parameters from JSF to the backing bean, then use f:param for commandlinks or f:attribute for commandbuttons.

The h:inputHidden just saves backing bean properties from request to request. You can't set or change it from within the JSF.

Not sure if the f:attribute will work for the a4j commandbutton (check if they have a support forum at their website?)

Also see http://balusc.xs4all.nl/srv/dev-jep-com.html about passing parameters and accessing objects and beans in the facescontext.

BalusCa at 2007-7-10 3:37:04 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...