ContentPortlet.java 文件源码

java
阅读 18 收藏 0 点赞 0 评论 0

项目:govapps 作者:
/**
    * This Action gets a category from the database and puts it into the
    * request. It also sets the "jspPage" parameter to "editCategory" so that
    * processing is forwarded to edit_category.jsp.
    *
    * @param request
    * @param response
    * @throws PortalException 
    * @throws java.lang.Exception
    */
@ProcessAction(name = "categoryDisplayUpdate")
public void categoryDisplayUpdate(ActionRequest request, ActionResponse response) {
    try {
        long categoryId = ParamUtil.getLong(request, "categoryId");

        if (Validator.isNotNull(categoryId)) {
            Category category = CategoryLocalServiceUtil.getCategory(categoryId);
            request.setAttribute("category", category);
            response.setRenderParameter("jspPage", contentEditCategoryJSP);
        }
    } catch (Exception e) {
        _log.debug(e.getMessage());
        request.setAttribute("errorMsg", e.getMessage());
        response.setRenderParameter("jspPage", contentErrorJSP);            
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号