#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.client.views;

import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.shared.GWT;
import com.google.gwt.dom.client.FormElement;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTMLPanel;

import com.vaadin.polymer.Polymer;
import com.vaadin.polymer.paper.widget.PaperButton;
import com.vaadin.polymer.paper.widget.PaperInput;
import com.vaadin.polymer.paper.widget.PaperTextarea;
import com.vaadin.polymer.paper.widget.PaperToast;
import com.vaadin.polymer.vaadin.widget.VaadinDatePicker;
import com.vaadin.polymer.vaadin.widget.VaadinGrid;

import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;

public class View3 extends Composite {

  @JsType(isNative = true)
  public interface Todo {
    @JsProperty String getDate();
    @JsProperty String getTitle();
    @JsProperty String getDescription();
    @JsProperty void setDate(String d);
    @JsProperty void setTitle(String d);
    @JsProperty void setDescription(String d);
  }

  interface View3UiBinder extends UiBinder<HTMLPanel, View3> {
  }

  private static View3UiBinder viewUi = GWT.create(View3UiBinder.class);

  @UiField PaperButton submit;
  @UiField PaperInput title;
  @UiField PaperTextarea descr;
  @UiField VaadinDatePicker date;
  @UiField PaperToast toast;
  @UiField VaadinGrid grid;
  @UiField FormElement form;

  public View3() {
    initWidget(viewUi.createAndBindUi(this));
    toast.setFitInto(this.getElement());
    grid.setItems(JavaScriptObject.createArray());
  }

  @UiHandler("submit")
  void onClick(ClickEvent e) {
    if (date.getValue().isEmpty()) {
      date.setInvalid(date.getValue().isEmpty());
      return;
    }

    if (title.validate() && descr.validate()) {
      Todo todo = (Todo) JavaScriptObject.createObject();
      todo.setDate(date.getValue());
      todo.setTitle(title.getValue());
      todo.setDescription(descr.getValue());
      Polymer.apply(grid.getElement(), "push", "items", todo);
      form.reset();
    }
  }

}

@@ -896,16 +896,56 @@
 nGrid;%0A%0A
+import jsinterop.annotations.JsPackage;%0A
 import j
@@ -977,16 +977,16 @@
 operty;%0A
-
 import j
@@ -1084,28 +1084,74 @@
 true
-)%0A  public interface
+, namespace=JsPackage.GLOBAL, name=%22Object%22)%0A  public static class
  Tod
@@ -1174,24 +1174,26 @@
 rty 
+public 
 String 
-getD
+d
 ate
-()
 ;%0A  
@@ -1210,194 +1210,70 @@
 rty 
-String getTitle();%0A    @JsProperty String getDescription();%0A    @JsProperty void setDate(String d);%0A    @JsProperty void setTitle(String d);%0A    @JsProperty void setDescription(String d)
+public String title;%0A    @JsProperty public String description
 ;%0A  
@@ -2024,44 +2024,16 @@
 o = 
-(Todo) JavaScriptObject.createObject
+new Todo
 ();%0A
@@ -2047,16 +2047,15 @@
 odo.
-setDate(
+date = 
 date
@@ -2057,33 +2057,32 @@
  date.getValue()
-)
 ;%0A      todo.set
@@ -2082,17 +2082,16 @@
 odo.
-setT
+t
 itle
-(
+ = 
 titl
@@ -2094,33 +2094,32 @@
 title.getValue()
-)
 ;%0A      todo.set
@@ -2119,12 +2119,9 @@
 odo.
-setD
+d
 escr
@@ -2126,17 +2126,19 @@
 cription
-(
+ = 
 descr.ge
@@ -2145,17 +2145,16 @@
 tValue()
-)
 ;%0A      

Replace interface by class