-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi Can some one let me know how to store a key value pair in a listbox or selectbox with using zscript ??
I want html like where user selects a value and respective key is sent to the back End.
My listbox currently looks like this .
<listbox mold="select"
model="@load(vm.partCategoryList)"
selectedItem="@bind(each.piecePartRegVO.partCat)"
>
Hello PRATIKKAR,
In order to understand better how zk uses collections and selections pleas refer to the following document:
http://books.zkoss.org/wiki/ZKDeveloper'sReference/MVVM/DataBinding/Collectionand_Selection
Best Regards,
Darksu
Asked: 2015-10-20 13:08:35 +0800
Seen: 36 times
Last updated: Nov 20 '15
the selectedItem is normally stored in your vm like ex :
chillworld ( 2015-10-20 14:16:02 +0800 )edit@bind(vm.selectedPartCategoryList)
or@bind(vm.myBean.partCat)
But how does it solve my problem ?? can you please explain a little more if you have a solution ..
PRATIKKAR ( 2015-10-21 04:45:19 +0800 )edityou describe the problem not very good. You speak of respective key, but each is an object. are the objects in partCategoryList Entry of a map? or do ou just want the index, and why do you need the index? The better you describe your problem the better we can help.
chillworld ( 2015-10-21 07:53:23 +0800 )edit