-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
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)"/>
2 | No.2 Revision |
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)"/>
comment under VIRTUAL STATE LICENSE
3 | No.3 Revision |
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)"/>
comment post under VIRTUAL STATE LICENSE