ZK Provide Data Filter in Listbox,Grid I have created a Very Basic Demo application to apply Filters in Listbox.
ZUL file Code
And View Model Or Java Class
Its a Very basic developer can modify the code as their requirement.
ZUL file Code
And View Model Or Java Class
Its a Very basic developer can modify the code as their requirement.
So, where is the code?
ReplyDeleteSorry, it didn't appear until i logged in with my google account....
DeleteAny issue to get demo code?
DeleteAny issue to get demo code?
DeleteThis comment has been removed by the author.
ReplyDeleteCheck method getFilterPersons() its return myPersonList and getFilterPersons() called inside changeFilter().Rest this code will do magic
ReplyDeleteList myPersonList1 = getFilterPersons(people);
modelList = new ListModelList(myPersonList1);
Problem is, this create all time a new (not configured with multi checkboxes) ListModelList(myPersonList1). Even the checked state is reset after you use again the data filter.
DeleteOk, just did create one time the ListModel inside the Data Filter what bind this model to the view controller. So instead that they new create a ListModel it just change the innerLists what work well in my case.
DeleteDo you mean you able to resolve the issue.
DeleteNot resolved fully. How can you set/change your myPersonList from outside, because this represent normaly the search result of a function.
DeleteDo one think mail me or chat subodhcjoshi82@gmail.com let me try to understand your problem clearly
DeleteCurrently, I did add a autowire to the Data Filter Model to get access to the full List of entries.
Delete@Wire("#btSearch")
private Button btSearch;
@Wire("#btClear")
private Button btClear;
@AfterCompose
public void afterCompose(@ContextParam(ContextType.VIEW) Component view){
Selectors.wireComponents(view, this, false);
myRowList = new ArrayList();
btSearch.addEventListener("onClick", new EventListener() {
public void onEvent(Event event) {
refreshModelList();
}
});
btClear.addEventListener("onClick", new EventListener() {
public void onEvent(Event event) {
refreshModelList();
}
});
}