PortletRemover.java 文件源码

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

项目:lr7-test-project 作者:
/**
 * Remove portlet from the page
 *
 * @param request The request
 * @param response The response
 */
@ProcessAction(name = "removePortlet")
public void removePortletAction(ActionRequest request, ActionResponse response) throws IOException {
    Layout currentLayout = (Layout) request.getAttribute(WebKeys.LAYOUT);
    String portletId = ParamUtil.getString(request, RQ_PARAM_PORTLET_ID, null);

    if(portletId != null) {
        Matcher m = PATTERN_PORTLET_ID.matcher(portletId);

        if(m.matches()) {
            try {
                this.serviceRef.removePortlet(currentLayout, portletId);
            } catch(PortalException e) {
                LOG.error("Unable to remove portlet", e);
            }
        }
    }

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号