0 Replies Latest reply on Feb 4, 2010 10:38 PM by Piotr Sobczyk

    Validation problems when reRendering single row in a4j tags

    Piotr Sobczyk Newbie

      Hello, I'm using <a:repeat> tag and Seam validated templates inside it. I'm also using single row reRendering:


      <a:repeat value="#{meetingsPassedBean.clientsMet}" 
              var="_client"
              rowKeyVar="_rowKey"
           ajaxKeys="#{meetingsPassedBean.rowsToUpdate}">
      
              ...
      
              <a:region>
              <s:decorate template="/layout/edit.xhtml">
                <ui:define name="label">Opis spotkania</ui:define>
                <h:inputTextarea ... required="true"/>
           </s:decorate>
              </a:region>
      
              ...
      
      </a:repeat>
      



      My edit.xhtml is pretty standard:




      ...
      <span class="value #{invalid?'errors':''}">
           <s:validateAll>
               <ui:insert/>
                  </s:validateAll>
               </span>
                   
               <span class="error">
                <h:graphicImage value="/img/error.gif" rendered="#{invalid}" styleClass="errors"/>
                       <s:message styleClass="errors"/>
                </span>
      ...





      I just want to have single row submitted (a:region) and single row reRendered (ajaxKeys).


      And everything works almost completely good. When I leave textarea empty the form is not submitted and I see error message at the <h:message> at the top of page. The only problem is that the css style class for the textarea is not changed and it's not highlighted and user don't see error message next to it.


      Everything suggests that 'invalid' variable is not propetly updated by seam during single row rerender when validation occurs. But why? Are there any getarounds?