Access view model in controller

asked 2013-06-03 09:10:15 +0800

JustinFrost gravatar image JustinFrost
139 1 6

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.


delete flag offensive retag edit


Can you please elobrate your problem a bit more

sjoshi ( 2013-06-03 10:18:08 +0800 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2013-06-04 17:20:41 +0800

micsigen gravatar image micsigen

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.

    private Grid propertyGrid;


    PropertyViewModel viewModel = 
    (PropertyViewModel) BinderUtil.getBinder(propertyGrid).getViewModel();
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

1 follower



Asked: 2013-06-03 09:10:15 +0800

Seen: 33 times

Last updated: Jun 04 '13

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