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
jaroslav@421
     1
package ${package};
jaroslav@141
     2
jaroslav@437
     3
import org.apidesign.bck2brwsr.htmlpage.api.*;
jaroslav@435
     4
import static org.apidesign.bck2brwsr.htmlpage.api.OnEvent.*;
jaroslav@141
     5
import org.apidesign.bck2brwsr.htmlpage.api.Page;
jaroslav@141
     6
jaroslav@421
     7
/** Edit the index.xhtml file. Use 'id' to name certain HTML elements.
jaroslav@421
     8
 * Use this class to define behavior of the elements.
jaroslav@198
     9
 */
jaroslav@421
    10
@Page(xhtml="index.xhtml", className="Index")
jaroslav@141
    11
public class App {
jaroslav@435
    12
    @On(event = CLICK, id="hello")
jaroslav@421
    13
    static void hello() {
jaroslav@421
    14
        Index.HELLO.setDisabled(true);
jaroslav@435
    15
        Element.alert("Hello World!");
jaroslav@141
    16
    }
jaroslav@141
    17
}