0

pass variable between pages

asked 2013-09-28 13:05:43 +0800

daovallec gravatar image daovallec
11 2

I have this code in zk:

@Command
public void showModal(@BindingParam("languageContributionStatus") UserStatus mnoList) {
    //create a window programmatically and use it as a modal dialog.
    final HashMap<String, Object> map = new HashMap<String, Object>();
    setPickedItemSet(mnoList.getMnoList());
    map.put("mnoList", mnoList.getMnoList());

        win = (Window) Executions.createComponents("/comListMnosUser.zul", null, map);

        win.doModal();

}

In this code i have a page and i create a window with other page, in my other page:

<zk>    

 <window id="CreateList" border="normal" mode="modal" width="320px"
            apply="org.zkoss.bind.BindComposer"
            viewModel="@id('vm') @init('com.UserMno')">
    <label value="First Name"></label>
    <listbox model="@bind(vm.allMno)" checkmark="true" multiple="true" selectedItems="@bind(vm.mnoList)"/>
    <button id="SaveBtn" hflex="1" label="Save" onClick="@command('save', mnosL=vm.mnoList)" />
</window>

</zk>

Then i need save the variable mnoList to use in the previous page, but i can not use Excecution.createComponent, because i need only close the window because i have win.doModal();

And use the variable mnoList, but i do not know how can i pass this variable to use in the other page.

Somebody can help me??

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-09-29 02:56:13 +0800

Senthilchettyin gravatar image Senthilchettyin flag of India
2615 3 8
http://emrpms.blogspot.in...

Check here

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2013-09-28 13:05:43 +0800

Seen: 43 times

Last updated: Sep 29 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More