-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi all,
Is there any way to access (wire) a view model in a controller class. I need to execute a method in the viewmodel before doing something in my controller.
Thanks.
I know one way to reach the view model trough the reference of Component that Bind attached.
For example the Component is a org.zkoos.zul.Grid.
@Wire
private Grid propertyGrid;
...
PropertyViewModel viewModel =
(PropertyViewModel) BinderUtil.getBinder(propertyGrid).getViewModel();
Asked: 2013-06-03 09:10:15 +0800
Seen: 38 times
Last updated: Jun 04 '13
Can you please elobrate your problem a bit more
sjoshi ( 2013-06-03 10:18:08 +0800 )edit