12 Replies Latest reply on Jan 19, 2011 3:45 AM by atyauristen

    Rich:dataList in a dataList

    atyauristen

      hey,

       

      what I'd like to do is to build multiple rich:dataLists and their rich:dataScrollers in a web page.

       

      Eg.: we have N schools, each school has M subjects and I want to render every school with M2 (M2 << M) number of subjects and then we could use a rich:scroller to show every subject.

       

      so I though I use ui:repeat to repeat the schools and in each iteration I render a rich:dataList for the subjects and its corresponding scroller. but it just won't work and I get the error message "No component found to process as 'ajaxSingle' for clientId ...".

       

      what am I doing wrong?

       

      please help

       

      cheers,

      b

        • 1. Rich:dataList in a dataList
          atyauristen

          update: i replaced the outer ui:repeat to rich:datalist and now the error is "Datascroller j_id195:j_id214:scTop: The requested page #2 isn't found in the model containing 1 pages. Paging is reset to page #1"

          • 2. Rich:dataList in a dataList
            ilya40umov

            1) Try to specify ids to all your components because these are too many iterations on one page. It should prevent possible errors with duplicated IDs.

            2) Try a4j:repeat and c:forEach tags.

            3) If it won't help you, please, post a sample of your code here.

            • 3. Rich:dataList in a dataList
              atyauristen

              thanks for your answer!

               

               

              1 I assigned IDs to every component, also they inherit the parents' IDs as prefixes. There was no problem with that.

              2 a4j:repeat: according to the API I don't understand why it would make any difference. But I tried, just in case ;] I did not make any

              c:forEach - I'm not too sure about mixing build time tags with render time tags. If I use c:forEach for the outer loop, I definitely get duplicate ID problem and there is no way to generate appropriate IDs that way I guess. But correct me if I'm wrong.

               

               

              3 so I follow instruction 3

               

               

              <rich:dataList value="#{searchAction.searchForm.subjectsOfUniversityForms}" var="university">

               

               

                  <div class="university">

                      <h:outputText value="#{university.name}" />

                  </div>

               

                      <rich:datascroller

                          for="subjectsOfSchool"

                          id="scTop"

                          reRender="scBottom"

                          maxPages="10"

                          boundaryControls="hide"

                          fastControls="hide"

                          styleClass="topScroller">

                     

                          <f:facet name="next">

                          <h:outputText value="#{labels.next}"/>

                          </f:facet>

                     

                          <f:facet name="previous">

                          <h:outputText value="#{labels.previous}"/>

                          </f:facet>

                     

                          <f:facet name="pages">

                          </f:facet>

                      </rich:datascroller>

               

               

                      <rich:dataList id="subjectsOfSchool" rows="2" value="#{university.subjectInfoWithMaterialsDTOs}" var="subject">

               

                              <div class="subjectName">

                              <h:outputText value="#{subject.name}" />

                              </div>

               

                      </rich:dataList >

              </rich:dataList>

              • 4. Rich:dataList in a dataList
                ilya40umov

                Please post the code of beans and their scopes.

                • 5. Rich:dataList in a dataList
                  atyauristen

                  everything is session scoped.

                  the ones to display are regular DTOs with id and name, school contains an arraylist of subjects and an other one might be the searchAction bean but in this example only its searchForm is used and it has an arraylist of schools.

                  • 6. Rich:dataList in a dataList
                    ilya40umov

                    Could you try it in the following way?

                    <rich:dataList>

                    <rich:dataTable>

                    <f:facet name="header">
                    <rich:datascroller/>

                    </f:facet>

                    </rich:dataTable>

                    </rich:dataList>

                    • 7. Rich:dataList in a dataList
                      atyauristen

                      not working, even worse output. no subjects are displayed at all.

                      • 8. Rich:dataList in a dataList
                        ilya40umov

                        What do you want to do by reRender="scBottom"? I guess you don't need to reRender anything with dataScroller. It should reRender dataList automatically.

                        • 9. Rich:dataList in a dataList
                          atyauristen

                          sorry, I forgot to remove that. originally I had two scrollers, one top, one bottom, the rerender is to keep them synchronized. but removing it won't help, but sorry for being confusing.

                          • 10. Rich:dataList in a dataList
                            ilya40umov

                            I don't have any idea now what to advice to you but I promise to try this code in a couple of days. But anyway there are a lot of JSF/RF experts here. I guess they can also look at this and tell you more then me.

                            • 11. Rich:dataList in a dataList
                              nbelaevski

                              Hi,

                               

                              Unfortunately, dataScroller nested inside iteration components is not supported in RF 3.x.

                              1 of 1 people found this helpful
                              • 12. Rich:dataList in a dataList
                                atyauristen

                                hey,

                                thanks for letting me know!

                                cheers,

                                b