-
FEATURED COMPONENTS
First time here? Check out the FAQ!
how to populate the value in another zule page provided by user inside textbox ?
You can also see running demo here
For MVC
For MVVM
1.zul
<zk >
<window apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('com.test.TestViewModel')">
<textbox value="@load(vm.caseName)" />
</window>
</zk>
TestViewModel.java
private String caseName;
public String getCaseName() {
return caseName;
}
public void setCaseName(String caseName) {
this.caseName = caseName;
}
// Write this code in your method for calling your another zul with parameter.
Map args = new HashMap();
args.put("caseName", caseName);
Executions.createComponents("2.zul", view, args);
Collect this caseNumber on the View Model of 2.zul and populate this caseNumber on 2.zul.
private String caseNumber;
@AfterCompose
public void afterCompose(@ContextParam(ContextType.VIEW) Component view, @ExecutionArgParam("caseNumber") String argCaseNumber){
this.caseNumber=argCaseNumber;
}
You can find more examples here
Asked: 2013-07-08 08:17:09 +0800
Seen: 31 times
Last updated: Jul 08 '13
Do not update to ZK Studio 2.0
Catch Server 503 Error - Or Catch Stale Page
how to save spreadsheet data into postgres database?
One controller file with multiple zul file
Why am I getting authentication error for ZK studio activation?
How can i make Tomcat (with virtual hosts) to parse the zul page in subfolders?
Can u give me the full code for this
vikku ( 2013-07-08 12:58:59 +0800 )edit