-
Bug
-
Resolution: Fixed
-
Normal
-
None
-
None
-
None
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>