Wednesday, July 10, 2013

ZK:-Diffence between @load and @bind?

Hello friends today we will discuss about two very basic but powerful annotation of ZK Framework load and bind



When i started ZK framework i am also in the same situation what i mean confused? Why we are using load and why we are bind in zul file for binding, i knew that both are for binding the ViewModel or Java Class variables with zul page but when i have to use load and when i have to use bind its sometime confusing for beginner.

Today I will try to explain you about it .Here we can say in simple words
@load:- One way binding
@bind:- Two way binding


Still some confusion? its ok not a big deal ...Let me try to explain one more time
Let me explain things with some scenario,let us suppose we have a zk textbox now in this case how binding will work?


In Simple words if you want to show the value in zul file from your viewmodel use @load and if you want to show the value and update value of viewmodel variable from zul use @bind If Still confusion ? please ask in comment .:)

No comments:

Post a Comment