Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-1938

Grid/Listbox doesn't bind activePage attribute as default binding

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 6.5.4
    • 6.5.3
    • Databind 2
    • Security Level: Jimmy
    • None

      <zk>
      	<zscript><![CDATA[
      		class TestVM {
      			private int pageIndex = 0;
      			public int getPageIndex() {
      				return pageIndex;
      			}
      
      			public void setPageIndex(int pageIndex) {
      				this.pageIndex = pageIndex;
      			}
      		}
      		
      		Object[] data = new Object[12];
      	]]></zscript>
      	<window apply="org.zkoss.bind.BindComposer"
      		viewModel="@id('vm') @init('TestVM')">
      		<intbox value="@bind(vm.pageIndex)"/>
      		<grid mold="paging" pageSize="3" 
      			activePage="@bind(vm.pageIndex)">
      			<columns>
      				<column label="col"/>
      			</columns>
      			<rows>
      				<row forEach="${data }">Item</row>
      			</rows>
      		</grid>
      		<listbox mold="paging" pageSize="3" 
      			activePage="@bind(vm.pageIndex)">
      			<listhead>
      				<listheader label="col"/>
      			</listhead>
      				<listitem forEach="${data }" label="Item"/>
      		</listbox>
      		
      	</window>
      </zk>
      

            Unassigned Unassigned
            jimmyshiau jimmyshiau
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: