0

Passing objects from master zul to include

asked 2016-11-04 18:14:18 +0800

psinalberth gravatar image psinalberth
52 6

Hi, I have a parent.zul and child.zul. The first one has a combobox for choosing a movie, for example, and the other has a bandbox with a listbox for selecting a room. I'm using <include> to load the child zul. As you can imagine, each zul has its own viewModel like parentVMand childVM. I'd like to pass to child zul the selected movie and use it as a criterion for a query to find which rooms are playing the referred movie. I tried to get the movie with @Init void init(@BindingParam("selectedMovie") Movie selectedMovie) but it's not working because when the zul are created there is no movie selected. It is possible to do that? Passing an object from a zul to another by executing a method on parentVM?

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-11-06 08:23:22 +0800

Darksu gravatar image Darksu
1991 1 4

Hello psinalberth,

You could use the Global Command Binding.

http://books.zkoss.org/zk-mvvm-book/8.0/databinding/globalcommand_binding.html

Best Regards,

Darksu

link publish delete flag offensive edit
0

answered 2016-11-07 01:00:11 +0800

psinalberth gravatar image psinalberth
52 6

Thanks Darksu, it worked for me!

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: 2016-11-04 18:14:18 +0800

Seen: 50 times

Last updated: Nov 07 '16

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