Revision history [back]

click to hide/show revision 1
initial version

answered 2009-02-27 22:21:59 +0800

james gravatar image james

oh, i thought you meant to just not let edit, at all; not to be able to change (during run time) if you can edit it or not try this

<combobox id="cb" readonly="true">
<comboitem label="test1"/>
<comboitem label="test2"/>
</combobox>
<button label="readonly" onClick="cb.readonly=true"/>
<button label="editable" onClick="cb.readonly=false"/>

(or implement it however you want, but just change the "readonly" attribute)

edit: also, you might need to use "setReadonly" depending on how you implement it. http://www.zkoss.org/javadoc/3.5.2/zul/org/zkoss/zul/Combobox.html (Methods inherited from class org.zkoss.zul.impl.InputElement)

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