0

Running method on ViewModel fires command.

asked 2012-08-09 10:13:52 +0800

shumy gravatar image shumy
244 1

updated 2012-08-09 10:15:55 +0800

I have build a way to simplify the communication of the main view with possible custom Message Boxes.
For example, when I want to update a row in a grid, I open a modal window (custom box) with the form.

The problem is that some information needs to pass between the "main view" and the "custom box" maintaining the use and consistency of binder information.

For that I usually invoke "command methods" with org.zkoss.bind.Binder.postCommand(...). Although this works fine, it seems to me that is a complex way (relative to simple method invoke) for my simple use case.

With that I also have a lot of other help code to create the "custom box" programmatically, to get the binder from, and the top component.

So, because I create the "custom box" view in the "main view" code, I already have direct access to the "custom box" command methods. Also, since the "main view" is the parent and the owner of the "custom box", it makes sence to me to invoke the methods directly, instead of post a command!

Is there any way to simplify the process of transmitting information between ViewModels without postCommand?

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest
link publish delete flag offensive edit
Your reply
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

RSS

Stats

Asked: 2012-08-09 10:13:52 +0800

Seen: 74 times

Last updated: May 15 '13

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