0

how to access a viewmodel method in the template

asked 2016-10-19 14:47:12 +0800

lcmuniz2010 gravatar image lcmuniz2010
24

I have a window like this

< window title="Book" border="normal" viewModel="@id('vm')@init('com.eficaztech.biblio.view.BookView')" apply="org.zkoss.bind.BindComposer" self="@{define(content)}" >

And I want a < button onclick="somemethodin_BookView"> in the template.zul.

There is any way to do that? Thanks.

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-10-19 16:25:59 +0800

chillworld gravatar image chillworld flag of Belgium
5357 4 9
https://github.com/chillw...

updated 2016-10-19 16:26:31 +0800

Just use the @command('someMethodName') in the zul and in viewmodel :

@Command
public void someMethodName(){
    ...
}
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: 2016-10-19 14:47:12 +0800

Seen: 17 times

Last updated: Oct 19 '16

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