Java Code Examples for javax.portlet.ActionResponse#setRenderParameters()

The following examples show how to use javax.portlet.ActionResponse#setRenderParameters() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EnvironmentTests_PortletPreferences_ApiResource.java    From portals-pluto with Apache License 2.0 5 votes vote down vote up
@Override
public void processAction(ActionRequest portletReq, ActionResponse portletResp)
    throws PortletException, IOException {

  portletResp.setRenderParameters(portletReq.getParameterMap());
  long tid = Thread.currentThread().getId();
  portletReq.setAttribute(THREADID_ATTR, tid);

}
 
Example 2
Source File: DispatcherReqRespTests5S_SPEC2_19_ForwardJSPActionResponse.java    From portals-pluto with Apache License 2.0 5 votes vote down vote up
@Override
public void processAction(ActionRequest portletReq, ActionResponse portletResp)
      throws PortletException, IOException {

   portletResp.setRenderParameters(portletReq.getParameterMap());
   long tid = Thread.currentThread().getId();
   portletReq.setAttribute(THREADID_ATTR, tid);

   // Now do the actual dispatch
   String target = JSP_PREFIX + "DispatcherReqRespTests5S_SPEC2_19_ForwardJSPActionResponse" + JSP_SUFFIX + "?" + QUERY_STRING;
   PortletRequestDispatcher rd = portletConfig.getPortletContext()
         .getRequestDispatcher(target);
   rd.forward(portletReq, portletResp);
}
 
Example 3
Source File: WrapperTests_ResourceResponseWrapper_ApiResource.java    From portals-pluto with Apache License 2.0 5 votes vote down vote up
@Override
public void processAction(ActionRequest portletReq,
      ActionResponse portletResp) throws PortletException, IOException {

   portletResp.setRenderParameters(portletReq.getParameterMap());
   long tid = Thread.currentThread().getId();
   portletReq.setAttribute(THREADID_ATTR, tid);

}
 
Example 4
Source File: SigTestsURL_PortletURL_SIGResourceActurl.java    From portals-pluto with Apache License 2.0 5 votes vote down vote up
@Override
public void processAction(ActionRequest portletReq, ActionResponse portletResp)
    throws PortletException, IOException {

  portletResp.setRenderParameters(portletReq.getParameterMap());
  long tid = Thread.currentThread().getId();
  portletReq.setAttribute(THREADID_ATTR, tid);

}
 
Example 5
Source File: SigTestsEnv_PortletPreferences_SIGRender.java    From portals-pluto with Apache License 2.0 5 votes vote down vote up
@Override
public void processAction(ActionRequest portletReq, ActionResponse portletResp)
    throws PortletException, IOException {

  portletResp.setRenderParameters(portletReq.getParameterMap());
  long tid = Thread.currentThread().getId();
  portletReq.setAttribute(THREADID_ATTR, tid);

}
 
Example 6
Source File: SigTestsEnv_WindowState_SIGRender.java    From portals-pluto with Apache License 2.0 5 votes vote down vote up
@Override
public void processAction(ActionRequest portletReq, ActionResponse portletResp)
    throws PortletException, IOException {

  portletResp.setRenderParameters(portletReq.getParameterMap());
  long tid = Thread.currentThread().getId();
  portletReq.setAttribute(THREADID_ATTR, tid);

}
 
Example 7
Source File: AddlPortletTests_SPEC2_15_Event.java    From portals-pluto with Apache License 2.0 5 votes vote down vote up
@Override
public void processAction(ActionRequest portletReq, ActionResponse portletResp)
    throws PortletException, IOException {

  portletResp.setRenderParameters(portletReq.getParameterMap());
  long tid = Thread.currentThread().getId();
  portletReq.setAttribute(THREADID_ATTR, tid);

  QName eventQName = new QName(TCKNAMESPACE, "AddlPortletTests_SPEC2_15_Event");
  portletResp.setEvent(eventQName, "Hi!");
}
 
Example 8
Source File: SigTestsWrapper_ActionResponseWrapper_SIGRender.java    From portals-pluto with Apache License 2.0 5 votes vote down vote up
@Override
public void processAction(ActionRequest portletReq, ActionResponse portletResp)
    throws PortletException, IOException {

  portletResp.setRenderParameters(portletReq.getParameterMap());
  long tid = Thread.currentThread().getId();
  portletReq.setAttribute(THREADID_ATTR, tid);

}
 
Example 9
Source File: URLTests_BaseURL_ApiRenderRenurl.java    From portals-pluto with Apache License 2.0 5 votes vote down vote up
@Override
public void processAction(ActionRequest portletReq,
      ActionResponse portletResp) throws PortletException, IOException {

   portletResp.setRenderParameters(portletReq.getParameterMap());
   long tid = Thread.currentThread().getId();
   portletReq.setAttribute(THREADID_ATTR, tid);

}
 
Example 10
Source File: PortletUtils.java    From spring4-understanding with Apache License 2.0 5 votes vote down vote up
/**
 * Clear all the render parameters from the {@link javax.portlet.ActionResponse}.
 * This may not be called when the action will call
 * {@link ActionResponse#sendRedirect sendRedirect}.
 * @param response the current action response
 * @see ActionResponse#setRenderParameters
 */
public static void clearAllRenderParameters(ActionResponse response) {
	try {
		response.setRenderParameters(new HashMap<String, String[]>(0));
	}
	catch (IllegalStateException ex) {
		// Ignore in case sendRedirect was already set.
	}
}
 
