khuang
khuang

Reputation: 41

Can I monitor a hidden value change in JSF/Seam?

AS subject, can I do that like below in JSF 1.2/Richfaces 3.3:

<h:inputHidden value="#{manageBean.value}"> <a4j:support event="onchange" reRender="contentID" eventsQueue="eventQueue" /> </h:inputHidden>

The reason is that it reuquries to reRender a content area on page depends on a value change, this value is not changed by page codes (by the backened bean), So I want a change event for it.

Thank you advance.

Upvotes: 0

Views: 1084

Answers (1)

Daniel
Daniel

Reputation: 37061

If that won't work you can try

<h:inputText id="myHidden" style="display:none" value="#{manageBean.value}">
    <a4j:support event="onchange" reRender="contentID" eventsQueue="eventQueue" />
</h:inputText>

Also you will have to trigger manually its change event, for example with jQuery:

$("#myHidden").change(); //form or naming container prefix might be needed (`$("#myForm\\:myHidden").change();`)

Upvotes: 3

Related Questions