Problem in datascroller
qasimkhan Oct 31, 2007 4:36 AMDatascroller is not working as it should be.
Its page navigation is random and I am preforming an action on each row as I change the page not action performs
Here is JSF code
<a4j:form id="DTForm" > <a4j:region selfRendered="true"> <a4j:status id="stat" startStyle="font-color:Red" startText="Processing.."/> <h:outputText id="status" style="font-weight:bold" value="#{BatchInfoController.status}"/> <a4j:region id="dtr" selfRendered="true"> <a4j:outputPanel ajaxRendered="true"> <rich:dataTable value="#{BatchInfoController.list}" onRowMouseOver="this.style.backgroundColor='#F1F1F1'" onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'" id="batchInfoDT" var="DTData" columnClasses="col" rows="10" width="400"> <f:facet name="header"> <rich:columnGroup> <rich:column colspan="3"> <h:outputText value="AJAX Example" /> </rich:column> </rich:columnGroup> </f:facet> <rich:column> <f:facet name="header"> <h:outputText value="ID"/> </f:facet> <h:outputText value="#{DTData.batchId}" /> </rich:column> <rich:column> <f:facet name="header"> <h:outputText value="Description" /> </f:facet> <h:outputText value="#{DTData.description}"/> </rich:column> <rich:column> <f:facet name="header"> <h:outputText value="Select/Delete" style="text-align:center" /> </f:facet> <h:commandButton id ="btn_id" value="..." type="button" onclick="sendVal(this,'#{DTData.batchId}','#{DTData.description}')" styleClass="Button" /> <a4j:region id="inner" selfRendered="true"> <h:commandButton value="..." type="button" styleClass="Button"> <a4j:support event="onclick" reRender="status,inner" status="stat" action="#{BatchInfoController.removeData}" onsubmit="if(confirm('Are you sure to delete the record ?')) {sendVal(this,'#{DTData.batchId}','#{DTData.description}');} else{ resett(); return false; }" oncomplete="resett()"/> </h:commandButton> </a4j:region> </rich:column> <f:facet name="footer"> <a4j:region> <rich:datascroller for="batchInfoDT" maxPages="5"/> </a4j:region> </f:facet> </rich:dataTable> </a4j:outputPanel> </a4j:region> <h:panelGrid columns="2"> <h:outputText value="ID" styleClass = "OUTPUT"/> <h:inputText id="id" value="#{BatchInfoController.batchInfo.batchId}" required="true" styleClass = "INPUT1"/> <h:outputText value="Description" styleClass = "OUTPUT"/> <h:inputText id="des" value="#{BatchInfoController.batchInfo.description}" required="true" styleClass = "INPUT1"/> </h:panelGrid> <h:commandButton value="Save" type="button" styleClass="Button"> <a4j:support event="onclick" reRender="batchInfoDT,status" action="#{BatchInfoController.saveData}" onsubmit="if(validateInput()== false){return false;}" oncomplete="resett()"/> </h:commandButton> <h:commandButton type="button" value="Edit" styleClass = "Button"> <a4j:support event="onclick" reRender="batchInfoDT,status" action="#{BatchInfoController.editData}" onsubmit="if(validateInput()== false){return false;}" oncomplete="resett()"/> </h:commandButton> <h:commandButton type="button" onclick="resett()" value="Clear" styleClass="Button"/> </a4j:region> </a4j:form>
Every thing works fine. As I change the page problems appear every where. not the page navigation is correct and the delete button not works even no request goes to bean.
If am wrong some where please let me know.
Its urgent! please