[SOLVED] How to click a Button in javaScript by calling the Clients.evalJavasc...

asked 2013-05-24 11:39:56 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16

updated 2013-05-28 15:52:47 +0800

How to click a Button in JavaScript by calling the function with Clients.evalJavascript... from the java controller.

Thanks for all input

delete flag offensive retag edit


That's exactly what i need Giovanni.

100 thanks for that. Works perfect.

terrytornado ( 2013-05-28 15:51:47 +0800 )edit

that's great! Also the potential forwards are working fine... honestly i struggled for a while trying to get it done via jQuery... but at the end only the document.getElementById().click() worked... and i'm still not sure why! :D

gganassin ( 2013-05-28 15:59:58 +0800 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2013-05-27 09:21:51 +0800

gganassin gravatar image gganassin flag of Luxembourg
540 6

updated 2013-05-27 09:23:55 +0800

Java side:

    Clients.evalJavaScript("document.getElementById(\"" + this.saveButton.getUuid() + "\").click();");

ZUL side:

<button id="saveButton" label="save"  onClick='alert("clicked")' />

I don't know what is exactly your scenario Stephan... but hope it helps! Giovanni

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

1 follower



Asked: 2013-05-24 11:39:56 +0800

Seen: 24 times

Last updated: May 28 '13

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