0

ComboBox GetValue in MVVM pattern

asked 2013-07-15 05:58:27 +0800

kleponboy gravatar image kleponboy flag of Indonesia
54 5
http://stupidprogrammers....

Let's say i have a comboBox and i enter manually the comboitem, like this:

                  <combobox sclass="mycombo" readonly="true">
                        <comboitem label="A"
                            description="Price Code" value="A" />
                        <comboitem label="B"
                            description="Destination code" value="B" />
                    </combobox>

in MVC i could easily assign id into the combobox and get the value

   if(combo1.getValue()== "A"){
   //some code here
   }

but in MVVM, i don't know how to do it.

Thanks,

Klepon

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2013-07-15 06:02:45 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

Here are you can check zk-combobox-with-selectoption

zk-combobox-with-item-rendered

link publish delete flag offensive edit
0

answered 2013-07-15 06:16:54 +0800

progamerdotcom gravatar image progamerdotcom
117 5

make a variable in viewmodel for example myValue, to do setter & getter

then add value="@bind(vm.myValue)"

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: 2013-07-15 05:58:27 +0800

Seen: 23 times

Last updated: Jul 15 '13

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