4 Replies Latest reply on Jan 17, 2009 9:58 AM by nimo22

    Problem with the rich:shuttlelist

    melanie82
      Hello,
      i have a problem with the shuttlelist. I define 2 ArrayLists in in my Class

           private ArrayList<PdfContents> contentsList = new ArrayList<PdfContents>();
           private ArrayList<PdfContents> contentsStdList = new ArrayList<PdfContents>();


      with getter/setter. In the xhtml i define the shuttleList

           <rich:listShuttle sourceValue="#{pdfSitesHome.contentsStdList}"
                      targetValue="#{pdfSitesHome.contentsList1}" var="cont" listHeight="600px"
                       listWidth="500" sourceCaptionLabel="#{msg.default} #{msg.tab_pdfcontent}"
                      targetCaptionLabel="#{msg.current_selection}"
                           >
                <s:convertEntity />
                <rich:column>
                     <f:facet name="header"><h:outputText value="#{msg.name}" /></f:facet>
                     <h:outputText value="#{cont.pconName}"/>
                </rich:column>                                                                           
           </rich:listShuttle>


      If i save the form, the target list is null and the source list has the same entity as before.
      Thanks!
        • 1. Re: Problem with the rich:shuttlelist
          nimo22

          Try that:



          <h:form>
          <rich:listShuttle sourceValue="#{pdfSitesHome.contentsStdList}"
          targetValue="#{pdfSitesHome.contentsList1}" var="cont"     converter="org.jboss.seam.ui.EntityConverter">
          
          <rich:column>
          <f:facet name="header"><h:outputText value="#{msg.name}" /></f:facet>
             <h:outputText value="#{cont.pconName}"/>
            </rich:column> 
                              
          </rich:listShuttle>
          <h:form>
          



          instead of getter/setter, say this:



          @Out(required=false)
          private ArrayList<PdfContents> contentsList = new ArrayList<PdfContents>();
          
          @Out(required=false)
          private ArrayList<PdfContents> contentsStdList = new ArrayList<PdfContents>();




          then it should work:-)

          • 2. Re: Problem with the rich:shuttlelist
            melanie82
            thanks for the answer, but now i get this error :(

            javax.el.PropertyNotFoundException: /PdfSitesEdit.xhtml @18,53 sourceValue="#{pdfSitesHome.contentsStdList}": Property 'contentsStdList' not found on type xx.test.session.PdfSitesHome_$$_javassist_7
            • 3. Re: Problem with the rich:shuttlelist
              melanie82

              It works :)


              i take the new Richfaces 3.3 and now the Arrays are ok !!


              Thanks Nimo for your help :)

              • 4. Re: Problem with the rich:shuttlelist
                nimo22

                your welcome.



                please rate !