3 Replies Latest reply on Aug 25, 2007 4:51 AM by daedlus

    rich:datatable problem

    daedlus

      Hi

      i am trying to hide the scroller if number of rows in the table are 4 or less
      but the datatable shows no rows even if rows are present in the bean variable.

      <rich:datascroller for="table" maxPages="10"
      rendered="#{myBean.bindTable.rowCount > 4}" />
      
      <rich:dataTable id="primitiveSummary" rows="4" width="100%"
      binding="#{myBean.bindTable}"
      value="#{myBean.items}" var="item">
      




        • 1. Re: rich:datatable problem
          daedlus

          also the above problem appears sometimes. and sometimes it seems to work fine.

          • 2. Re: rich:datatable problem

             

            "daedlus" wrote:
            Hi

            i am trying to hide the scroller if number of rows in the table are 4 or less
            but the datatable shows no rows even if rows are present in the bean variable.

            <rich:datascroller for="table" maxPages="10"
            rendered="#{myBean.bindTable.rowCount > 4}" />
            
            <rich:dataTable id="primitiveSummary" rows="4" width="100%"
            binding="#{myBean.bindTable}"
            value="#{myBean.items}" var="item">
            



            Try to inject and outject the bindTable:
            @In(required=true,create=true)
            @Out(required=true)
            


            and then bind it on the jsp page:
            <rich:datascroller for="table" maxPages="10"
            rendered="#{myBean.bindTable.rowCount > 4}" />
            
            <rich:dataTable id="primitiveSummary" rows="4" width="100%"
            binding="#{bindTable}"
            value="#{myBean.items}" var="item">
            


            Should work.

            • 3. Re: rich:datatable problem
              daedlus

              is tht seam related annotation, iam not using seam.
              is there another way?i cant seem to undestand the cause of the problem
              what am i doing wrong?