-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
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>
<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 just the item that the user have 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. Is there something i'm doing wrong?
2 | No.2 Revision |
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>
<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 just the item that the user have 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. Is there something i'm doing wrong?
3 | No.3 Revision |
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 The problem is when i I push the button Salva i Salva, I get on the vm.pickedItemSet just only the item that the user have chosen 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 model, I get just the one clicked.
Is there something i'm doing wrong?clicked, whereas I want all three. How do I fix this?