5 Replies Latest reply on Feb 13, 2008 12:25 PM by Chris Simons

    Form submission problems using s:decorate

    Chris Simons Expert


      I'm attempting to convert our forms using IceFaces, Seam (2.0), and some core JSF elements to use what seems to be the best way to go - <s:decorate>.

      I've taken a form that was otherwise working and converted the form to use

      <s:decorate template="/layout/forms/edit.xhtml">
      .

      "edit.xhtml" is your standard usage of <s:decorate> which I have seen again and again in Seam docs, forum posts, and blogs.

      I can confirm that the form is validating correctly as the validation messages (using <s:message>) appear appropriately. However, my issue is that when there are no validation issues - the page simply will not "submit". I've checked pages.xml and the "submit" button; remember, this form worked prior to using <s:decorate>.

      I am hoping someone here may use an eye ball or two and look at my problem.

      Here is a code snippet:

      The Form:
      <ice:form id="modifyPersonalProfileForm">
      <s:validateAll>
      <s:decorate id="designatorDecoreate" template="/layout/forms/edit.xhtml">
      <ui:define name="label">First Name:</ui:define>
      <ice:inputText id="firstName" required="true" value="#{cvUser.firstName}" size="40"></ice:inputText>
      </s:decorate>
      ....
      <ice:commandLink value="Cancel" action="#{userProfileManager.cancelUserProfile}" />
      

      ...

      The "edit.xhtml":
      <table>
       <tr>
       <td>
       <s:label styleClass="label #{invalid?'errors':''}">
       <ui:insert name="label"/>
       <s:span styleClass="required" rendered="#{required}">*</s:span>
       </s:label>
       </td>
       <td>
       <span class="input #{invalid?'errors':''}">
       <!-- <h:graphicImage value="/themes/englink-earth-final/img/error.gif" rendered="#{invalid}"/> -->
       <ui:insert/>
       </span>
      
       <small class="small #{invalid?'errors':''}">
       <s:message styleClass="error errors"/>
       </small>
       </td>
       </tr>
       </table>




      P.S. I tried to post this message on the new forums, but as soon as I copied/pasted some actual JSF code, the program crashed and I received a JBoss "internal 500" page error.