combobox with password type zk 8.0.5

asked 2017-07-07 15:15:02 +0800

claudioveryant gravatar image claudioveryant
9 1

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


delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-08-11 11:20:49 +0800

cor3000 gravatar image cor3000
4466 2 7
ZK Team

updated 2017-09-05 11:29:50 +0800

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


Will be fixed in ZK 8.5

  • testable maven version: 8.5.0.FL.20170904(-Eval)
  • download FL
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




Asked: 2017-07-07 15:15:02 +0800

Seen: 32 times

Last updated: Sep 05 '17

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