'Zk framework 6.5.3 binding with composer using E.L

I am using this code. Which is working very good.

<window id="win" xmlns:w="http://www.zkoss.org/2005/zk/client" apply='MyComposer'>
<textbox value="@{$composer.student.name}"/>

But i want to use something like this

<cell width='$composer.fullWidth?"70%":"50%"'>

In my composer I have a boolean fullWidth with the proper getter but I cannot reference it with the composer. I have tried a lot but nothing seems to work.

I have try

<cell width='@{$composer.fullWidth}?"70%":"50%"'>
<cell width='{$composer.fullWidth}?"70%":"50%"'>
<cell width='@{composer.fullWidth}?"70%":"50%"'>

Another question: if I have a code like this:

<textbox id='test' if='expression'/>

How can I the or use the if using Java code? Is it not possible?

Something like:

test.setIf(boolean???????)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source