-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello, that's my code:
<listbox id="boxFirma" multiple="true"
visible="@load(vm.opzioneSelezionata eq 'firma' ? 'true' : 'false')"
checkmark="true" width="400px" height="200px"
model="@bind(vm.opzioniFirma)"
selectedItems="@bind(vm.pickedItemSet)">
<template name="model" var="item"
status="s">
<listitem selected="@bind(item.preSelected)">
<listcell label="@bind(item.valore)" />
</listitem>
</template>
</listbox>
<button label="Salva" style="margin-top:10px" disabled="@load(empty vm.pickedUser)"
onClick="@command('salvaPersonalizzazioneUtente')" />`
The problem is when I push the button Salva, I get on the vm.pickedItemSet only the item that the user has just chosen, but nothing about the preselected items -> 'listitem selected="@bind(item.preSelected)" ' . So if there were 2 items preselected and one clicked by the user on the view model, I get just the one clicked, whereas I want all three. How do I fix this?
Hello fabriko,
You could accomplish your task by using java code as shown at the following example (The example is in mvc, but the logic is the same):
Best Regards,
Darksu
Asked: 2015-03-06 09:36:20 +0800
Seen: 19 times
Last updated: Mar 09 '15
ZK Listbox Selectitems issue with Set
How to stop a bug from a listbox?
Cannot Change Listbox Header color & Background
Keyboard navigation in listbox
Can not display data in listbox
listbox with nonSelectabletags inplace new listitem
Input invoice using inline listbox
Change color to hover listitem listbox zk7 + Atlantic Theme
Listbox with autopaging causes constant row flickering
zk listbox getItems() returns null for item.getValue() if not scrolled fully