2 Replies Latest reply on May 24, 2006 10:19 AM by gavin.king

    s:validateAll nulling every value

    mirko27

      What it does is that it restores state of rendering a form.
      For example I had this form:
      <s:validateAll>
      <h:message for="name"/>
      <h:outputLabel for="name" value="Grupi nimi"/>
      <h:inputText id="name" value="#{category.name}" styleClass="field"/>


      <h:message for="head"/>
      <h:outputLabel for="head" value="Tüvikategooria"/>
      <h:outputText id="head" value="#{category.head.name}" styleClass="field"/>


      <h:message for="showed"/>
      <h:outputLabel for="showed" value="Avalik"/>
      <h:selectOneRadio id="showed" value="#{category.showed}" styleClass="field">
      <f:selectItem itemValue="true" itemLabel="Jah"/>
      <f:selectItem itemValue="false" itemLabel="Ei"/>
      </h:selectOneRadio>


      <s:link view="/haldus/mcategory.xhtml" id="submit" value="Loo grupp" action="#{cateditor.create}"
      buttonClass="button" linkStyle="button"/>
      </s:validateAll>
      and after submiting it, it restored category, so the name became null.