Can you try a update, please.

Regards

Bernd

Nazar Stasiv schrieb:
I set pagingStart to 0 in filter action. And InstancesBean.getPagingStart() returns 0 after filter has been changed. Can anyone help?

Nazar Stasiv wrote:

Hi all
There is an issue with t:sheet I came across in my project.
There's a t:sheet component on the page and it displays a collection of items. There is also drop-down list component above sheet. If I change value of drop-down list t:sheet displays new collection of items. It's sort of filter functionality.

Then I've got 60 items (25 per page) for 3 pages. And filter which filters out all but one item from the list. When I apply filter number of pages should change from <1,2,3> to <1> and Page 1 of 1 but it won't

See screen shot attached

Here goes the jsp code

<t:sheet value="#{instances.processInstances}" id="instances_sheet"
                columns="25px;370px;85px;145px;145px" var="instance"
showRowRange="none" showPageRange="right" showDirectLinks="center" directLinkCount="10" forceVerticalScrollbar="false" pagingLength="#{instances.pagingLength}"
                stateChangeListener="#{instances.stateChangeListener}"
                pagingStart="#{instances.pagingStart}"
                sortActionListener="#{instances.onSort}">

           <t:column label="#{msgs.columns_selection}"
                     sortable="false" align="center">
<t:selectBooleanCheckbox value="#{instance.selected}" id="selected_instance"/>
           </t:column>
           <t:column label="#{msgs.columns_processName}"
                     sortable="true" align="left" >
<rest:RESTWrapper submitURI="InstanceDetails?id=#{instance.iid}"> <t:link action="#{instance.details}" label="#{instance.processName}"/>
               </rest:RESTWrapper>
           </t:column>
           <t:column label="#{msgs.columns_state}"
                     sortable="true" align="left">
               <t:out value="#{instance.status}"/>
           </t:column>
           <t:column label="#{msgs.columns_started}"
                     sortable="true" align="center">
               <t:out value="#{instance.started}">
<f:convertDateTime pattern="yyyy-MM-dd hh:mm:ssa" type="both"/>
               </t:out>
           </t:column>
           <t:column label="#{msgs.columns_lastActive}"
                     sortable="true" align="center">
               <t:out value="#{instance.lastActive}">
<f:convertDateTime pattern="yyyy-MM-dd hh:mm:ssa" type="both"/>
               </t:out>
           </t:column>
       </t:sheet>

And action called with t:selectOne onchange attribute

public void setCurrentFilter(String currentFilter) throws ConnectivityException { state.setInstancesPagingStart(0); // this is value binding to sheet pagingStart attribute state.setInstancesCurrentFilter(currentFilter); populateInstances(_sortBy + _orderBy); // updates collection of items in collection displayed by sheet component.
       populateProperties();
   }

Nazar


------------------------------------------------------------------------




--
Dipl.-Ing. Bernd Bohmann - Atanion GmbH - Software Development
Bismarckstr. 13, 26122 Oldenburg, http://www.atanion.com
phone: +49 441 4082312, mobile: +49 173 8839471, fax: +49 441 4082333

Reply via email to