Examples of ErrorResult


Examples of cn.webwheel.results.ErrorResult

    @Action(value = "?id=$1&tag=$3", rest = "/user/([^/]+)(/(.+)?)?")
    public Object html() throws SQLException {
        user = qr.query("select * from User where id=?", new BeanHandler<User>(User.class), id);
        if (user == null) {
            return new ErrorResult(404);
        }
        if ((tag = tag.trim()).isEmpty()) tag = null;
        if (tag == null) {
            articles = qr.query("select * from Article where authorId=? order by postDate desc limit ? offset ?", new BeanListHandler<Article>(Article.class),
                    user.id, pageSize, (pg - 1) * pageSize);
 
View Full Code Here

Examples of cn.webwheel.results.ErrorResult

    @Action
    public Object html(int id, int pg) throws SQLException {
        topic = topicService.findTopic(id);
        if (topic == null) {
            return new ErrorResult(404);
        }
        author = userService.findUser(topic.authorId);
        replies = topicService.listReply(topic.id, pg, 30);
        for (Reply reply : replies) {
            reply.author = userService.findUser(reply.authorId);
View Full Code Here

Examples of cn.webwheel.results.ErrorResult

            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);
            }
        } else {
            article = new Article();
        }
        return new TemplateResult(this);
View Full Code Here

Examples of cn.webwheel.results.ErrorResult

    @Action(value = "?article.id=$1&pg=$3", rest = "/article/(\\d+)(/(\\d+))?")
    public Object html() throws SQLException {
        article = qr.query("select * from Article where id=?", new BeanHandler<Article>(Article.class), article.id);
        if (article == null) {
            return new ErrorResult(404);
        }
        qr.update("update Article set view=view+1 where id=?", article.id);
        user = qr.query("select * from User where id=?", new BeanHandler<User>(User.class), article.authorId);
        if (user == null) {
            return new ErrorResult(404);
        }
        String[] tags = article.getTagList();
        if (tags.length > 0) {
            tag = tags[0];
        }
View Full Code Here

Examples of cn.webwheel.results.ErrorResult

    @Action
    public Object html() throws SQLException {
        board = boardService.findBoard(id);
        if (board == null) {
            return new ErrorResult(404);
        }
        topics = topicService.listBoardTopic(id, pg, 30);
        return new TemplateResult(this);
    }
View Full Code Here

Examples of cn.webwheel.results.ErrorResult

        if (id == 0) {
            category = new BoardCategory();
        } else {
            category = boardService.findCategory(id);
            if (category == null) {
                return new ErrorResult(404);
            }
        }
        return new TemplateResult(this);
    }
View Full Code Here

Examples of cn.webwheel.results.ErrorResult

        if (id == null) {
            user = new User();
        } else {
            user = userService.findUser(id);
            if (user == null) {
                return new ErrorResult(404);
            }
        }
        return new TemplateResult(this);
    }
View Full Code Here

Examples of cn.webwheel.results.ErrorResult

        if (id == 0 && boardCategoryId != 0) {
            board = new Board();
            board.boardCategoryId = boardCategoryId;
            board.category = boardService.findCategory(boardCategoryId);
            if (board.category == null) {
                return new ErrorResult(404);
            }
        } else {
            board = boardService.findBoard(id);
            if (board == null) {
                return new ErrorResult(404);
            }
        }
        return new TemplateResult(this);
    }
View Full Code Here

Examples of com.iisigroup.cap.response.ErrorResult

      result = plugin.execute(request);

    } catch (Exception e) {
      IErrorResult errorResult = getDefaultErrorResult();
      if (errorResult == null) {
        result = new ErrorResult(request, e);
      } else {
        errorResult.putError(request, e);
        result = errorResult;
      }
      if (e instanceof CapMessageException) {
View Full Code Here

Examples of org.apache.openmeetings.data.beans.basic.ErrorResult

                language_id);
        Fieldlanguagesvalues typeValue = fieldManager
            .getFieldByIdAndLanguage(errorManagement.getErrorType(eValues.getErrortype_id())
                .getFieldvalues_id(), language_id);
        if (errorValue != null) {
          return new ErrorResult(errorid, errorValue.getValue(),
              typeValue.getValue());
        }
      }
    } else {
      return new ErrorResult(errorid,
          "Error ... please check your input", "Error");
    }
    return null;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.