예제 #1
0
파일: Dashboard.java 프로젝트: AxFab/cide
  public static void index() {

    if (session.get("user") == null) {
      Authenticate.login();
    }
    render();
  }
예제 #2
0
  public static void createAuctionItem() {
    if (session.get("user") == null) {
      Authenticate.login();
    }

    AuctionItem item = new AuctionItem();
    render(item);
  }
예제 #3
0
  public static void doCreateItem(@Valid AuctionItem item) throws IOException {

    if (validation.hasErrors()) {
      System.out.println(validation.errorsMap());
      render("@createAuctionItem", item);
    }

    // set the user based on the logged in user
    item.createdBy = Authenticate.getLoggedInUser();

    item.save();
    show(item.id);
  }