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

ZK Bind command doesn't work with cluster env

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 6.5.1, 6.0.4
    • 6.0.2, 6.5.0
    • Clustering, Databind 2
    • None
    • None

      public class MyViewModel implements Serializable {
      
      	private String msg;
      	
      	@Init
      	public void init() {
      
      	}
      
      	
      	
      	@Command
      	@NotifyChange("msg")
      	public void doLoginUser() {
      		msg = "Login User" + new Date();
      	}
      	
      	public String getMsg() {
      		return msg;
      	}
      	
      }
      
      <zk>
      	<window apply="org.zkoss.bind.BindComposer" 
      		viewModel="@id('vm')@init('org.zkoss.test.cluster.ZKClusterMVVM.MyViewModel')"
      		title="Hello Spring Secuirty" border="normal"
      		width="400px">
      		<vlayout>
      			<button label="click (need to login otherwise will not bind event)" 
      				onClick="@command('doLoginUser')"></button>
      			<groupbox>
      				<caption label="massage"/>
      				<label value="@load(vm.msg)"/>
      			</groupbox>
      		</vlayout>
      		
      	</window>
      </zk>
      

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

              Created:
              Updated:
              Resolved: