1
votes

I got a JSF 2.0 + PrimeFaces application and inside a h:form there's an inputHidden like this:

<h:inputHidden id="mdid" />

Unfortunately our managed beans come from another developer team and they had deployed a bean (@ViewScoped) in a .jar with an action method like this:

public void action(Integer id) {
    //Call service layer passing the id.
}

Our inputHidden is changed in client side and we can't bind it with bean.

Is there anyway I can do this?

<p:commandButton action="#{ServiceBean.action( mdid )}"

mdid should be replaced with inputHidden's value.

Thanks a lot.

1

1 Answers

4
votes

Bind it to the view so that you can get its value in EL scope as well.

<h:inputHidden id="mdid" binding="#{mdid}" />
...
<p:commandButton ... action="#{ServiceBean.action(mdid.value)}" />