-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi!
I must create a hyperlink with an action listener to show some editor component in the same window of the html (in a new componente over the html with the link), preferably using only pure Java code, but I dunno how.
ZK have the Link class, but I have not figured out how to use that.
Any help is welcome.
You can use the A-Component:
<window id="container"> <zscript> A button = new A("Click me"); button.addEventListener(Events.ON_CLICK, new EventListener() { public void onEvent(Event event) { alert("Clicked"); } }); container.appendChild(button); </zscript> </window>
HTH, Maik
Hi,
the Java-code above works in Java too, you don't need ZUL pages for this. It was just added for demonstration purposes so you can try it directly in ZK-Sandbox.
Cheers, Maik
Asked: 2011-02-03 13:10:16 +0800
Seen: 501 times
Last updated: Feb 07 '11