mojo/src/main/resources/archetype-resources/src/main/java/App.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Sun, 13 Jan 2013 06:59:05 +0100
changeset 437 d7ec46950980
parent 435 fb4ed6cc0d4b
child 528 08cd5a0c967e
permissions -rw-r--r--
Need to import other elements, so using wildcard import
     1 package ${package};
     2 
     3 import org.apidesign.bck2brwsr.htmlpage.api.*;
     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 }