-
FEATURED COMPONENTS
First time here? Check out the FAQ!
If ViewModel's property is a map, we can write:
<label value="@load(vm.myMapping['myKey'])"/>
But then, when we need to update the label, we must write:
BindUtils.postNotifyChange(null, null, this, "myMapping");
So all properties from myMapping in the View will be updated instead of one - myKey. It would be great if the property in this model was myKey, so we can write:
BindUtils.postNotifyChange(null, null, this, "myKey");
Even for a lable like:
<label value="@load(vm.myFunction('myKey'))"/>
It would be great if in ViewModel we can define two methods:
Object getProperty(String name)
void setProperty(String name, Object value)
So in View we can call:
<label value="@load(vm.myKey)"/>
post under VIRTUAL STATE LICENSE
Asked: 2015-12-23 16:50:10 +0800
Seen: 32 times
Last updated: Dec 25 '15