1 16 package org.apache.pluto.portlet.admin.controller; 17 18 import java.io.IOException ; 19 20 import javax.portlet.ActionRequest; 21 import javax.portlet.ActionResponse; 22 import javax.portlet.PortletException; 23 import javax.portlet.RenderRequest; 24 import javax.portlet.RenderResponse; 25 26 import org.apache.pluto.portlet.admin.PlutoAdminConstants; 27 import org.apache.pluto.portlet.admin.services.PageRegistryService; 28 29 35 public class PageRegistryPortlet extends ControllerPortlet { 36 37 private PageRegistryService service = null; 38 39 42 protected void doEdit(RenderRequest request, RenderResponse response) 43 throws PortletException, IOException { 44 String rows = request.getParameter("rows"); 45 String cols = request.getParameter("cols"); 46 if (rows != null && cols != null) { 47 request.setAttribute("rows", rows); 48 request.setAttribute("cols", cols); 49 _incEdit = "/PageRegistryEdit2.jsp"; 50 } 51 super.doEdit(request, response); 52 } 53 56 protected void doView(RenderRequest request, RenderResponse response) 57 throws PortletException, IOException { 58 service.getAllPages(request); 59 super.doView(request, response); 60 } 61 64 public void init() throws PortletException { 65 super.init(); 66 service = new PageRegistryService(); 67 } 68 71 protected void doHelp(RenderRequest request, RenderResponse response) 72 throws PortletException, IOException { 73 super.doHelp(request, response); 75 } 76 79 public void processAction(ActionRequest request, ActionResponse response) 80 throws PortletException, IOException { 81 82 try { 83 String action = request.getParameter("action"); 84 log("Action param == " + action); 85 86 113 } catch (Throwable e) { 114 log("Error! ", e); 115 request.getPortletSession().setAttribute(PlutoAdminConstants.ERROR_ATTR, e); 116 } 117 } 118 } 119 | Popular Tags |