-
FEATURED COMPONENTS
First time here? Check out the FAQ!
when listening to the on_changing event of a spinner object the actual value doesn't change until i leave the spinner object. my code looks as follows. (zk 3.5.1)
final Spinner index = new Spinner(3);
index.addEventListener(Events.ON_CHANGING, new EventListener(){
public void onEvent(Event event) throws Exception
{
System.out.println(index.intValue());
}
});
this always outputs "3". am i doing something wrong or is it a bug?
is there a special reason that the spinner component is not mentioned in http://zkoss.org/doc/devref/ ???
Hi,
1. The value of the component in onChaning event won't update it.
You should use event.value instead.
2.About the devref guide, you should post it a bug, then we can follow it.
thx for the information. i have a little trouble accessing the event.value with my Java code. Can you help me out? Event.getData() returns null ...
i filed the documentation bug at https://sourceforge.net/tracker2/?func=detail&aid=2191395&group_id=152762&atid=785191
thx for the help!
ok, nevermind. i found it out. i had to cast to InputEvent first. i always find this event thing kind of troublesome... is there any kind of documentation about which component fires which events? or where can i look it up in the source code? thx
You can find events for components in developer reference, chapter 4. The XUL Components
If you want to look it up in the source code. getOuterAttrs() in Button.java is a good example. Events are likely to be registered like "appendAsapAttr(sb, Events.ON_FOCUS);"
Asked: 2008-10-22 15:39:29 +0800
Seen: 557 times
Last updated: Oct 24 '08