Package cn.webwheel.results

Examples of cn.webwheel.results.RedirectResult


    List<Comment> comments;

    @Action("edit_article.html")
    public Object editPage() throws SQLException {
        if (getLoginUser() == null) {
            return new RedirectResult("/");
        }
        if (article != null) {
            article = qr.query("select * from Article where id=?", new BeanHandler<Article>(Article.class), this.article.id);
            if (article == null) {
                return new ErrorResult(404);
View Full Code Here


        notNull(getLoginUser(), "登录超时");
    }

    protected void ensureLoginPage() throws SQLException {
        if (getLoginUser() == null) {
            throw new LogicException(new RedirectResult("/login.html"));
        }
    }
View Full Code Here

    }

    @Action
    public Object logout() {
        loginUserService.setLoginUserId(null);
        return new RedirectResult("/");
    }
View Full Code Here

    }

    @Action("profile.html")
    public Object profilePage() throws SQLException {
        if ((user = getLoginUser()) == null) {
            return new RedirectResult("/login.html");
        }
        return new TemplateResult(this);
    }
View Full Code Here

    }

    public void ensureLoginPage() throws SQLException {
        super.ensureLoginPage();
        if (!loginUser.id.equals("admin")) {
            throw new LogicException(new RedirectResult("/login.html"));
        }
    }
View Full Code Here

        }
        accountService.insertAccount(account);
        account = accountService.getAccount(account.getUsername());
        myList = catalogService.getProductListByCategory(account.getFavouriteCategoryId());
        authenticated = true;
        return new RedirectResult("CatalogActionBean.viewMain");
    }
View Full Code Here

            return editAccountForm();
        }
        accountService.updateAccount(account);
        account = accountService.getAccount(account.getUsername());
        myList = catalogService.getProductListByCategory(account.getFavouriteCategoryId());
        return new RedirectResult("CatalogActionBean.viewMain");
    }
View Full Code Here

      myList = catalogService.getProductListByCategory(account.getFavouriteCategoryId());
      authenticated = true;
      HttpSession s = ctx.getRequest().getSession();
      // this bean is already registered as /actions/Account.action
      s.setAttribute("accountBean", this);
        return new RedirectResult("CatalogActionBean.viewMain");
    }
  }
View Full Code Here

    @Action
  public Object signoff() {
    ctx.getRequest().getSession().invalidate();
    clear();
        return new RedirectResult("CatalogActionBean.viewMain");
  }
View Full Code Here

TOP

Related Classes of cn.webwheel.results.RedirectResult

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.