mojo/src/main/resources/archetype-resources/src/main/java/App.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Sat, 12 Jan 2013 20:24:30 +0100
changeset 435 fb4ed6cc0d4b
parent 421 0236ad6ab4d2
child 437 d7ec46950980
permissions -rw-r--r--
Allowing access to all onsmthng events of page elements
     1 package ${package};
     2 
     3 import org.apidesign.bck2brwsr.htmlpage.api.On;
     4 import static org.apidesign.bck2brwsr.htmlpage.api.OnEvent.*;
     5 import org.apidesign.bck2brwsr.htmlpage.api.Page;
     6 
     7 /** Edit the index.xhtml file. Use 'id' to name certain HTML elements.
     8  * Use this class to define behavior of the elements.
     9  */
    10 @Page(xhtml="index.xhtml", className="Index")
    11 public class App {
    12     @On(event = CLICK, id="hello")
    13     static void hello() {
    14         Index.HELLO.setDisabled(true);
    15         Element.alert("Hello World!");
    16     }
    17 }