-
Bug
-
Resolution: Fixed
-
Normal
-
8.0.1.1
-
Security Level: Jimmy
-
None
-
ZK 8.0.2 S2
-
None
When binding a custom paging to a Listbox (or other mesh component), if the listbox currently has a ListModel as a model, the ListModel pageSize will be set to the current Paging pageSize value.
If the paging initialize after the Listbox, the default pageSize value for the paging component will be set to the ListModel instead of the intended value.
The ListModel page value is not updated afterwards, which cause the Listbox to revert to a pageSize of 20 on the next navigation.
reproduce with:
test.zul:
<zk> <div viewModel="@id('vm')@init('ListboxPagingViewModel')"> <listbox model="@init(vm.myModel)" mold="paging" paginal="@init(myPaging)"/> <paging id="myPaging" pageSize="@init(vm.myPageSize)"/> </div> </zk>
ListboxPagingViewModel.java
public class ListboxPagingViewModel { private ListModelList myModel; private int myPageSize; @Init public void init(){ myPageSize = 5; myModel = new ListModelList(Locale.getAvailableLocales()); } public ListModelList getMyModel() { return myModel; } public int getMyPageSize() { return myPageSize; } }