You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by brucemaki <cs...@gmail.com> on 2008/09/15 13:49:32 UTC

reset pagination

Hi all,
i've implemented this situation: two backing-beans (scope: session), one
representative of a jspx with searching criteria and a submit button, the
other with a tr:table that shows the result. 
If inside table there is a pagination select and the user move to next
records range i'm enable to reset pagination to show the first range page in
the next search setting the setFirst(0). 
I've a separated BinaryPhaseListener class that implements PhaseListener,
and I have tried this code inside
afterPhase event, but nothing happens

UIComponent cForm = context.getViewRoot().findComponent("myForm");
if (cForm != null){
UIXTable cTable = (UIXTable)cForm.findComponent("AdList");
if (cTable != null){
    cTable.setFirst(0);
    RequestContext adfContext = RequestContext.getCurrentInstance();
    adfContext.addPartialTarget(cTable);
}    
//                        context.renderResponse();
}    

"AdList" is my tr:table....
Every phase inside my event is PhaseId.RESTORE_VIEW type.

what I am mistaking??
Thanks.

Cristiano
-- 
View this message in context: http://www.nabble.com/%3Ctr%3Atable%3E-reset-pagination-tp19491459p19491459.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.