0

我是 vaadin 流程的新手,我正在使用 Polymer 模板,在执行 >project 时它会发送错误 NullPointerException: null,我要添加什么?

@Route
public class MainView extends VerticalLayout {

    public MainView(@Autowired HelloWorld2 bean) {
        add(bean);
    }

}

@Tag("hello-world")
@HtmlImport("src/components/siptec-hello-world/hello-world.html")
@Service
public class HelloWorld2 extends PolymerTemplate<HelloWorld2Model>  {

    private static final String EMPTY_NAME_GREETING = "Please enter your 
       name";

    public interface HelloWorld2Model extends TemplateModel {
        String getName();
        void setGreeting(String greeting);
}

public HelloWorld2() {
        setId("template");
        getModel().setGreeting(EMPTY_NAME_GREETING);
}


<dom-module id="hello-world">
  <template>
    <style>
      :host {
        display: block;
      }
    </style>
    <vaadin-text-field id="inputId" value="{{name}}" style="width: 200px"></vaadin-text-field>
    <div id="greeting">[[greeting]]</div>
  </template>
4

0 回答 0