-
FEATURED COMPONENTS
First time here? Check out the FAQ!
![]() | 1 | initial version | |
I am just realising I made a mistake. The field in question (i.e. accountCategory) is a multi valued field. It returns List<short>.
So I adjusted your code snippet as follows:
<listbox model="@init(countryCodes)" mold="select" width="100px" <br=""> selectedItems="@bind(each.attributes.accountCategory.values)" multiple="true"> <template name="model" var="countryCode"> <listitem label="@init(countryCode) @converter(countryDisplayConverter)"/> </template> </listbox>
The code works.
However, I also want to add that the previous code I shared now works as well.
<listbox mold="select" width="100px" selecteditems="@bind(each.attributes.accountCategory.values)" multiple="true"> <listitem label="${each.description}" foreach="${accountCategory}" value="${each.code}"/> </listbox>
This code uses the generic lov class.
Good to know that zk offers different options to achieve the same functionality.
Thanks.
![]() | 2 | No.2 Revision |
I am just realising I made a mistake. The field in question (i.e. accountCategory) is a multi valued field. It returns List<short>.
So I adjusted your code snippet as follows:
<listbox model="@init(countryCodes)" mold="select" width="100px" The code works.
However, I also want to add that the previous code I shared now works as well.
<?variable-resolver class="com.LovResolver"?>
<listbox mold="select" This code uses the generic lov class.
Good to know that zk offers different options to achieve the same functionality.
Thanks.
![]() | 3 | No.3 Revision |
I am just realising I made a mistake. The field in question (i.e. accountCategory) is a multi valued field. It returns List<short>.
So I adjusted your code snippet as follows:
<listbox model="@init(countryCodes)" mold="select" width="100px"
selectedItems="@bind(each.attributes.accountCategory.values)" multiple="true">
<template name="model" var="countryCode">
<listitem label="@init(countryCode) @converter(countryDisplayConverter)" />
</template>
</listbox>
The code works.
However, I also want to add that the previous code I shared now works as well.
<?variable-resolver class="com.LovResolver"?>
<listbox mold="select" width="100px"
selectedItems="@bind(each.attributes.accountCategory.values)" multiple="true">
<listitem label="${each.description}" forEach="${accountCategory}" value="${each.code}"/>
</listbox>
This code uses the generic lov class.
Good to know that zk offers different options to achieve the same functionality.
Thanks.
![]() | 4 | No.4 Revision |
I am just realising I made a mistake. The field in question (i.e. accountCategory) is a multi valued field. It returns List<short>.
So I adjusted your code snippet as follows:
<listbox model="@init(countryCodes)" mold="select" width="100px"
width="100px"
selectedItems="@bind(each.attributes.accountCategory.values)"
multiple="true">
<template name="model" var="countryCode">
<listitem label="@init(countryCode)
@converter(countryDisplayConverter)" />
</template>
</listbox>
The code works.
However, I also want to add that the previous code I shared now works as well.
<?variable-resolver class="com.LovResolver"?>
<listbox mold="select" width="100px"
selectedItems="@bind(each.attributes.accountCategory.values)"
multiple="true">
<listitem label="${each.description}" forEach="${accountCategory}"
value="${each.code}"/>
</listbox>
This code uses the generic lov class.
Good to know that zk offers different options to achieve the same functionality.
Thanks.