3 Replies Latest reply on Dec 11, 2007 9:32 AM by Paulo Manabe

    datascrollet not working, bug?

    Paulo Manabe Newbie

      Hi all, I'm trying to use the datascroller for this code:

      <richfaces:dataTable id="profitCenterTable" width="99%" border="1" var="pftData" rows="10" binding="#{maintainProfitCenter.maintainProfitCenterBean.dataTable}"
       value="#{maintainProfitCenter.maintainProfitCenterBean.dataFromProfitCenter}" rendered="true" cellpadding="0" cellspacing="0"
       rowClasses="grey_11" styleClass="contentResultTable">
      
       <f:facet name="header">
       <richfaces:columnGroup>
       <richfaces:column styleClass="tdAlignCenter">
       <t:outputText value="Code" />
       </richfaces:column>
       <richfaces:column styleClass="tdAlignCenter">
       <t:outputText value="Name" />
       </richfaces:column>
       <richfaces:column styleClass="tdAlignCenter">
       <t:outputText value="Owner" />
       </richfaces:column>
       <richfaces:column styleClass="tdAlignCenter">
       <t:outputText value="Legal Entity" />
       </richfaces:column>
       <richfaces:column styleClass="tdAlignCenter">
       <t:outputText value="Source System" />
       </richfaces:column>
       <richfaces:column styleClass="tdAlignCenter">
       <t:outputText value="Update" />
       </richfaces:column>
       <richfaces:column styleClass="tdAlignCenter">
       <t:outputText value="Delete" />
       </richfaces:column>
       </richfaces:columnGroup>
       </f:facet>
      
       <richfaces:column>
       <h:outputText value="#{pftData.code}"/>
       </richfaces:column>
      
       <richfaces:column>
       <h:outputText value="#{pftData.name}"/>
       </richfaces:column>
      
       <richfaces:column>
       <h:outputText value="#{pftData.owner}"/>
       </richfaces:column>
      
       <richfaces:column>
       <h:outputText value="#{pftData.legalEntity.owningCode}"/>
       </richfaces:column>
      
       <richfaces:column>
       <h:outputText value="#{pftData.sourceSystemID}"/>
       </richfaces:column>
      
       <richfaces:column styleClass="tdAlignCenter">
       <h:commandLink onclick="if (!confirm('Are you sure you want to update this record?')){return false;}
       else{flag = document.getElementById('frmMaintainProfitCenter:pftCenterGrid' + '_status');
       if(flag.value == 'false'){flag.value = 'true';}
       toggleVisible(document.getElementById('hideDiv'+ 'frmMaintainProfitCenter:pftCenterGrid'),flag);}"
       immediate="false" action="#{maintainProfitCenter.updateProfitCenterFields}">
       <t:graphicImage align="center" border="0" url="/images/pencil_icon.gif"/>
       </h:commandLink>
       </richfaces:column>
      
       <richfaces:column styleClass="tdAlignCenter">
       <h:commandLink onclick="if (!confirm('Are you sure you want to delete this record?')) return false"
       action="#{maintainProfitCenter.deleteProfitCenter}">
       <t:graphicImage align="center" border="0" url="/images/delete_icon.JPG"/>
       </h:commandLink>
       </richfaces:column>
      
       </richfaces:dataTable>
      
       <richfaces:spacer height="10" />
      
       <richfaces:datascroller ajaxSingle="true" align="center" for="profitCenterTable" maxPages="3" styleClass="grey_11" selectedStyle="font-weight:bold;"
       renderIfSinglePage="false" fastStep="3" fastControls="hide" boundaryControls="hide" >
      
       <f:facet name="previous">
       <t:graphicImage value="/images/previous.gif" border="0"/>
       </f:facet>
       <f:facet name="next">
       <t:graphicImage value="/images/next.gif" border="0"/>
       </f:facet>
       </richfaces:datascroller>


      but when I add the columns update and delete, the datascroller not works! when I remove this 2 columns it works fine....it's bug?

      Thanks in advance!