0

Combobox readonly not works

asked 2011-07-25 03:03:50 +0800

bricecol gravatar image bricecol
43 4

Hi.

My working Zk version: 5.0.7.1

It's my 3rd project with Zk and I don't understand why the combobox attribute "readonly" not works anymore.

With this simple code:

<combobox readonly="true">
  <comboitem label="Choice 1" value="c1"/>
  <comboitem label="Choice 2" value="c2"/>
  <comboitem label="Choice 3" value="c3"/>
</combobox>

getSelectedIdex() returns -1 (so getSelectedItem() returns null).
==> But if I remove the readonly attribute it works normally :(

Does someone have an idea?
Thanks!

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2011-07-31 19:46:42 +0800

samchuang gravatar image samchuang
4084 4

Hi


I test the code on zksandbox, it's working fine

<zk>
<combobox id="cm" readonly="true">
  <comboitem label="Choice 1" value="c1"/>
  <comboitem label="Choice 2" value="c2"/>
  <comboitem label="Choice 3" value="c3"/>
</combobox>
<button label="Index" onClick="alert(cm.getSelectedIndex())"></button>
</zk>

link publish delete flag offensive edit
Your reply
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

RSS

Stats

Asked: 2011-07-25 03:03:50 +0800

Seen: 1,304 times

Last updated: Jul 31 '11

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