-
FEATURED COMPONENTS
First time here? Check out the FAQ!
ZK needs to support the use case of when the activePage does not initialize to 0 when using the paging component with MVVM. This would simply require for setTotalSize() to be called before setActivePage(). setActivePage() gets called first during MVVM and only allows for 0 since totalSize during construction is 1. The direct Java constructor already handles this by calling setTotalSize() first, but via MVVM, it does not. I tried to hack it by creating my own IntermediatePaging class which extends Paging, but the @save direction did not work.
USE CASES
Simply, this should not throw an exception (assuming we have the data):
<paging pageSize="10" totalSize="100" activePage="33"/>
For my case and VM matching numbers above:
<paging pageSize="@load(searchvm.pageSize)" totalSize="@load(searchvm.totalSize)" activePage="@bind(searchvm.activePage)" onPaging="@command('onPaging')"/>
There is an similar issue: ZK-1696, currently you can use a custom component as a workaround as below:
Asked: 2013-07-13 00:06:38 +0800
Seen: 18 times
Last updated: Jan 08 '14
Databinding and auto-complete on combobox
Composite component and bind in ZK 6
How to detach / reattach MVVM windows?
Is there a way to resolve view model properties as input to client side javascripts?
How can I synchronize data in a ListBox in MVVM ? [closed]
MVVM Validator: class not found ? [closed]
How to Call Child ViewModel Method from Parent Window? [closed]