Skip to content

Instantly share code, notes, and snippets.

@jtulach
jtulach / Sample.java
Last active December 26, 2015 20:58 — forked from ivargrimstad/HelloViaKO.java
Spinning Duke by Ivar
package dew.demo.duke2brwsr;
import net.java.html.json.*;
@Model(className = "Data", properties = {
@Property(name = "image", type = String.class),
@Property(name = "buttonText", type =String.class),
@Property(name = "on", type = boolean.class)
})
class Duke2Brwsr {
static {
@jtulach
jtulach / Todo.java
Last active November 5, 2017 05:50 — forked from rosvit/Todo.java
ToDo Example with HTML/Java API
package dew.demo.todos;
import net.java.html.json.*;
import java.util.List;
import java.util.ArrayList;
@Model(className="TodoUI", properties={
@Property(name="todos", type=Todo.class, array=true),
@Property(name="todoText", type=String.class)
})
@jtulach
jtulach / ClockCntrl.java
Last active August 29, 2015 14:09 — forked from rosvit/Todo.java
Renders analog clock
package dew.demo.time;
import java.util.ArrayList;
import java.util.List;
import net.java.html.json.ComputedProperty;
import net.java.html.json.Model;
import net.java.html.json.ModelOperation;
import net.java.html.json.Property;
@Model(className = "ClockModel", properties = {
@jtulach
jtulach / HelloViaKO.java
Created December 15, 2015 21:59 — forked from javatlacati/HelloViaKO.java
Hello World via Knockout4Java weird bug
package dew.demo.namesmodel;
import net.java.html.json.Model;
import net.java.html.json.Property;
import net.java.html.json.Function;
@Model(className="Names", properties={
@Property(name = "selectedName", type=String.class),
@Property(name = "names", type=String.class, array = true)
})