1 package org.exoplatform.services.portletcontainer.test.portlet; 2 3 import javax.portlet.*; 4 import java.io.IOException ; 5 import java.io.PrintWriter ; 6 7 11 12 19 public class PortletToTestNonUsageOfUndefinedState implements Portlet{ 20 public void init(PortletConfig portletConfig) throws PortletException { 21 } 23 24 public void processAction(ActionRequest actionRequest, ActionResponse actionResponse) throws PortletException, IOException { 25 } 27 28 public void render(RenderRequest renderRequest, RenderResponse renderResponse) throws PortletException, IOException { 29 renderResponse.setContentType("text/html"); 30 WindowState state = renderRequest.getWindowState(); 31 if(state != WindowState.NORMAL) 32 throw new PortletException(); 33 34 PrintWriter w = renderResponse.getWriter(); 35 w.println("Everything is ok"); 36 } 37 38 public void destroy() { 39 } 41 } 42 | Popular Tags |