5 Replies Latest reply on Nov 25, 2008 1:03 AM by Amit Bafna

    URLs for seam links from a data table with data scroller

    Amit Bafna Newbie

      I have a data table with data scroller. The data table has a column with seam links with associated page parameters. When I click the link from first page of data table, URL is generated as expected and corresponding page is displayed properly. However, when I go to another page on the data table and try to access the links, URL is generated with values suffixed with some extra characters and the page is not displayed correctly. 


      I am using Seam 2.0.2.GA with Richfaces 3.2.2 on JBoss 4.2.2


      Has anyone else faced this issue? Or am I doing something wrong?


      Here is the code:


      Data Table


      <rich:dataTable id="reportsTable" value="#{reports}" var="report" rows="10" reRender="reportListDS">
           <rich:column>#{report.name}</rich:column>
      
           <rich:column>
                <s:link value="Create Schedule" 
                          rendered="#{report.activeScheduleId == 0}" 
                          disabled="#{identity.email == null}" 
                          view="/scheduler.xhtml">
                     <f:param name="scheduleId" />
                     <f:param name="reportId" value="#{report.id}"/>
                     <f:param name="fromView" value="reportSaved"/>
                </s:link>
                
                <s:link value="Edit Schedule" 
                          rendered="#{report.activeScheduleId != 0}" 
                          disabled="#{identity.email == null}" 
                          view="/scheduler.xhtml">
                     <f:param name="scheduleId" value="#{report.activeScheduleId}" />
                     <f:param name="reportId" />
                     <f:param name="fromView" value="reportSaved"/>
                </s:link>
           </rich:column>
      
           <rich:column>
                <h:commandLink value="Inactivate" action="#{reportConfiguration.inactivateReport}">
                     <f:param name="reportId" value="#{report.id}" />
                     <s:conversationPropagation type="none" />
                </h:commandLink>
           </rich:column>
      
           <f:facet name="footer">
                <rich:datascroller id="reportListDS" align="center" maxPages="5"
                     renderIfSinglePage="false" />
           </f:facet>
      </rich:dataTable>
      



      Pages.xml


      <page view-id="/scheduler.xhtml" login-required="true" action="#{scheduleHome.checkData}">
          <begin-conversation join="true" flush-mode="manual"/>
          <description>Schedule Reports</description>
           
           <param name="scheduleId" value="#{scheduleHome.id}" converterId="javax.faces.Long" />
           <param name="reportId" value="#{scheduleHome.reportId}" converterId="javax.faces.Long"/>
           <param name="fromView"/>
      
           <navigation from-action="#{scheduleHome.checkData}">
                <rule if-outcome="invalid">
                     <redirect view-id="/error.xhtml" />
                </rule>
           </navigation>
           
           <navigation>
                <rule if-outcome="success">
                     <end-conversation before-redirect="true"/>
                     <redirect view-id="/#{empty fromView ? 'mySavedReports' : fromView}.xhtml" />
                </rule>
           </navigation>
      </page>
      



      URL generated when link is clicked from first page of datatable


      http://localhost:8080/RSOnlineSeam/scheduler.seam?reportId=100000062&scheduleId=&fromView=mySavedReports&cid=4
      



      URL generated when link is clicked from second page of datatable



      http://localhost:8080/RSOnlineSeam/scheduler.seam?reportId=100000087&#38;scheduleId=&%2338;fromView=mySavedReports&%2338;cid=1