@Override
  public void processAction(ActionRequest portletReq, ActionResponse portletResp)
      throws PortletException, IOException {
    LOGGER.entering(LOG_CLASS, "main portlet processAction entry");

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

    StringWriter writer = new StringWriter();
  }
예제 #2
0
 /**
  * Process an action request.
  *
  * @see javax.portlet.Portlet#processAction(javax.portlet.ActionRequest,
  *     javax.portlet.ActionResponse)
  */
 public void processAction(ActionRequest request, ActionResponse response)
     throws PortletException, java.io.IOException {
   if (request.getParameter(FORM_SUBMIT) != null) {
     // Set form text in the session bean
     Vlado2PortletSessionBean sessionBean = getSessionBean(request);
     if (sessionBean != null) sessionBean.setFormText(request.getParameter(FORM_TEXT));
   }
   if (request.getParameter(EDIT_SUBMIT) != null) {
     PortletPreferences prefs = request.getPreferences();
     try {
       prefs.setValue(EDIT_KEY, request.getParameter(EDIT_TEXT));
       prefs.store();
     } catch (ReadOnlyException roe) {
     } catch (ValidatorException ve) {
     }
   }
   if (request.getParameter(CONFIG_SUBMIT) != null) {
     PortletPreferences prefs = request.getPreferences();
     try {
       prefs.setValue(CONFIG_KEY, request.getParameter(CONFIG_TEXT));
       prefs.store();
     } catch (ReadOnlyException roe) {
     } catch (ValidatorException ve) {
     }
   }
 }
  @Override
  public void processAction(ActionRequest portletReq, ActionResponse portletResp)
      throws PortletException, IOException {
    LOGGER.entering(LOG_CLASS, "main portlet processAction entry");

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

    StringWriter writer = new StringWriter();

    // Now do the actual dispatch
    String target =
        JSP_PREFIX
            + "DispatcherReqRespTests3_SPEC2_19_IncludeJSPActionResponse"
            + JSP_SUFFIX
            + "?"
            + QUERY_STRING;
    PortletRequestDispatcher rd = portletConfig.getPortletContext().getRequestDispatcher(target);
    rd.include(portletReq, portletResp);
  }