-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I have commbobox with two comboitems valid and invalid
<combobox readonly="true"
value="@load(vm.status.isValid eq 'Y'? 'valid':'invalid')"
<comboitem label="Valid" value="@bind(vm.status.isValid)"/>
<comboitem label="Invalid" value="@bind(vm.status.isValid)"/>
</combobox>
I want to pass to IsValid "Y" for valid label and "N" for invalid label. Can someone please help
If I am understanding the question, there is a isValid method on your viewModel, if so then you reference this using the property name not the method name, eg:
<comboitem label="Valid" value="@bind(vm.status.valid)"/>
<comboitem label="Invalid" value="@bind(vm.status.valid)"/>
No , isValid is field from entity "status". The solution I use is :
<combobox readonly="true" value="@load(vm.status.isValid eq 'Y'? 'Valid':vm.status.isValid eq 'N'?'InValid':'')" disabled="@bind(vm.disabledComponent)" selectedItem="@bind(vm.status.isValid)"> <comboitem label="Valid" value="Y" />
<comboitem label="InValid" value="N"/> </combobox>
Thus the user will see valid and invalid, but I will take value of "Y" and "N" for my field "IsValid" from "status" entity.
Asked: 2017-01-27 08:13:04 +0800
Seen: 32 times
Last updated: Feb 01 '17
Problem binding values to a composite component
How to access static member field of a class in zul without zscript
How can i load a constant in .zul
MVVM Validator: class not found ? [closed]
MVVM tab box - delay @load until tab pane displayed?
mvvm, load or save with after or before for seach command
how to fire an event when a variable value loaded through VM
is there any event trigger from zk component on binding ?
ZK team plans to dispose of Composer EventQueues no longer in scope? [closed]