0

Migrating from Zk3 to 6.5, CSA, mouseleave

asked 2015-10-23 18:41:28 +0800

dastultz gravatar image dastultz
797 8

Hello, I've got "richlet" code from Zk 3 like so:

final String onMouseOver = "onmouseover:myOverFunction('" + this.getUuid() + "');";
final String onMouseOut = "onmouseleave:myOutFunction('" + this.getUuid() + "');";
container.setAction(onMouseOver + onMouseOut);

which doesn't work in Zk 6.5. I've been all over the documentation but can't figure out how to migrate this. I tried this:

container.setWidgetListener("onMouseOver", "myOverFunction(this);");
container.setWidgetListener("onMouseLeave", "myOutFunction(this);");

The onMouseOver works as expected, but the onMouseLeave does not. I'm guessing it's because the event names are considered standard browser events and "onMouseLeave" is a jQuery thing. I need the behavior of jQuery's onMouseLeave (and would like onMouseEnter but can get by with onMouseOver).

How can I use Zk 6.5 in a Richlet way to bind jQuery events to components? (To get the behavior of setAction with "onMouseLeave".)

Thanks.

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-10-28 15:35:17 +0800

dastultz gravatar image dastultz
797 8

For anyone who discovers this later, I haven't figured it out directly. Presently I'm using Clients.evalJavaScript(...) to initialize my jQuery bindings on the client side.

/Daryl

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

Follow
1 follower

RSS

Stats

Asked: 2015-10-23 18:41:28 +0800

Seen: 32 times

Last updated: Oct 28 '15

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