Selectbox Template"

From Documentation
(Created page with "{{ZKDevelopersReferencePageHeader}} Similar to Listbox, you can render a selectbox with a template. However, noti...")
 
m ((via JWB))
Line 19: Line 19:
 
=Version History=
 
=Version History=
 
{{LastUpdated}}
 
{{LastUpdated}}
{| border='1px' | width="100%"
+
{| class='wikitable' | width="100%"
 
! Version !! Date !! Content
 
! Version !! Date !! Content
 
|-
 
|-

Revision as of 08:18, 11 January 2022


Selectbox Template


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

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

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 : 2022/01/11


Version Date Content
6.0.0 November 2011 The selectbox component was introduced.
6.0.0 July 2011 The template feature was introduced.



Last Update : 2022/01/11

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