9 Replies Latest reply on Apr 29, 2009 7:39 PM by mtpettyp

    RichFaces listShuttle always considered invalid by <s:decorate>

    hermida.leandro.hermida.gmail.com

      Hello,


      When my form displays the RichFaces listShuttle form field is always considered #{invalid} by <s:decorate>.  So it trips up the wrong rendering yet there is nothing in <s:message/>.  Does anyone know why this goes on, especially when the form is initially displayed so no validation attempt has even occurred?


      Here is my formFieldDecorate.xhtml:


      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                      xmlns:s="http://jboss.com/products/seam/taglib"
                      xmlns:h="http://java.sun.com/jsf/html"
                      xmlns:f="http://java.sun.com/jsf/core"
                      xmlns:ui="http://java.sun.com/jsf/facelets"
                      xmlns:a4j="http://richfaces.org/a4j"
                      xmlns:rich="http://richfaces.org/rich">
      
          <div class="entry #{invalid ? 'errorEntry' : ''}">
              <s:div styleClass="errorMessage" rendered="#{invalid}">
                  <h:panelGrid columns="2" cellpadding="0" cellspacing="0" border="0">
                      <h:graphicImage value="/img/attention.gif"
                                      width="18" height="18"
                                      styleClass="attentionImage"/>
                      <s:span styleClass="attentionMessage">&#160;<s:message/></s:span>
                  </h:panelGrid>
              </s:div>
              <div class="label">
                  <ui:insert name="label"/>
                  <s:span styleClass="required" rendered="#{required}">*</s:span>:
              </div>
              <div class="input">
                  <s:validateAll>
                      <ui:insert/>
                  </s:validateAll>
              </div>
          </div>
      
      </ui:composition>



      and here is the area of the form with the listShuttle:


      <s:decorate id="investigationTypesDecorate"
                template="/layout/formFieldDecorate.xhtml">
                <ui:define name="label">Types</ui:define>
                <rich:listShuttle listsHeight="200"
                     sourceValue="#{investigationCreateAction.availableInvestigationTypes}"
                     targetValue="#{investigationCreateAction.selectedInvestigationTypes}"
                     sourceCaptionLabel="Available Types"
                     targetCaptionLabel="Selected Types" orderControlsVisible="false"
                     fastOrderControlsVisible="false" converter="ontologyTermDTOConverter"
                     var="type">
                     <rich:column width="18">
                          <h:graphicImage value="/img/ico_common.gif" />
                     </rich:column>
                     <rich:column>
                          <h:outputText value="#{type.term}" />
                     </rich:column>
                </rich:listShuttle>
           </s:decorate>