Examples of ActionResponse


Examples of com.cedarsoft.couchdb.ActionResponse

      throw new IllegalStateException( "Invalid media type: " + response.getType() );
    }

    UniqueId uniqueId = deserialize( response.getEntityInputStream() );

    return new ActionResponse( uniqueId, response.getStatus(), response.getLocation() );
  }
View Full Code Here

Examples of com.cedarsoft.couchdb.core.ActionResponse

    try {
      //Wrap the input stream
      try ( MaxLengthByteArrayOutputStream teedOut = new MaxLengthByteArrayOutputStream(); TeeInputStream teeInputStream = new TeeInputStream( entityInputStream, teedOut ) ) {
        UniqueId uniqueId = deserialize( teeInputStream );

        return new ActionResponse( uniqueId, response.getStatus(), response.getLocation(), teedOut.toByteArray() );
      }
    } catch ( IOException e ) {
      throw new RuntimeException( e );
    }
  }
View Full Code Here

Examples of javax.portlet.ActionResponse

        // Redirect
        HttpServletResponse servletResponse = ServletActionContext.getResponse();
        PortletResponse portletResponse = ((PortletServletResponse)servletResponse).getPortletResponse();
        if (portletResponse instanceof ActionResponse)
        {
            ActionResponse actionResponse = (ActionResponse)portletResponse;
            String redirectURL = actionResponse.encodeURL(url.toString());
            actionResponse.sendRedirect( redirectURL );
        }
        else
        {
          log.error("Unable to redirect the portlet RenderRequest to " + url.toString());
        }
View Full Code Here

Examples of javax.portlet.ActionResponse

            String action = namespace + actionName + "!" + renderMethod;
            if (log.isInfoEnabled())
              log.info("Diverting Portlet render action: " + action);

            // set action name
            ActionResponse res = PortletActionContext.getActionResponse();
            res.setRenderParameter(PortletActionConstants.ACTION_PARAM, action);
            sessionMap.put(WebAction.PORTLET_ACTION_RESULT, resultCode);

            // remove RENDER_DIRECT_LOCATION
      sessionMap.remove(RENDER_DIRECT_LOCATION);
        }  
View Full Code Here

Examples of javax.portlet.ActionResponse

                    try
                    {
                        prefs.setValue("appRows", Integer.toString(EditModeForm.this.getAppRows()));
                        prefs.setValue("portletRows", Integer.toString(EditModeForm.this.getPortletRows()));
                        prefs.store();
                        ActionResponse ar = (ActionResponse)((ApplicationsListApplication)this.getApplication()).getPortletResponse();
                        ar.setPortletMode(PortletMode.VIEW);                       
                    }
                    catch (ReadOnlyException e)
                    {
                        feedback.error(getString("pam.details.message.errorReadonly"));
                    }
View Full Code Here

Examples of javax.portlet.ActionResponse

                }
                // The view should have been restore.
                // Pass it to the render request.
                               
                request.getPortletSession().setAttribute(createViewRootKey(context, defaultPage, viewId), context.getViewRoot());
                ActionResponse actionResponse = (ActionResponse)response;
                               
                // actionResponse.setRenderParameter(viewId, context.getViewRoot().getViewId()); // get the navigation change
            }
            else if (renderRequest)
            {
View Full Code Here

Examples of javax.portlet.ActionResponse

            boolean saveAccountInput = uiAccountInput.save(service, true);
            if (saveAccountInput == false)
                return;
            uiForm.getChild(UIUserProfileInputSet.class).save(service, userName, true);
            uiForm.reset();
            ActionResponse actResponse = event.getRequestContext().getResponse();
            actResponse.setEvent(new QName("NewAccountAdded"), null);
        }
View Full Code Here

Examples of javax.portlet.ActionResponse

                        UIPortal uiPortal = Util.getUIPortal();
                        uiPortal.clearUIPage(pageRef);
                    }

                    // Update UserToolbarDashboardPortlet
                    ActionResponse actResponse = event.getRequestContext().getResponse();
                    actResponse.setEvent(new QName("NavigationChange"), userNode.getName());
                    return;
                }
            }
        }
View Full Code Here

Examples of javax.portlet.ActionResponse

            UIPopupWindow uiPopup = uiForm.getParent();
            uiPopup.setShow(false);
            UIComponent opener = uiPopup.getParent();

            ActionResponse response = event.getRequestContext().getResponse();
            response.setEvent(new QName("NavigationChange"), null);

            WebuiRequestContext pcontext = event.getRequestContext();
            pcontext.addUIComponentToUpdateByAjax(opener);
        }
View Full Code Here

Examples of javax.portlet.ActionResponse

                // The view should have been restore.
                // Pass it to the render request.
                request.getPortletSession().setAttribute(
                        createViewRootKey(context, defaultPage, viewId),
                        context.getViewRoot());
                ActionResponse actionResponse = (ActionResponse) response;

                // save FacesMessage objects on session; so they can
                // be restored during the render phase
                saveFacesMessages(context, request.getPortletSession());
            } else if (renderRequest)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.