Colorbox Bug?

asked 2016-06-21 07:37:20 +0800

IngoB gravatar image IngoB flag of Germany
256 6


I got a colorbox and want to track the change of color.

So I read the Component Reference and it says: Supported Events: onChange => Event: InputEvent

So I added an Eventlistener (see example @ZKFiddle)

colorbox.addEventListener(Events.ON_CHANGE, new EventListener<InputEvent>() {
    public void onEvent(InputEvent event) throws Exception {
       System.out.println(event.getPreviousValue() +" => " +event.getValue());

java.lang.ClassCastException: org.zkoss.zk.ui.event.Event cannot be cast to org.zkoss.zk.ui.event.InputEvent

Is this a bug?

delete flag offensive retag edit


if you make it a normal Event and look what class is behind, what does it say?

chillworld ( 2016-06-21 08:00:10 +0800 )edit

class org.zkoss.zk.ui.event.Event

IngoB ( 2016-06-21 08:29:03 +0800 )edit

The usage in the zk demo is for used an inputevent for colorpicker in menu, but normal colorpicker they also use Event. So either a bug or a wrong documentation.

chillworld ( 2016-06-21 08:54:35 +0800 )edit
Be the first one to answer this question!
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

1 follower



Asked: 2016-06-21 07:37:20 +0800

Seen: 11 times

Last updated: Jun 21 '16

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