One calculator demo is more than enough closure
authorJaroslav Tulach <jaroslav.tulach@apidesign.org>
Mon, 09 Jun 2014 09:40:32 +0200
branchclosure
changeset 16177271b051b13c
parent 1616 d3cbe257c4e9
child 1618 f62b42f0b751
One calculator demo is more than enough
javaquery/demo-calculator-dynamic/nbactions.xml
javaquery/demo-calculator-dynamic/pom.xml
javaquery/demo-calculator-dynamic/src/main/assembly/bck2brwsr.xml
javaquery/demo-calculator-dynamic/src/main/java/org/apidesign/bck2brwsr/demo/calc/Calc.java
javaquery/demo-calculator-dynamic/src/main/java/org/apidesign/bck2brwsr/demo/calc/HistoryImpl.java
javaquery/demo-calculator-dynamic/src/main/resources/org/apidesign/bck2brwsr/demo/calc/Calculator.xhtml
javaquery/demo-calculator-dynamic/src/test/java/org/apidesign/bck2brwsr/demo/calc/CalcTest.java
javaquery/pom.xml
     1.1 --- a/javaquery/demo-calculator-dynamic/nbactions.xml	Mon Jun 09 09:39:59 2014 +0200
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,29 +0,0 @@
     1.4 -<?xml version="1.0" encoding="UTF-8"?>
     1.5 -<!--
     1.6 -
     1.7 -    Back 2 Browser Bytecode Translator
     1.8 -    Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
     1.9 -
    1.10 -    This program is free software: you can redistribute it and/or modify
    1.11 -    it under the terms of the GNU General Public License as published by
    1.12 -    the Free Software Foundation, version 2 of the License.
    1.13 -
    1.14 -    This program is distributed in the hope that it will be useful,
    1.15 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.16 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.17 -    GNU General Public License for more details.
    1.18 -
    1.19 -    You should have received a copy of the GNU General Public License
    1.20 -    along with this program. Look for COPYING file in the top folder.
    1.21 -    If not, see http://opensource.org/licenses/GPL-2.0.
    1.22 -
    1.23 --->
    1.24 -<actions>
    1.25 -        <action>
    1.26 -            <actionName>run</actionName>
    1.27 -            <goals>
    1.28 -                <goal>process-classes</goal>
    1.29 -                <goal>bck2brwsr:brwsr</goal>
    1.30 -            </goals>
    1.31 -        </action>
    1.32 -    </actions>
     2.1 --- a/javaquery/demo-calculator-dynamic/pom.xml	Mon Jun 09 09:39:59 2014 +0200
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,119 +0,0 @@
     2.4 -<?xml version="1.0"?>
     2.5 -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     2.6 -  <modelVersion>4.0.0</modelVersion>
     2.7 -
     2.8 -  <groupId>org.apidesign.bck2brwsr</groupId>
     2.9 -  <artifactId>demo.calculator</artifactId>
    2.10 -  <version>0.9-SNAPSHOT</version>
    2.11 -  <packaging>jar</packaging>
    2.12 -
    2.13 -  <name>JavaQuery Demo - Calculator</name>
    2.14 -  <url>http://maven.apache.org</url>
    2.15 -
    2.16 -  <properties>
    2.17 -    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    2.18 -  </properties>
    2.19 -  <build>
    2.20 -      <plugins>
    2.21 -            <plugin>
    2.22 -                <groupId>org.apidesign.bck2brwsr</groupId>
    2.23 -                <artifactId>bck2brwsr-maven-plugin</artifactId>
    2.24 -                <version>${project.version}</version>
    2.25 -                <executions>
    2.26 -                    <execution>
    2.27 -                        <goals>
    2.28 -                            <goal>brwsr</goal>
    2.29 -                        </goals>
    2.30 -                    </execution>
    2.31 -                </executions>
    2.32 -                <configuration>
    2.33 -                    <startpage>org/apidesign/bck2brwsr/demo/calc/Calculator.xhtml</startpage>
    2.34 -                </configuration>
    2.35 -            </plugin>
    2.36 -         <plugin>
    2.37 -            <groupId>org.apache.maven.plugins</groupId>
    2.38 -            <artifactId>maven-compiler-plugin</artifactId>
    2.39 -            <version>2.3.2</version>
    2.40 -            <configuration>
    2.41 -               <source>1.7</source>
    2.42 -               <target>1.7</target>
    2.43 -            </configuration>
    2.44 -         </plugin>
    2.45 -         <plugin>
    2.46 -             <groupId>org.apache.maven.plugins</groupId>
    2.47 -             <artifactId>maven-jar-plugin</artifactId>
    2.48 -             <version>2.4</version>
    2.49 -             <configuration>
    2.50 -                 <archive>
    2.51 -                     <manifest>
    2.52 -                         <addClasspath>true</addClasspath>
    2.53 -                         <classpathPrefix>lib/</classpathPrefix>
    2.54 -                     </manifest>
    2.55 -                 </archive>
    2.56 -             </configuration>
    2.57 -         </plugin>
    2.58 -         <plugin>
    2.59 -           <groupId>org.apache.maven.plugins</groupId>
    2.60 -           <artifactId>maven-deploy-plugin</artifactId>
    2.61 -           <version>2.7</version>
    2.62 -           <configuration>
    2.63 -             <skip>true</skip>
    2.64 -           </configuration>
    2.65 -         </plugin>
    2.66 -         <plugin>
    2.67 -           <groupId>org.apache.maven.plugins</groupId>
    2.68 -           <artifactId>maven-javadoc-plugin</artifactId>
    2.69 -           <version>2.9</version>
    2.70 -           <configuration>
    2.71 -             <skip>true</skip>
    2.72 -           </configuration>
    2.73 -         </plugin>
    2.74 -         <plugin>
    2.75 -            <artifactId>maven-assembly-plugin</artifactId>
    2.76 -                <version>2.4</version>
    2.77 -                <executions>
    2.78 -                    <execution>
    2.79 -                        <id>distro-assembly</id>
    2.80 -                        <phase>package</phase>
    2.81 -                        <goals>
    2.82 -                            <goal>single</goal>
    2.83 -                        </goals>
    2.84 -                        <configuration>
    2.85 -                            <descriptors>
    2.86 -                                <descriptor>src/main/assembly/bck2brwsr.xml</descriptor>
    2.87 -                            </descriptors>
    2.88 -                        </configuration>
    2.89 -                    </execution>
    2.90 -                </executions>                
    2.91 -            </plugin>      
    2.92 -      </plugins>
    2.93 -  </build>
    2.94 -
    2.95 -  <dependencies>
    2.96 -    <dependency>
    2.97 -      <groupId>org.apidesign.bck2brwsr</groupId>
    2.98 -      <artifactId>emul</artifactId>
    2.99 -      <version>${project.version}</version>
   2.100 -      <classifier>rt</classifier>
   2.101 -    </dependency>
   2.102 -    <dependency>
   2.103 -      <groupId>org.apidesign.bck2brwsr</groupId>
   2.104 -      <artifactId>javaquery.api</artifactId>
   2.105 -      <version>${project.version}</version>
   2.106 -    </dependency>
   2.107 -    <dependency>
   2.108 -      <groupId>org.testng</groupId>
   2.109 -      <artifactId>testng</artifactId>
   2.110 -      <version>6.5.2</version>
   2.111 -      <scope>test</scope>
   2.112 -    </dependency>
   2.113 -    <dependency>
   2.114 -      <groupId>org.apidesign.bck2brwsr</groupId>
   2.115 -      <artifactId>vm4brwsr</artifactId>
   2.116 -      <classifier>js</classifier>
   2.117 -      <type>zip</type>
   2.118 -      <version>${project.version}</version>
   2.119 -      <scope>provided</scope>
   2.120 -    </dependency>
   2.121 -  </dependencies>
   2.122 -</project>
     3.1 --- a/javaquery/demo-calculator-dynamic/src/main/assembly/bck2brwsr.xml	Mon Jun 09 09:39:59 2014 +0200
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,62 +0,0 @@
     3.4 -<?xml version="1.0"?>
     3.5 -<!--
     3.6 -
     3.7 -    Back 2 Browser Bytecode Translator
     3.8 -    Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
     3.9 -
    3.10 -    This program is free software: you can redistribute it and/or modify
    3.11 -    it under the terms of the GNU General Public License as published by
    3.12 -    the Free Software Foundation, version 2 of the License.
    3.13 -
    3.14 -    This program is distributed in the hope that it will be useful,
    3.15 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
    3.16 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    3.17 -    GNU General Public License for more details.
    3.18 -
    3.19 -    You should have received a copy of the GNU General Public License
    3.20 -    along with this program. Look for COPYING file in the top folder.
    3.21 -    If not, see http://opensource.org/licenses/GPL-2.0.
    3.22 -
    3.23 --->
    3.24 -<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    3.25 -  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
    3.26 -  
    3.27 -  <id>bck2brwsr</id>
    3.28 -  <formats>
    3.29 -      <format>zip</format>
    3.30 -      <format>dir</format>
    3.31 -  </formats>
    3.32 -  <baseDirectory>public_html</baseDirectory>
    3.33 -  <dependencySets>
    3.34 -    <dependencySet>
    3.35 -        <useProjectArtifact>false</useProjectArtifact>
    3.36 -        <scope>runtime</scope>
    3.37 -        <outputDirectory>lib</outputDirectory>
    3.38 -        <includes>
    3.39 -            <include>*:jar</include>
    3.40 -            <include>*:rt</include>
    3.41 -        </includes>
    3.42 -    </dependencySet>
    3.43 -    <dependencySet>
    3.44 -        <useProjectArtifact>false</useProjectArtifact>
    3.45 -        <scope>provided</scope>
    3.46 -        <includes>
    3.47 -            <include>*:js</include>
    3.48 -        </includes>
    3.49 -        <unpack>true</unpack>
    3.50 -        <outputDirectory>/</outputDirectory>
    3.51 -    </dependencySet>
    3.52 -  </dependencySets> 
    3.53 -  <files>
    3.54 -    <file>
    3.55 -      <source>${project.build.directory}/${project.build.finalName}.jar</source>
    3.56 -      <outputDirectory>/</outputDirectory>
    3.57 -    </file>
    3.58 -    <file>
    3.59 -      <source>${project.build.directory}/classes/org/apidesign/bck2brwsr/demo/calc/Calculator.xhtml</source>
    3.60 -      <outputDirectory>/</outputDirectory>
    3.61 -      <destName>index.xhtml</destName>
    3.62 -    </file>
    3.63 -  </files>
    3.64 -
    3.65 -</assembly>
    3.66 \ No newline at end of file
     4.1 --- a/javaquery/demo-calculator-dynamic/src/main/java/org/apidesign/bck2brwsr/demo/calc/Calc.java	Mon Jun 09 09:39:59 2014 +0200
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,146 +0,0 @@
     4.4 -/**
     4.5 - * Back 2 Browser Bytecode Translator
     4.6 - * Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
     4.7 - *
     4.8 - * This program is free software: you can redistribute it and/or modify
     4.9 - * it under the terms of the GNU General Public License as published by
    4.10 - * the Free Software Foundation, version 2 of the License.
    4.11 - *
    4.12 - * This program is distributed in the hope that it will be useful,
    4.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    4.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    4.15 - * GNU General Public License for more details.
    4.16 - *
    4.17 - * You should have received a copy of the GNU General Public License
    4.18 - * along with this program. Look for COPYING file in the top folder.
    4.19 - * If not, see http://opensource.org/licenses/GPL-2.0.
    4.20 - */
    4.21 -package org.apidesign.bck2brwsr.demo.calc;
    4.22 -
    4.23 -import java.util.List;
    4.24 -import org.apidesign.bck2brwsr.htmlpage.api.ComputedProperty;
    4.25 -import org.apidesign.bck2brwsr.htmlpage.api.On;
    4.26 -import static org.apidesign.bck2brwsr.htmlpage.api.OnEvent.*;
    4.27 -import org.apidesign.bck2brwsr.htmlpage.api.OnFunction;
    4.28 -import org.apidesign.bck2brwsr.htmlpage.api.Page;
    4.29 -import org.apidesign.bck2brwsr.htmlpage.api.Property;
    4.30 -
    4.31 -/** HTML5 & Java demo showing the power of 
    4.32 - * <a href="http://wiki.apidesign.org/wiki/AnnotationProcessor">annotation processors</a>
    4.33 - * as well as other goodies.
    4.34 - * 
    4.35 - * @author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
    4.36 - */
    4.37 -@Page(xhtml="Calculator.xhtml", properties = {
    4.38 -    @Property(name = "memory", type = double.class),
    4.39 -    @Property(name = "display", type = double.class),
    4.40 -    @Property(name = "operation", type = String.class),
    4.41 -    @Property(name = "hover", type = boolean.class),
    4.42 -    @Property(name = "history", type = HistoryImpl.class, array = true)
    4.43 -})
    4.44 -public class Calc {
    4.45 -    static {
    4.46 -        new Calculator().applyBindings().setOperation("plus");
    4.47 -    }
    4.48 -    
    4.49 -    @On(event = CLICK, id="clear")
    4.50 -    static void clear(Calculator c) {
    4.51 -        c.setMemory(0);
    4.52 -        c.setOperation(null);
    4.53 -        c.setDisplay(0);
    4.54 -    }
    4.55 -    
    4.56 -    @On(event = CLICK, id= { "plus", "minus", "mul", "div" })
    4.57 -    static void applyOp(Calculator c, String id) {
    4.58 -        c.setMemory(c.getDisplay());
    4.59 -        c.setOperation(id);
    4.60 -        c.setDisplay(0);
    4.61 -    }
    4.62 -
    4.63 -    @On(event = MOUSE_OVER, id= { "result" })
    4.64 -    static void attemptingIn(Calculator c) {
    4.65 -        c.setHover(true);
    4.66 -    }
    4.67 -    @On(event = MOUSE_OUT, id= { "result" })
    4.68 -    static void attemptingOut(Calculator c) {
    4.69 -        c.setHover(false);
    4.70 -    }
    4.71 -    
    4.72 -    @On(event = CLICK, id="result")
    4.73 -    static void computeTheValue(Calculator c) {
    4.74 -        final double newValue = compute(
    4.75 -            c.getOperation(), 
    4.76 -            c.getMemory(), 
    4.77 -            c.getDisplay()
    4.78 -        );
    4.79 -        c.setDisplay(newValue);
    4.80 -        if (!containsValue(c.getHistory(), newValue)) {
    4.81 -            History h = new History();
    4.82 -            h.setValue(newValue);
    4.83 -            h.setOperation(c.getOperation());
    4.84 -            c.getHistory().add(h);
    4.85 -        }
    4.86 -        c.setMemory(0);
    4.87 -    }
    4.88 -    
    4.89 -    @OnFunction
    4.90 -    static void recoverMemory(Calculator c, History data) {
    4.91 -        c.setDisplay(data.getValue());
    4.92 -    }
    4.93 -
    4.94 -    @OnFunction
    4.95 -    static void removeMemory(Calculator c, History data) {
    4.96 -        c.getHistory().remove(data);
    4.97 -    }
    4.98 -    
    4.99 -    private static double compute(String op, double memory, double display) {
   4.100 -        switch (op) {
   4.101 -            case "plus": return memory + display;
   4.102 -            case "minus": return memory - display;
   4.103 -            case "mul": return memory * display;
   4.104 -            case "div": return memory / display;
   4.105 -            default: throw new IllegalStateException(op);
   4.106 -        }
   4.107 -    }
   4.108 -    
   4.109 -    @On(event = CLICK, id={"n0", "n1", "n2", "n3", "n4", "n5", "n6", "n7", "n8", "n9"}) 
   4.110 -    static void addDigit(String id, Calculator c) {
   4.111 -        id = id.substring(1);
   4.112 -        
   4.113 -        double v = c.getDisplay();
   4.114 -        if (v == 0.0) {
   4.115 -            c.setDisplay(Integer.parseInt(id));
   4.116 -        } else {
   4.117 -            String txt = Double.toString(v);
   4.118 -            if (txt.endsWith(".0")) {
   4.119 -                txt = txt.substring(0, txt.length() - 2);
   4.120 -            }
   4.121 -            txt = txt + id;
   4.122 -            c.setDisplay(Double.parseDouble(txt));
   4.123 -        }
   4.124 -    }
   4.125 -
   4.126 -    @ComputedProperty
   4.127 -    public static String displayPreview(
   4.128 -        double display, boolean hover, double memory, String operation
   4.129 -    ) {
   4.130 -        if (!hover) {
   4.131 -            return "Type numbers and perform simple operations! Press '=' to get result.";
   4.132 -        }
   4.133 -        return "Attempt to compute " + memory + " " + operation + " " + display + " = " + compute(operation, memory, display);
   4.134 -    }
   4.135 -    
   4.136 -    @ComputedProperty
   4.137 -    static boolean emptyHistory(List<?> history) {
   4.138 -        return history.isEmpty();
   4.139 -    }
   4.140 -
   4.141 -    private static boolean containsValue(List<History> arr, final double newValue) {
   4.142 -        for (History history : arr) {
   4.143 -            if (history.getValue() == newValue) {
   4.144 -                return true;
   4.145 -            }
   4.146 -        }
   4.147 -        return false;
   4.148 -    }
   4.149 -}
     5.1 --- a/javaquery/demo-calculator-dynamic/src/main/java/org/apidesign/bck2brwsr/demo/calc/HistoryImpl.java	Mon Jun 09 09:39:59 2014 +0200
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,43 +0,0 @@
     5.4 -/**
     5.5 - * Back 2 Browser Bytecode Translator
     5.6 - * Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
     5.7 - *
     5.8 - * This program is free software: you can redistribute it and/or modify
     5.9 - * it under the terms of the GNU General Public License as published by
    5.10 - * the Free Software Foundation, version 2 of the License.
    5.11 - *
    5.12 - * This program is distributed in the hope that it will be useful,
    5.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    5.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    5.15 - * GNU General Public License for more details.
    5.16 - *
    5.17 - * You should have received a copy of the GNU General Public License
    5.18 - * along with this program. Look for COPYING file in the top folder.
    5.19 - * If not, see http://opensource.org/licenses/GPL-2.0.
    5.20 - */
    5.21 -package org.apidesign.bck2brwsr.demo.calc;
    5.22 -
    5.23 -import org.apidesign.bck2brwsr.htmlpage.api.ComputedProperty;
    5.24 -import org.apidesign.bck2brwsr.htmlpage.api.Model;
    5.25 -import org.apidesign.bck2brwsr.htmlpage.api.OnFunction;
    5.26 -import org.apidesign.bck2brwsr.htmlpage.api.Property;
    5.27 -
    5.28 -/**
    5.29 - *
    5.30 - * @author Jaroslav Tulach <jtulach@netbeans.org>
    5.31 - */
    5.32 -@Model(className = "History", properties = {
    5.33 -    @Property(name = "value", type = double.class),
    5.34 -    @Property(name = "operation", type = String.class)
    5.35 -})
    5.36 -public class HistoryImpl {
    5.37 -    @ComputedProperty
    5.38 -    static String resultOf(String operation) {
    5.39 -        return "result of " + operation;
    5.40 -    }
    5.41 -    
    5.42 -    @OnFunction
    5.43 -    static void twice(History data) {
    5.44 -        data.setValue(2.0 * data.getValue());
    5.45 -    }
    5.46 -}
     6.1 --- a/javaquery/demo-calculator-dynamic/src/main/resources/org/apidesign/bck2brwsr/demo/calc/Calculator.xhtml	Mon Jun 09 09:39:59 2014 +0200
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,102 +0,0 @@
     6.4 -<?xml version="1.0" encoding="UTF-8"?>
     6.5 -<!--
     6.6 -
     6.7 -    Back 2 Browser Bytecode Translator
     6.8 -    Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
     6.9 -
    6.10 -    This program is free software: you can redistribute it and/or modify
    6.11 -    it under the terms of the GNU General Public License as published by
    6.12 -    the Free Software Foundation, version 2 of the License.
    6.13 -
    6.14 -    This program is distributed in the hope that it will be useful,
    6.15 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
    6.16 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    6.17 -    GNU General Public License for more details.
    6.18 -
    6.19 -    You should have received a copy of the GNU General Public License
    6.20 -    along with this program. Look for COPYING file in the top folder.
    6.21 -    If not, see http://opensource.org/licenses/GPL-2.0.
    6.22 -
    6.23 --->
    6.24 -<!DOCTYPE html>
    6.25 -<html xmlns="http://www.w3.org/1999/xhtml">
    6.26 -    <head>
    6.27 -        <title>Simple Calculator in HTML5 and Java</title>
    6.28 -
    6.29 -        <style type="text/css">
    6.30 -        body {color: #ffffff; background-color: #121e31; font-family: Monospaced}
    6.31 -        pre {color: #ffffff; background-color: #121e31; font-family: Monospaced}
    6.32 -        table {color: #ffffff; background-color: #121e31; font-family: Monospaced}
    6.33 -        .string {color: #e2ce00}
    6.34 -        a {color: #e2ce00}
    6.35 -        .ST1 {color: #0000cc; font-family: Monospaced; font-weight: bold}
    6.36 -        .ST0 {color: #0000ff}
    6.37 -        .comment {color: #428bdd}
    6.38 -        .keyword-directive {color: #f8bb00}
    6.39 -        .tag {color: #f8bb00}
    6.40 -        .ST0 {color: #628fb5; background-color: #1b3450}
    6.41 -        .sgml-comment {color: #808080}
    6.42 -        .value {color: #99006b}
    6.43 -        .argument {color: #007c00}
    6.44 -        .sgml-declaration {color: #bf9221}
    6.45 -        </style>    
    6.46 -        </head>
    6.47 -    <body>
    6.48 -        <h1>Java and HTML5 - Together at Last!</h1>
    6.49 -        <table border="0" cellspacing="2">
    6.50 -            <tbody>
    6.51 -                <tr>
    6.52 -                    <td colspan="4"><input data-bind="value: display" value="0" 
    6.53 -                            style="text-align: right"/>
    6.54 -                </td>
    6.55 -                </tr>
    6.56 -                <tr>
    6.57 -                    <td><button id="n1">1</button></td>
    6.58 -                    <td><button id="n2">2</button></td>
    6.59 -                    <td><button id="n3">3</button></td>
    6.60 -                    <td><button id="plus">+</button></td>
    6.61 -                </tr>
    6.62 -                <tr>
    6.63 -                    <td><button id="n4">4</button></td>
    6.64 -                    <td><button id="n5">5</button></td>
    6.65 -                    <td><button id="n6">6</button></td>
    6.66 -                    <td><button id="minus">-</button></td>
    6.67 -                </tr>
    6.68 -                <tr>
    6.69 -                    <td><button id="n7">7</button></td>
    6.70 -                    <td><button id="n8">8</button></td>
    6.71 -                    <td><button id="n9">9</button></td>
    6.72 -                    <td><button id="mul">*</button></td>
    6.73 -                </tr>
    6.74 -                <tr>
    6.75 -                    <td><button id="clear">C</button></td>
    6.76 -                    <td><button id="n0">0</button></td>
    6.77 -                    <td><button id="result">=</button></td>
    6.78 -                    <td><button id="div">/</button></td>
    6.79 -                </tr>
    6.80 -            </tbody>
    6.81 -        </table>
    6.82 -        <div data-bind="text: displayPreview"></div>
    6.83 -        
    6.84 -        <h4>Previous Results</h4>
    6.85 -        
    6.86 -        <div data-bind="if: emptyHistory">No results yet.</div>
    6.87 -        <ul data-bind="foreach: history">
    6.88 -            <li>
    6.89 -                <span data-bind="text: $data.value"></span> -
    6.90 -                <a href="#" data-bind="click: $root.recoverMemory">Use</a>
    6.91 -                <a href="#" data-bind="click: $root.removeMemory">Remove</a>
    6.92 -                <a href="#" data-bind="click: $data.twice">Double</a> -
    6.93 -                <span data-bind="text: $data.resultOf"></span>
    6.94 -            </li>
    6.95 -        </ul>
    6.96 -        
    6.97 -        <script src="bck2brwsr.js"></script>
    6.98 -        <script type="text/javascript">
    6.99 -            var vm = bck2brwsr('demo.calculator-0.6.jar');
   6.100 -            vm.loadClass('org.apidesign.bck2brwsr.demo.calc.Calc');
   6.101 -        </script>
   6.102 -        
   6.103 -        <hr/>
   6.104 -    </body>
   6.105 -</html>
     7.1 --- a/javaquery/demo-calculator-dynamic/src/test/java/org/apidesign/bck2brwsr/demo/calc/CalcTest.java	Mon Jun 09 09:39:59 2014 +0200
     7.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.3 @@ -1,46 +0,0 @@
     7.4 -/**
     7.5 - * Back 2 Browser Bytecode Translator
     7.6 - * Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
     7.7 - *
     7.8 - * This program is free software: you can redistribute it and/or modify
     7.9 - * it under the terms of the GNU General Public License as published by
    7.10 - * the Free Software Foundation, version 2 of the License.
    7.11 - *
    7.12 - * This program is distributed in the hope that it will be useful,
    7.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    7.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    7.15 - * GNU General Public License for more details.
    7.16 - *
    7.17 - * You should have received a copy of the GNU General Public License
    7.18 - * along with this program. Look for COPYING file in the top folder.
    7.19 - * If not, see http://opensource.org/licenses/GPL-2.0.
    7.20 - */
    7.21 -package org.apidesign.bck2brwsr.demo.calc;
    7.22 -
    7.23 -import static org.testng.Assert.*;
    7.24 -import org.testng.annotations.BeforeMethod;
    7.25 -import org.testng.annotations.Test;
    7.26 -
    7.27 -/** Demonstrating POJO testing of HTML page model.
    7.28 - *
    7.29 - * @author Jaroslav Tulach <jtulach@netbeans.org>
    7.30 - */
    7.31 -public class CalcTest {
    7.32 -    private Calculator model;
    7.33 -    
    7.34 -
    7.35 -    @BeforeMethod
    7.36 -    public void initModel() {
    7.37 -        model = new Calculator().applyBindings();
    7.38 -    }
    7.39 -
    7.40 -    @Test
    7.41 -    public void testSomeMethod() {
    7.42 -        model.setDisplay(10);
    7.43 -        Calc.applyOp(model, "plus");
    7.44 -        assertEquals(0.0, model.getDisplay(), "Cleared after pressing +");
    7.45 -        model.setDisplay(5);
    7.46 -        Calc.computeTheValue(model);
    7.47 -        assertEquals(15.0, model.getDisplay(), "Shows fifteen");
    7.48 -    }
    7.49 -}
     8.1 --- a/javaquery/pom.xml	Mon Jun 09 09:39:59 2014 +0200
     8.2 +++ b/javaquery/pom.xml	Mon Jun 09 09:40:32 2014 +0200
     8.3 @@ -14,6 +14,5 @@
     8.4      <modules>
     8.5          <module>api</module>
     8.6          <module>demo-calculator</module>
     8.7 -        <module>demo-calculator-dynamic</module>
     8.8    </modules>
     8.9  </project>