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

Cannot bind to include arg

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.5.1
    • Component/s: Databind 2
    • Labels:
      None

      Description

      package org.zkoss.zktest.bind.issue;
      
      import org.zkoss.bind.annotation.Command;
      import org.zkoss.bind.annotation.NotifyChange;
      
      public class B01472BindIncludeArg {
      
      	String staticValue = "ABC";
      	int t=0;
      
      	public String getStaticValue() {
      		return staticValue;
      	}
      
      	public void setStaticValue(String staticValue) {
      		this.staticValue = staticValue;
      	}
      	
      	public String getZul(){
      		return "B01472BindIncludeArgInner.zul?t="+t++;
      	}
      	
      	@Command
      	@NotifyChange("zul")
      	public void reload(){
      		
      	}
      }
      
      
      package org.zkoss.zktest.bind.issue;
      
      import org.zkoss.bind.annotation.ExecutionArgParam;
      import org.zkoss.bind.annotation.Init;
      import org.zkoss.bind.annotation.ScopeParam;
      
      public class B01472BindIncludeArgInner {
      
      	String staticValue;
      	
      	@Init
      	public void init(@ExecutionArgParam("sValue") String staticValue){
      		this.staticValue = staticValue;
      	}
      
      	public String getStaticValue() {
      		return staticValue;
      	}
      
      	public void setStaticValue(String staticValue) {
      		this.staticValue = staticValue;
      	}
      }
      
      
      <zk>
      <label multiline="true">
      1.you should see all static values are ABC
      </label>
      	<window 
      		title = "Outter Window"
      		apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('org.zkoss.zktest.bind.issue.B01472BindIncludeArg')" >
      		<vlayout>
      			<hlayout>
      				Static Value : <textbox id="tb1" value="@bind(vm.staticValue)"/> 
      			</hlayout>
      			<hlayout>
      				Static Value : <label id="lb1" value="@load(vm.staticValue)"/> 
      			</hlayout>
      		</vlayout>
      		<button id="btn1" label="reload" onClick="@command('reload')" />
      		<div>
      			<include sValue="@load(vm.staticValue)" src="@load(vm.zul)" mode="instant" />
      		</div>
      	</window>
      </zk>
      
      <zk>
      	<window 
      		title = "Inner Window"
      		apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('org.zkoss.zktest.bind.issue.B01472BindIncludeArgInner')" >
      		<vlayout>
      			<hlayout>
      				Static Value : <label id="lb2" value="@load(vm.staticValue)"/> 
      			</hlayout>
      		</vlayout>
      	</window>
      </zk>
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dennis dennis
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: