-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
8.0.2
-
{{<listbox model="@load(vm.etiquetas)"
checkmark="true" multiple="true"
selectedItems="@bind(fx.etiquetas)"
emptyMessage="No hay etiquetas"
height="100%" width="240px">
<listhead>
<listheader width="25px" />
<listheader label="Etiquetas"
iconSclass="fa fa-tags fa-lg" />
</listhead>
<template name="model" var="item">
<listitem>
<listcell />
<listcell iconSclass="z-icon-tag"
style="@load(c:cat('color: ',colores[item.id mod 10]))"
label="@load(item.nombre)" />
</listitem>
</template>
</listbox>
}}{{<listbox model="@load(vm.etiquetas)" checkmark="true" multiple="true" selectedItems="@bind(fx.etiquetas)" emptyMessage="No hay etiquetas" height="100%" width="240px"> <listhead> <listheader width="25px" /> <listheader label="Etiquetas" iconSclass="fa fa-tags fa-lg" /> </listhead> <template name="model" var="item"> <listitem> <listcell /> <listcell iconSclass="z-icon-tag" style="@load(c:cat('color: ',colores [item.id mod 10] ))" label="@load(item.nombre)" /> </listitem> </template> </listbox> }}
Using 8.0.2 and the new form binding, when "etiquetas" property of form (of List<Etiqueta> type) has more than one element, none of them is selected so, selectedItems is empty.
However, if vm.etiquetas is loaded using proxy manually, it works
If etiquetas is loaded in MV this way:
etiquetas = etiquetaService.findAll(); ===> selectedItems is empty if fx.etiquetas.size > 1
If etiquetas is loaded in MV this way:
etiquetas = ProxyHelper.createProxyIfAny(etiquetaService.findAll()); ==> ok
I think We should not need to do that.