I have the following form. The whole form is displayed correctly,
include the input text field values are put out correctly.

But when I click the 'save' button, it does not submit.  It stays at
the same page.

And if I take out the following block(a label and an input text), the
submit works.

  <h:outputLabel for="phoneno" styleClass="desc" value="#{text['phone.no']}"/>
   <h:inputText value="#{myAgentForm.myAgent.phone.no}" id="phoneno"
required="true" styleClass="text large">
       <v:commonsValidator type="required" arg="#{text['phone.no']}"/>
   </h:inputText>


Can anyone please tell me what the problem? Again, the page is
displayed correctly with the right value. I have checked that
'myAgent' class has getter/setting for 'phone' class and 'phone' class
has getter/setting for 'no'.

Thanks for any help.


Here is my form:
<h:form id="myAgentForm">

<h:inputHidden value="#{myAgentForm.myAgent.id}" id="id"/>
<h:inputHidden value="#{myAgentForm.myAgent.version}" id="version"/>
<input type="hidden" name="from" value="#{myAgentForm.from}" />
<h:panelGrid columns="3">

   <h:outputLabel for="myAgentName" styleClass="desc"
value="#{text['myagent.name']}"/>
   <t:message for="myAgentName" styleClass="fieldError"/>
   <h:inputText value="#{myAgentForm.myAgent.name}" id="myAgentName"
required="true" styleClass="text large">
       <v:commonsValidator type="required" arg="#{text['myagent.name']}"/>
   </h:inputText>

  <h:outputLabel for="phoneno" styleClass="desc" value="#{text['phone.no']}"/>
   <h:inputText value="#{myAgentForm.myAgent.phone.no}" id="phoneno"
required="true" styleClass="text large">
       <v:commonsValidator type="required" arg="#{text['phone.no']}"/>
   </h:inputText>

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

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

</h:form>

Reply via email to