main.zul
...@init('Main')...
<zk>
...
<include src="north.zul"/>
<include src="@bind(vm.pageSource)"/>
...
<zk>
north.zul
...@init('North')...
<zk>
...
<a onClick="@command('linkClicked')">link</a>
...
<zk>
Main.java
...
private String pageSource = "content1.zul"
//getter setter of PageSource
North.java
...
@command
public void linkClicked(){
// access main object and call main.setPageSource("content2.zul") (how to do this ?)
}
Now if a http
request come for main.zul then instance of Main and North will be created and is there anyway i can access Main object ?
Is there any thing like ZKcontext
, where i can ask for session scope instances ?