0

Command send to wrong viewModel in nested case

asked 2017-01-09 08:33:35 +0800

aliabbas gravatar image aliabbas
1 1

updated 2017-01-09 08:34:48 +0800

Hello I am facing a problem, I am using two vm in zul file.

<window apply="org.zkoss.bind.BindComposer"
        viewModel="@id('vmparent') @init('net.ParentVm')">
 <window apply="org.zkoss.bind.BindComposer"
        viewModel="@id('vmchild') @init('net.ChildVm')">
 <button label="othercommand" onClick="@command('othercommand')"/>


 </window>
 </window>

I want to call "othercommand" from "net.ParentVm"

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-01-09 09:08:19 +0800

Darksu gravatar image Darksu
1991 1 4

Hello aliabbas,

Did you try using a Global Command?

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

Best Regards,

Darksu

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: 2017-01-09 08:33:35 +0800

Seen: 31 times

Last updated: Jan 09 '17

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