-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
Ad 1. I don't know of any. And I think createComponents is also the correct answer here. I would compare it with a call to some business layer. What you can do is to add a callback interface implementation to the arg Map. Inside you can do binder.notify(this, "selectedItem");
In this way you don't pass the binder over. Passing the binder itself in ARG I would not consider elegant. Look in ZK's MessageBox class, they have EventListeners as callbacks since version 6.
Ad 2. Why would you want to reuse the same ViewModel? In the first VM you manage a list of objects. In the second VM you manage exactly one certain object. And this you pass over via ARG (selectedItem from first UI).