-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hy everybody,
I got a simple question:
DataBinding works fine with combobox, I have a tld returning a ListModelList like this:
<combobox id="role" width="225px" constraint="no empty" model="${glims:getList('role')}"/>
and the combobox is generated correctly.
What if I need to customize the value and label of the comboitem which are generated this way?
Something like:
<combobox id="role" width="225px" constraint="no empty" model="${glims:getList('role')}"/> <comboitem label="LABEL CUSTOMIZED ${each}" value="CUSTOMIZED ${each}"/> </combobox>
I found an old talk but comboitem does not have self anymore...
Thanks,
Stefano
Found a stupid error so far, wrong notation, it should be at least:
<combobox id="role" width="225px" constraint="no empty" model="${glims:getList('role')}"/> <comboitem self="@{each}" label="LABEL CUSTOMIZED @{each}" value="VALUE CUSTOMIZED @{each}"/> </combobox>
I did not solve the issue but changed approach... just for those who will find this unanswered post ;)
<combobox id="reference" width="225px" constraint="no empty"> <zk forEach="${glims:getList('reference')}"> <comboitem label="${each}LABEL" value="${each}VALUE" /> </zk> </combobox>
Hi,
just to confirm, that "self" works with data-binding:
<combobox id="combobox1" model="@{win$composer.objectList, access='load'}" constraint="no empty,strict"> <comboitem self="@{each=entry}" value="@{entry}" label="@{entry.label}" /> </combobox>
Yes, I definitively mixed up iteration & data binding... thanks for the feedback!
Asked: 2011-02-03 08:19:41 +0800
Seen: 872 times
Last updated: Feb 09 '11