1 16 17 package org.springframework.web.portlet.handler; 18 19 import javax.portlet.ActionRequest; 20 import javax.portlet.ActionResponse; 21 import javax.portlet.Portlet; 22 import javax.portlet.RenderRequest; 23 import javax.portlet.RenderResponse; 24 25 import org.springframework.web.portlet.HandlerAdapter; 26 import org.springframework.web.portlet.ModelAndView; 27 28 52 public class SimplePortletHandlerAdapter implements HandlerAdapter { 53 54 public boolean supports(Object handler) { 55 return (handler instanceof Portlet); 56 } 57 58 public void handleAction(ActionRequest request, ActionResponse response, Object handler) 59 throws Exception { 60 61 ((Portlet) handler).processAction(request, response); 62 } 63 64 public ModelAndView handleRender(RenderRequest request, RenderResponse response, Object handler) 65 throws Exception { 66 67 ((Portlet) handler).render(request, response); 68 return null; 69 } 70 71 } 72 | Popular Tags |