0

Access view model in controller

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

JustinFrost gravatar image JustinFrost
145 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.

Thanks.

delete flag offensive retag edit

Comments

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
0

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

micsigen gravatar image micsigen
1

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();
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: 2013-06-03 09:10:15 +0800

Seen: 38 times

Last updated: Jun 04 '13

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