@Override
    protected void preparePaintComponent(final Request request) {
      super.preparePaintComponent(request);

      if (!isInitialised()) {
        beanContainer.setBean(new SimpleFormBean());
        setInitialised(true);
      }
    }
    /** Creates a SimpleApp. */
    public SimpleApp() {
      add(beanContainer);

      WTextField property1 = new WTextField();
      property1.setBeanProperty("property1");
      WTextField property2 = new WTextField();
      property2.setBeanProperty("property2");

      beanContainer.add(new WLabel("Property 1:", property1));
      beanContainer.add(property1);
      beanContainer.add(new WLabel("Property 2:", property2));
      beanContainer.add(property2);

      WButton submit = new WButton("Submit");

      submit.setAction(
          new Action() {
            public void execute(final ActionEvent event) {
              WebUtilities.updateBeanValue(beanContainer);
            }
          });

      beanContainer.add(submit);
    }