Package javax.portlet

Examples of javax.portlet.PortletResponse


        {
            url.append(".action");
        }
        // 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 );
View Full Code Here


        /*
         * This dummy page is used by action responses to redirect to, in order
         * to prevent the boot strap code from being rendered into strange
         * places such as iframes.
         */
        PortletResponse portletResponse = ((VaadinPortletResponse) response)
                .getPortletResponse();
        if (portletResponse instanceof ResourceResponse) {
            ((ResourceResponse) portletResponse).setContentType("text/html");
        }

View Full Code Here

    public boolean handleRequest(VaadinSession session, VaadinRequest request,
            VaadinResponse response) throws IOException {
        if (!(response instanceof VaadinPortletResponse)) {
            return false;
        }
        PortletResponse portletResponse = ((VaadinPortletResponse) response)
                .getPortletResponse();
        if (portletResponse instanceof StateAwareResponse) {
            // StateAwareResponse is fully handled by listeners through
            // PortletListenerNotifier
            return true;
View Full Code Here

        return getPortletConfig().getPortletName();
    }
   
    public void setTitle(String title)
    {
        PortletResponse response = getPortletResponse();
       
        if (response instanceof RenderResponse)
        {
            RenderResponse renderResponse = (RenderResponse) response;
            renderResponse.setTitle(title);
View Full Code Here

        {
            key = key + ":" + view;
        }
        if (uniqueIds != null)
        {
            PortletResponse response = (PortletResponse) context
                    .getExternalContext().getResponse();
            if (!(response instanceof RenderResponse))
            {
                log.error("Cant encode action response");
            } else
View Full Code Here

    // response so consumers can detect
    if (mViewRoot.getClass().getAnnotation(PortletNamingContainer.class) != null)
    {
      try
      {
        PortletResponse pr = (PortletResponse) mExternalContext.getResponse();
        pr.addProperty(Bridge.PORTLET_NAMESPACED_RESPONSE_PROPERTY, "true");
      }
      catch (Exception e)
      {
        // TODO: log message
        ; // do nothing -- just forge ahead
View Full Code Here

    // ------------------------------------------------------- Protected Methods


    protected void setLocale(Context context, Locale locale) {

    PortletResponse response = (PortletResponse)
        context.get("response");
    //  response.setLocale(locale);
    // Not supported by the Portlet API

    }
View Full Code Here

        {
            url.append(".action");
        }
        // 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 );
View Full Code Here

            VaadinRequest request, VaadinResponse response) throws IOException {

        VaadinPortletSession sess = (VaadinPortletSession) session;
        PortletRequest portletRequest = ((VaadinPortletRequest) request)
                .getPortletRequest();
        PortletResponse portletResponse = ((VaadinPortletResponse) response)
                .getPortletResponse();

        // Finds the right UI
        UI uI = null;
        if (ServletPortletHelper.isUIDLRequest(request)) {
View Full Code Here

     *             if the portlet mode is not allowed for some reason
     *             (configuration, permissions etc.)
     */
    public void setPortletMode(UI uI, PortletMode portletMode)
            throws IllegalStateException, PortletModeException {
        PortletResponse response = getCurrentResponse();
        if (response instanceof MimeResponse) {
            PortletURL url = ((MimeResponse) response).createRenderURL();
            url.setPortletMode(portletMode);
            throw new RuntimeException("UI.open has not yet been implemented");
            // UI.open(new ExternalResource(url.toString()));
View Full Code Here

TOP

Related Classes of javax.portlet.PortletResponse

Copyright © 2018 www.massapicom. 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.