0

argument type mismatch in Events.postEvent

asked 2012-04-02 14:05:07 +0800

Neus gravatar image Neus
1415 14

Hi,
Can anyone tell me why this exception is thrown?

02-abr-2012 16:00:30 org.zkoss.zk.ui.impl.UiEngineImpl handleError:1348
GRAVE: >>java.lang.IllegalArgumentException: argument type mismatch
>>	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>	at java.lang.reflect.Method.invoke(Unknown Source)
>>	at org.zkoss.zk.ui.event.GenericEventListener.onEvent(GenericEventListener.java:96)
>>	at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2699)
>>	at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2670)
>>	at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2611)
>>	at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136)
>>	at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:534)
>>	at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:461)

Sometimes when I want to use Events.postEvent (eventname, target, data) it is thrown and I don't know how to solve it.

Any idea??

Thanks!

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2012-04-09 15:34:41 +0800

benbai gravatar image benbai
2228 6
http://www.zkoss.org

Hi,

Could you provide a simple sample that can reproduce this problem?

Regards,
Ben

link publish delete flag offensive edit

answered 2012-04-10 06:33:41 +0800

Neus gravatar image Neus
1415 14

I found the error.
I was declaring the function without indicating the target.
public void onEventname() instead of public void onEventname$target()

link publish delete flag offensive edit
Your reply
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

Follow

RSS

Stats

Asked: 2012-04-02 14:05:07 +0800

Seen: 371 times

Last updated: Apr 10 '12

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