Revision history [back]

click to hide/show revision 1
initial version

answered 2016-03-23 10:27:23 +0800

chillworld gravatar image chillworld flag of Belgium

https://github.com/chillw...

Quick fix => copy class, past it in your project (same FQN) and alter the startsWidth to contains.

Good fix =>

ZK should update this line :

s.toLowerCase(java.util.Locale.ENGLISH).startsWith(prefix)

To :

match(s,prefix)

where method match:

protected boolean match(String s, String prefix) {
    return s.toLowerCase(java.util.Locale.ENGLISH).startsWith(prefix);
}

Advantage is when subclassing this class => you can override the match method and implement your own one. (I'll notify ZK of this topic)
With the subclass you can use the chosenbox like this :

<chosenbox use="my.path.MyChosenbox" ... />

Greetz chill.

Quick fix => copy class, past it in your project (same FQN) and alter the startsWidth to contains.

Good fix =>

ZK should update think about updating this line :

s.toLowerCase(java.util.Locale.ENGLISH).startsWith(prefix)

To :

match(s,prefix)

where method match:

protected boolean match(String s, String prefix) {
    return s.toLowerCase(java.util.Locale.ENGLISH).startsWith(prefix);
}

Advantage is when subclassing this class => you can override the match method and implement your own one. (I'll notify ZK of this topic)
With the subclass you can use the chosenbox like this :

<chosenbox use="my.path.MyChosenbox" ... />

Greetz chill.

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