Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem facing in Pagination with datascroller

843844Dec 24 2008 — edited Dec 24 2008
Hi ...........

i have used the datascroller for pagination in myproject .
everything works fine but with follwing scenario in search page
1. i have one jsp page in that there is one text feild and compo box (Dropdown list)
for entering text filed and selecting dropdown get the reslut perfectly
but in the resulted page with pagination if i go to last row >> of the result and select other value in dropdown
the page index is staring from the previous page pf lst row >> pagination index

Instead it has to start fresh result staring from first page >> index
So please help me to solve this its veryveryveryveryveryveryveryvery urgent

Here is my jsp code

<h:panelGrid id="osfds" columns="2" border="0" width="50%" >

<t:buffer into="#{table}">
<t:dataTable id="data" styleClass="table-with-border" headerClass="cell-header"
footerClass="standardTable_Header" rowClasses="print-result"
border="0" var="car" renderedIfEmpty="false"
value="#{SearchMailBoxBackingBean.searchListback}"
preserveDataModel="false" rows="10" >
<t:column defaultSorted="true">
<f:facet name="header" >
<h:commandLink action="#{SearchMailBoxBackingBean.sortAction}" value="Mailbox No" >
<f:param value="mailBox" name="mailBox"/>
</h:commandLink>
</f:facet>
<h:commandLink id="linkcom" value="#{car.mailboxNumber}" action = "#{MailBoxBackingBean.callReadFromSearch}">
<f:param value="#{car.service}" name="productType" />
<f:param value="#{car.mailboxNumber}" name="mailBoxNumber" />
</h:commandLink>

</t:column >

<t:column>
<f:facet name="header">
<h:commandLink action="#{SearchMailBoxBackingBean.sortAction}" value="Customer Name" >
<f:param value="customerName" name="customerName"/>
</h:commandLink>
</f:facet>
<h:outputText value="#{car.custName}" />
</t:column>

<t:column>
<f:facet name="header">
<h:commandLink action="#{SearchMailBoxBackingBean.sortAction}" value="Company" >
<f:param value="company" name="company"/>
</h:commandLink>

</f:facet>
<h:outputText value="#{car.companyName}" />
</t:column>
<t:column>
<f:facet name="header">
<h:commandLink action="#{SearchMailBoxBackingBean.sortAction}" value="Product Type" >
<f:param value="productValue" name="productValue"/>
</h:commandLink>

</f:facet>
<h:outputText value="#{car.service}" />
</t:column>

</t:dataTable>




<t:dataScroller id="scroll_1" for="data" fastStep="10"
pageCountVar="pageCount" pageIndexVar="pageIndex"
styleClass="scroller" paginator="true" paginatorMaxPages="9"
paginatorTableClass="paginator" renderFacetsIfSinglePage="false"
paginatorActiveColumnStyle="font-weight:bold;">
<f:facet name="first">
<h:outputText value="First" />
</f:facet>
<f:facet name="last">
<h:outputText value="Last" />
</f:facet>
<f:facet name="previous">
<h:outputText value="Previous" />
</f:facet>
<f:facet name="next">
<h:outputText value="Next" />
</f:facet>
<f:facet name="fastforward">
<h:outputText value=">>" />
</f:facet>
<f:facet name="fastrewind">
<h:outputText value="<<" />
</f:facet>

</t:dataScroller>
<t:dataScroller id="scroll_2" for="data" rowsCountVar="rowsCount"
displayedRowsCountVar="displayedRowsCountVar"
firstRowIndexVar="firstRowIndex" lastRowIndexVar="lastRowIndex"
pageCountVar="pageCount" pageIndexVar="pageIndex" immediate="true">
<h:outputFormat value="#{example_messages['dataScroller_pages']}"
styleClass="standard">
<f:param value="#{rowsCount}" />
<f:param value="#{displayedRowsCountVar}" />
<f:param value="#{firstRowIndex}" />
<f:param value="#{lastRowIndex}" />
<f:param value="#{pageIndex}" />
<f:param value="#{pageCount}" />
</h:outputFormat>
</t:dataScroller>

</t:buffer>


<h:outputText value="#{table}" escape="false" />
<h:outputText value="#{tableScroller}" escape="false" />

</h:panelGrid>


Thanks in advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 21 2009
Added on Dec 24 2008
3 comments
151 views