-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi, everyone. Can I set logic in file .zul? Like I have any value and I set if a value is 0, then I just show empty textbox, but if a value is more than 0, I show that value in textbox. Can I set that logic in the file of .zul? Thank you..
yes there are several ways to express logic you can:
use a ternary operator (?:) in EL expressions:
${someVariable eq 0 ? '' : someVariable}
use the special zuml attributes (if/unless) to render components conditionally:
<textbox if={someExpression}/>
with ZK EE and zuti.jar use shadow elements <if>/<switch> (since ZK 8)
<if test="${someExpression}">
<textbox/>
</if>
Asked: 2021-08-01 00:12:26 +0800
Seen: 5 times
Last updated: Aug 01 '21