-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
Do you kjnow how to use not or ! for a value with MVC ?
For exemple in my model I have a value named ImTrue whitch always return true.
So, this is of course always ckecked (it's OK)
<label value="checked" /><checkbox checked="@{model.ImTrue}"/>
I'd like to check when the value is false.
I tried this :
<label value="**NOT** checked" /><checkbox checked="@{**not** model.ImTrue}"/>
or
<label value="**NOT** checked" /><checkbox checked="@{**!** model.ImTrue}"/>
or ....
How can I do ?
I know that I can write a getter boolean getImFalse { return not getImTrue()} but I'd like something nicer in my zul.
Any idea ?
Thank you
try something like this
<label value="checked" /><checkbox checked="@load(vm.imTrue eq true ? 'false' : 'true')"/>
The above code in MVVM Architecture you can change it in MVC as well it should work.
Thank you for your answer. My problem is xith MVC and not MVVM.
Do you know if this kind of syntax exists for MVC (and not MVVM) ?
Thank you
Asked: 2013-08-20 06:35:06 +0800
Seen: 22 times
Last updated: Sep 01 '13