I believe that the input hidden is like any other UIInput in terms
that it will fail the POST if it cannot evaluate correctly. My first
guess is that your userForm backing bean is scoped as request. If so,
unless you save its state, userForm.user will be null as userForm will
be re-created on the next access. As a result, userForm.user.id will
fail to evaluate correctly on the inputHidden update model phase and
therefore the process action phase will never occur.

If this is incorrect, please post the scope of userForm & any managed
properties from your faces-config.xml. If using seam, post your
annotations.

Thanks,
Andrew

On 10/31/06, ying lcs <[EMAIL PROTECTED]> wrote:
Hi,
I have a button like this:

When I click 'save' it is supposed to call the save() of the UserForm.
 But it does not get called.
Interesting thing is if I remove this line from the file, the save()
function of UserForm get called.

<!-- if I remove this line, it works -->
"<h:inputHidden value="#{userForm.user.id}" id="id"/>"


Here is the line for the save button.

 <h:panelGroup styleClass="buttonBar bottom">
        <h:commandButton value="#{text['button.save']}"
action="#{userForm.save}" styleClass="button"/>

        <h:commandButton value="#{text['button.cancel']}"
action="#{userForm.cancel}" immediate="true"
            styleClass="button" onclick="bCancel=true"/>
    </h:panelGroup>

Any idea how can I trouble-shoot this problem?

Thank you.

Reply via email to