Chosenbox Template

From Documentation
Revision as of 03:38, 5 April 2012 by Benbai (talk | contribs) (Created page with "{{ZKDevelopersReferencePageHeader}} Similar to Listbox, you can render a chosenbox with a template. However, noti...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Chosenbox Template


Similar to Listbox, you can render a chosenbox with a template. However, notice that, unlike other components, chosenbox doesn't allow any child component, so you have to render each item as a string. For example,

<chosenbox model="${users}" onSelect='alert(model.get(event.getData()));'>
	<template name="model">
		Name is ${each}
	</template>
</chosenbox>

where we assume there is a list model (ListModel) called users such as:

ListModelList model = new ListModelList(new String[] { "Tony", "Ryan", "Jumper", "Wing", "Sam" });

Version History

Last Update : 2012/04/05


Version Date Content
6.0.1 April 2012 The chosenbox component was introduced.
6.0.0 July 2011 The template feature was introduced.



Last Update : 2012/04/05

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.