示例#1
0
 public static void done(long id) {
   Item item = Item.findById(id);
   if (item != null) item.delete();
   index();
 }
示例#2
0
 public static void addItem(Item item) {
   item.save();
   index();
 }
示例#3
0
 public static void listItems() {
   renderJSON(Item.findAll());
 }
示例#4
0
  public static void index() {

    List<Item> currentItems = Item.all().fetch();

    render(currentItems);
  }