Details
-
New Feature
-
Resolution: Unresolved
-
Normal
-
None
-
6.5.1
-
None
Description
This is related to http://tracker.zkoss.org/browse/ZK-1201 but I think yet another way should be supported:
I would like to extract interface over view models for them to implement.
I want methods in this interface be methods used as data bind and command methods.
I want to add @Command and @NotifyChange on the methods on the interface without the need of repeating them in the View Model class.
this does not work - ZK probably only reads annotations from the View Model class itself.
My example:
interface VMContract {
SkillSupport getSkillSupport();
@Command
@NotifyChange("skillSupport")
void editSkill(@BindingParam("skill") Skill skill);
@Command
@NotifyChange("skillSupport")
void confirmEdit();
}
and I want VM to be able to declare:
@Override
public SkillSupport getSkillSupport()
@Override
public void editSkill(@BindingParam("skill") Skill skill)
@Override
public void confirmEdit()
without any of those @Command and @NotifyChange
I don't want to add @NotifyChange(superclass=true) on each of the methods, acceptable solution would be to configure it on a VM class level.