-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi, I'm using an autocomplete combobox to let the input text, and optionally pick items from the autocomplete list. However, the same combobox, based on application flags, could also need the user to enter text securely (that is, using the setType("password") method). But setting the password type on a combobox seems to do nothing, even though it's actually documented and the combobox is simulated using Input fields. Is there any way to make the setType actually work?
I'm using Zk 8.0.5 in Java code (no zul).
Thanks
You are right, this case has not been considered in the client side implementation for combobox (even though the server side Component inherits from org.zkoss.zul.Textbox, the client side Widget does not share this functionality with the zul.inp.Textbox)
As a quick workaround a JS listener can be added
<combobox xmlns:w="client" w:onBind="this.getInputNode().type='password';" />
also from Java code:
passwordCombo.setWidgetListener("onBind", "this.getInputNode().type='password';");
runnable example: http://zkfiddle.org/sample/2rgbd6s/1-combobox-with-type-password#source-2
I also posted the issue: ZK-3723
UPDATE:
Will be fixed in ZK 8.5
Asked: 2017-07-07 15:15:02 +0800
Seen: 36 times
Last updated: Sep 05 '17
Use a combobox to create a new item
Combobox OnChange Event too slow
How to capture onScroll Event of Combobox
combobox does not scroll autocompleted text into view
I want to take different value from label(value) and pass to @bind object
Combobox sometimes clears the selected item
zk combobox filtering option is not working inside listbox .