New Features of ZK 6.5.1
From Documentation
Revision as of 06:14, 3 December 2012 by Tmillsclare (talk | contribs) (Created page with "{{Template:Smalltalk_Author| |author=Timothy Clare, Potix Corporation |date=December 4, 2012 |version=ZK 6.5.1 }} =The Default Command for MVVM= ZK 6.5.1 brings a default comma...")
Author
Timothy Clare, Potix Corporation
Timothy Clare, Potix Corporation
Date
December 4, 2012
December 4, 2012
Version
ZK 6.5.1
ZK 6.5.1
The Default Command for MVVM
ZK 6.5.1 brings a default command for MVVM. When a binder receives a command, it starts to find ViewModel's command methods by matching its name. If the binder cannot find a matched method, it invokes default command method.
Assume that there are only two command methos in the below ViewModel. If we trigger a command "exit", a binder invokes the default command method defaultAction() because it cannot find a command method named "exit".
public class OrderVM {
@Command
public void newOrder(){
...
}
@DefaultCommand
public void defaultAction(){
...
}
}
Download & other resources
Comments
Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License. |