myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phanidhar Adusumilli (JIRA)" <...@myfaces.apache.org>
Subject [jira] Commented: (TOMAHAWK-548) Ability to reset datascroller(UIData) to page one from a UICommand
Date Thu, 13 Mar 2008 05:55:46 GMT

    [ https://issues.apache.org/jira/browse/TOMAHAWK-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12578158#action_12578158
] 

Phanidhar Adusumilli commented on TOMAHAWK-548:
-----------------------------------------------

Since the datatable supports value binding expression for "first" attribute. If the datascroller
is coded in a way that it also uses the same expression to update on pagination. both the
scroller and table will be in sync and the application is also in control of when to reset
it. Moreover the data scroller does not need the UIData hence "for" attribute is not needed.

ex:

<t:datatable first="#searchPageBean.startRowIndex" ...>
  ...
</t:datatable>
<t:dataScroller startRowIndex="#searchPageBean.startRowIndex" ...>
  ...
</t:dataScroller>


in searchPageBean's search method the attribute startRowIndex can be set to 0 when the datamodel
is updated.

It does not remove the java code, but keeps everything in application control.


> Ability to reset datascroller(UIData) to page one from a UICommand
> ------------------------------------------------------------------
>
>                 Key: TOMAHAWK-548
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-548
>             Project: MyFaces Tomahawk
>          Issue Type: Improvement
>          Components: Data Scroller, Extended Datatable
>            Reporter: Mike Kienenberger
>
> There should be a way to reset the datascroller back to page one when clicking a UICommand
without writing java code and binding the UIData to the backing bean.
> Currently this has to be done as follows:
> <h:commandButton
> 	value="Submit Query"
> 	action="#{searchPageBean.search}"
> 	actionListener="#{searchPageBean.resetDataScroller}">					
> </h:commandButton>
> <t:dataTable id="searchResultsDataTable"
> 	binding="#{searchPageBean.searchUIData}"
>     public void resetDataScroller(ActionEvent e)
>     {
>     	searchUIData.setFirst(0);
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message