-
FEATURED COMPONENTS
First time here? Check out the FAQ!
i m having grid problem on paging unable reset back to first page during i on search with passing parameter research again. But when using listbox setSelectedItem it can reset back to first page. any solution how to reset paging in grid. i m using MVVM. below is my code.
@Command
@NotifyChange("allItems")
public void search(@BindingParam("data")Purpose selectedItem){
Search srch = new Search();
srch.setSearchBy(SearchBy);
srch.setSearchValue(keyword==null?"":keyword);
allItems = new ListModelList<Itm>(new itmModel().listPurpose(srch));
allItems.addToSelection(allItems.get(0));
}
you can bind the "activePage" attribute of your <grid>
<grid model="@bind(vm.allItems)" activePage="@bind(vm.activePage)" ... >
and in you search method reset to 0 together with using @NotifyChange
@Command
@NotifyChange({"allItems", "activePage"})
public void search(@BindingParam("data")Purpose selectedItem){
...
activePage = 0;
}
Asked: 2013-08-16 10:57:00 +0800
Seen: 28 times
Last updated: Aug 19 '13