Bringing the sample and test code up to date to with API changes in default branch dew
authorJaroslav Tulach <jaroslav.tulach@apidesign.org>
Wed, 16 Jan 2013 12:32:47 +0100
branchdew
changeset 469c6e6782950b8
parent 468 a7ff47e054f3
child 470 c1dc0512c39d
Bringing the sample and test code up to date to with API changes in default branch
launcher/src/main/resources/org/apidesign/bck2brwsr/dew/js/app.js
launcher/src/test/java/org/apidesign/bck2brwsr/dew/CompileTest.java
     1.1 --- a/launcher/src/main/resources/org/apidesign/bck2brwsr/dew/js/app.js	Wed Jan 16 12:28:56 2013 +0100
     1.2 +++ b/launcher/src/main/resources/org/apidesign/bck2brwsr/dew/js/app.js	Wed Jan 16 12:32:47 2013 +0100
     1.3 @@ -109,10 +109,11 @@
     1.4          + "</body></html>\n";
     1.5      var templateJava = "package bck2brwsr.demo;\n"
     1.6          + "import org.apidesign.bck2brwsr.htmlpage.api.*;\n"
     1.7 +        + "import static org.apidesign.bck2brwsr.htmlpage.api.OnEvent.*;\n"
     1.8          + "@Page(xhtml=\"index.html\", className=\"Index\")\n"
     1.9          + "class YourFirstHTML5PageInRealLanguage {\n"
    1.10 -        + "   @OnClick(id=\"btn\") static void clcs() {\n"
    1.11 -        + "     Index.BTN.setDisabled(true);\n"
    1.12 +        + "   @On(event=CLICK, id=\"btn\") static void clcs() {\n"
    1.13 +        + "     Element.alert(\"Hello World!\");\n"
    1.14          + "   }\n"
    1.15          + "}\n";
    1.16  
     2.1 --- a/launcher/src/test/java/org/apidesign/bck2brwsr/dew/CompileTest.java	Wed Jan 16 12:28:56 2013 +0100
     2.2 +++ b/launcher/src/test/java/org/apidesign/bck2brwsr/dew/CompileTest.java	Wed Jan 16 12:32:47 2013 +0100
     2.3 @@ -32,9 +32,10 @@
     2.4                  + "</body></html>";
     2.5          String java = "package x.y.z;"
     2.6                  + "import org.apidesign.bck2brwsr.htmlpage.api.*;"
     2.7 +                + "import static org.apidesign.bck2brwsr.htmlpage.api.OnEvent.*;"
     2.8              + "@Page(xhtml=\"index.html\", className=\"Index\")"
     2.9              + "class X { "
    2.10 -            + "   @OnClick(id=\"btn\") static void clcs() {}"
    2.11 +            + "   @On(event=CLICK, id=\"btn\") static void clcs() {}"
    2.12              + "}";
    2.13          Compile result = Compile.create(html, java);
    2.14