Example 11
Source File: EnvironmentTests_PortletRequestDispatcher_ApiRender.java    From portals-pluto with Apache License 2.0 5 votes vote down vote up
@Override
public void processAction(ActionRequest portletReq, ActionResponse portletResp)
    throws PortletException, IOException {

  portletResp.setRenderParameters(portletReq.getParameterMap());
  long tid = Thread.currentThread().getId();
  portletReq.setAttribute(THREADID_ATTR, tid);

}
 
Example 12
Source File: SigTestsEvent_PortletRequest_SIGEvent.java    From portals-pluto with Apache License 2.0 5 votes vote down vote up
@Override
public void processAction(ActionRequest portletReq, ActionResponse portletResp)
    throws PortletException, IOException {

  portletResp.setRenderParameters(portletReq.getParameterMap());
  long tid = Thread.currentThread().getId();
  portletReq.setAttribute(THREADID_ATTR, tid);

  QName eventQName = new QName(TCKNAMESPACE, "SigTestsEvent_PortletRequest_SIGEvent");
  portletResp.setEvent(eventQName, "Hi!");
}
 
Example 13
Source File: DispatcherReqRespTests4_SPEC2_19_IncludeServletResourceRequest.java    From portals-pluto with Apache License 2.0 5 votes vote down vote up
@Override
public void processAction(ActionRequest portletReq, ActionResponse portletResp)
      throws PortletException, IOException {

   portletResp.setRenderParameters(portletReq.getParameterMap());
   long tid = Thread.currentThread().getId();
   portletReq.setAttribute(THREADID_ATTR, tid);

}
 
Example 14
Source File: DispatcherReqRespTests5S_SPEC2_19_ForwardJSPActionRequest.java    From portals-pluto with Apache License 2.0 5 votes vote down vote up
@Override
public void processAction(ActionRequest portletReq, ActionResponse portletResp)
      throws PortletException, IOException {

   portletResp.setRenderParameters(portletReq.getParameterMap());
   long tid = Thread.currentThread().getId();
   portletReq.setAttribute(THREADID_ATTR, tid);

   // Now do the actual dispatch
   String target = JSP_PREFIX + "DispatcherReqRespTests5S_SPEC2_19_ForwardJSPActionRequest" + JSP_SUFFIX + "?" + QUERY_STRING;
   PortletRequestDispatcher rd = portletConfig.getPortletContext()
         .getRequestDispatcher(target);
   rd.forward(portletReq, portletResp);
}
 
Example 15
Source File: DispatcherReqRespTests1_SPEC2_19_ForwardJSPRenderResponse.java    From portals-pluto with Apache License 2.0 5 votes vote down vote up
@Override
public void processAction(ActionRequest portletReq, ActionResponse portletResp)
      throws PortletException, IOException {

   portletResp.setRenderParameters(portletReq.getParameterMap());
   long tid = Thread.currentThread().getId();
   portletReq.setAttribute(THREADID_ATTR, tid);

}
 
Example 16
Source File: SigTestsResource_PortletRequest_SIGResource.java    From portals-pluto with Apache License 2.0 5 votes vote down vote up
@Override
public void processAction(ActionRequest portletReq, ActionResponse portletResp)
    throws PortletException, IOException {

  portletResp.setRenderParameters(portletReq.getParameterMap());
  long tid = Thread.currentThread().getId();
  portletReq.setAttribute(THREADID_ATTR, tid);

}
 
Example 17
Source File: RequestTests_PortletRequest_ApiEvent.java    From portals-pluto with Apache License 2.0 5 votes vote down vote up
@Override
public void processAction(ActionRequest portletReq, ActionResponse portletResp)
      throws PortletException, IOException {
   LOGGER.trace("main portlet processAction entry");

   portletResp.setRenderParameters(portletReq.getParameterMap());
   long tid = Thread.currentThread().getId();
   portletReq.setAttribute(THREADID_ATTR, tid);

  

   QName eventQName = new QName(TCKNAMESPACE,
          "RequestTests_PortletRequest_ApiEvent");
   portletResp.setEvent(eventQName, "Hi!");
}
 
Example 18
Source File: DispatcherReqRespTests5S_SPEC2_19_IncludeJSPResourceResponse.java    From portals-pluto with Apache License 2.0 5 votes vote down vote up
@Override
public void processAction(ActionRequest portletReq, ActionResponse portletResp)
      throws PortletException, IOException {

   portletResp.setRenderParameters(portletReq.getParameterMap());
   long tid = Thread.currentThread().getId();
   portletReq.setAttribute(THREADID_ATTR, tid);

}
 
Example 19
Source File: AddlEnvironmentTests_SPEC2_17_RenderPreferences.java    From portals-pluto with Apache License 2.0 5 votes vote down vote up
@Override
public void processAction(ActionRequest portletReq, ActionResponse portletResp)
    throws PortletException, IOException {

  portletResp.setRenderParameters(portletReq.getParameterMap());
  long tid = Thread.currentThread().getId();
  portletReq.setAttribute(THREADID_ATTR, tid);

}
 
Example 20
Source File: DispatcherTests_SPEC2_19_ForwardServletResource.java    From portals-pluto with Apache License 2.0 3 votes vote down vote up
@Override
public void processAction(ActionRequest portletReq, ActionResponse portletResp) throws PortletException, IOException {

   portletResp.setRenderParameters(portletReq.getParameterMap());
   long tid = Thread.currentThread().getId();
   portletReq.setAttribute(THREADID_ATTR, tid);

   new StringWriter();

}