0

Storing key value in listbox zul

asked 2015-10-20 13:08:35 +0800

PRATIKKAR gravatar image PRATIKKAR
3 2

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)"
                     >
delete flag offensive retag edit

Comments

the selectedItem is normally stored in your vm like ex : @bind(vm.selectedPartCategoryList) or @bind(vm.myBean.partCat)

chillworld ( 2015-10-20 14:16:02 +0800 )edit

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 )edit

you 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

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-11-20 16:50:33 +0800

Darksu gravatar image Darksu
1991 1 4

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

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2015-10-20 13:08:35 +0800

Seen: 36 times

Last updated: Nov 20 '15

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More