-
Bug
-
Resolution: Fixed
-
Normal
-
8.5.1.1
-
Security Level: Jimmy
-
None
-
zk framework
-
ZK 8.5.2 S1
We want to use MatchMedia for fluid responsiveness, but the binder implementation scan the MatchMedia annotation on the final Methods of the View Model, this cause that the same code, must be repeated on every ViewModel of the application, Why just don't change .getDeclaredMethods for .getMethods in order to allow the reuse of code, for example:
//Code must be repeated on every VM, why not allow to put it on a super class VM private String layoutTemplate; @MatchMedia("all and (max-width: 768px) and (min-width: 415px)") @NotifyChange("layoutTemplate") public void ipad(@ContextParam() { this.layoutTemplate = "iPad_layout"; } @MatchMedia("all and (max-width: 414px)") @NotifyChange("layoutTemplate") public void mobile(@ContextParam() { this.layoutTemplate = "mobile_layout"; } @MatchMedia("all and (min-width: 769px)") @NotifyChange("layoutTemplate") public void desktop() { this.layoutTemplate = "desktop_layout"; } //getters and setters ......
- relates to
-
ZK-4364 @MatchMedia is not working in private methods after ZK-3911
- Closed