0

data filter example - load foodModel

asked 2015-01-29 16:59:14 +0800

anetkia102 gravatar image anetkia102
21 1

Hello,

I am trying to analyse one of the demos published on ZK Framework site - the data filter one. I understand that it represents MVVM model, and zul file has commands to bind zul with viewModel. I am getting confused though with line 4 in zul: <grid model="@load(vm.foodModel)"> Not sure where the foodModel property is defined in FilterViewModel class? Is that because it is mention in @NotifyChange?

I realise it might me a basic question, but I would appreciate any explanation. Thank you.

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2015-01-29 17:04:28 +0800

Alecs gravatar image Alecs
103 5

@load(vm.foodModel) is binded in the VM with the method getFoodModel the @NotifyChange annotation is to notify the binder that after the invocation of changeFilter method something has changed in the zul

link publish delete flag offensive edit
1

answered 2015-01-29 22:34:10 +0800

Darksu gravatar image Darksu
1991 1 4

Hello anetkia102,

In order to better understand the mvvm design pattern please refer to the following url:

http://books.zkoss.org/wiki/ZKDeveloper%27sReference/MVVM

And regarding your question please refer to the following url:

http://books.zkoss.org/wiki/ZK%20Developer's%20Reference/MVVM/ViewModel/Data%20and%20Collections

Best Regards,

Darksu

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: 2015-01-29 16:59:14 +0800

Seen: 14 times

Last updated: Jan 29 '15

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