Package org.jboss.errai.demo.todo.shared

Examples of org.jboss.errai.demo.todo.shared.TodoItem


  }

  @EventHandler("newItemBox")
  void onNewItem(KeyDownEvent event) {
    if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER && !newItemBox.getText().trim().equals("")) {
      TodoItem item = new TodoItem();
      item.setLoginName(user.getIdentifier());
      item.setText(newItemBox.getText());
      em.persist(item);
      em.flush();
      newItemBox.setText("");
      refreshItems();
    }
View Full Code Here


  @PostConstruct
  void setup() {
    itemBinder.addPropertyChangeHandler(new PropertyChangeHandler<Object>() {
      @Override
      public void onPropertyChange(PropertyChangeEvent<Object> event) {
        TodoItem item = itemBinder.getModel();
        updateDoneStyle();
        itemChangedEvent.fire(item);
      }
    });
  }
View Full Code Here

    }
  }

  @EventHandler
  protected void onClick(ClickEvent e) {
    TodoItem item = getModel();
    item.setDone(!item.isDone());
  }
View Full Code Here

  }

  @EventHandler("newItemBox")
  void onNewItem(KeyDownEvent event) {
    if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER && !newItemBox.getText().equals("")) {
      TodoItem item = new TodoItem();
      item.setText(newItemBox.getText());
      em.persist(item);
      em.flush();
      newItemBox.setText("");
      refreshItems();
    }
View Full Code Here

  @PostConstruct
  void setup() {
    itemBinder.addPropertyChangeHandler(new PropertyChangeHandler<Object>() {
      @Override
      public void onPropertyChange(PropertyChangeEvent<Object> event) {
        TodoItem item = itemBinder.getModel();
        updateDoneStyle();
        itemChangedEvent.fire(item);
      }
    });
  }
View Full Code Here

    }
  }

  @EventHandler
  private void onClick(ClickEvent e) {
    TodoItem item = getModel();
    item.setDone(!item.isDone());
  }
View Full Code Here

TOP

Related Classes of org.jboss.errai.demo.todo.shared.TodoItem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.