Examples of PortletURL


Examples of com.dotcms.repackage.javax.portlet.PortletURL

  public void setProperty(String key, String value) {
  }

  public PortletURL createActionURL() {
    PortletURL portletURL = createPortletURL(true);

    try {
      portletURL.setWindowState(_req.getWindowState());
    }
    catch (WindowStateException wse) {
    }

    try {
      portletURL.setPortletMode(_req.getPortletMode());
    }
    catch (PortletModeException pme) {
    }

    return portletURL;
View Full Code Here

Examples of javax.portlet.PortletURL

            PortletContext.setContext(portletContext);

            ActionContext actionContext = (ActionContext) PortletMessaging.receive(request, "ActionContext");
            ActionContext.setContext(actionContext);

            PortletURL portletURL = response.createActionURL();
            String actionURL = portletURL.toString();
            PortletContext.getContext().setActionURL(actionURL);

            String template = (String) request.getPortletSession().getAttribute(RENDER_TEMPLATE);
            if (template == null || "".equals(template)) {
                template = getInitParameter(defalutFile);
View Full Code Here

Examples of javax.portlet.PortletURL

        } else {
            userInfo.setValue("-");
        }

        // Create Edit/Done link (actionUrl)
        PortletURL url = getSession().generateActionURL("changeMode");
        try {
            if (inViewMode) {
                url.setPortletMode(PortletMode.EDIT);
                portletEdit.setCaption("Edit");
            } else {
                url.setPortletMode(PortletMode.VIEW);
                portletEdit.setCaption("Done");
            }
            portletEdit.setResource(new ExternalResource(url.toString()));
        } catch (Exception e) {
            portletEdit.setEnabled(false);
            Logger.getLogger(getClass().getName()).log(Level.SEVERE,
                    "Error creating edit mode link", e);
        }

        // Create Maximize/Normal link (actionUrl)
        url = getSession().generateActionURL("changeState");
        try {
            if (inNormalState) {
                url.setWindowState(WindowState.MAXIMIZED);
                portletMax.setCaption("Maximize");
            } else {
                url.setWindowState(WindowState.NORMAL);
                portletMax.setCaption("Back to normal");

            }
            portletMax.setResource(new ExternalResource(url.toString()));
        } catch (Exception e) {
            portletMax.setEnabled(false);
            Logger.getLogger(getClass().getName()).log(Level.SEVERE,
                    "Error creating state change link", e);
        }

        if (someAction == null) {
            url = getSession().generateActionURL("someAction");
            try {
                someAction = new Link("An action", new ExternalResource(
                        url.toString()));
                main.addComponent(someAction);
            } catch (Exception e) {
                // Oops
                System.err.println("Could not create someAction: " + e);
            }
View Full Code Here

Examples of javax.portlet.PortletURL

                        return;
                    }
                   
                    client.write(destinationURL, forceRefresh, response.getWriter());

                    PortletURL actionURL = response.createActionURL();
                    ScriptPostProcess processor = new ScriptPostProcess();
                    processor.setInitalPage(page);
                    processor.postProcessPage(actionURL, ACTION_PARAMETER_SSOPROXY);
                    String finalPage = processor.getFinalizedPage();
                   
View Full Code Here

Examples of javax.portlet.PortletURL

     * @param actionForward
     * @return
     */   
    public PortletURL getView(String viewName)
    {
        PortletURL url = response.createRenderURL();       
        buildLink(viewName, url);
        return url;
    }
View Full Code Here

Examples of javax.portlet.PortletURL

     * @return
     */
    public PortletURL getLink(String actionForward)
    {
        String forwardName = model.getForward(actionForward);
        PortletURL url = response.createRenderURL();
        buildLink(forwardName, url);
        return url;
    }
View Full Code Here

Examples of javax.portlet.PortletURL

     * @return
     */   
    public PortletURL getLink(String forward, String action)
    {
        String actionForward = model.getForward(forward, action);
        PortletURL url = response.createRenderURL();
        buildLink(actionForward, url);
        return url;
    }
View Full Code Here

Examples of javax.portlet.PortletURL

    private static PortletURL createPortletURL(ServletRequest request,
            String pageURL, boolean actionURL)
    {
        RenderResponse renderResponse = (RenderResponse) request
                .getAttribute("javax.portlet.response");
        PortletURL portletURL;
        if (actionURL)
            portletURL = renderResponse.createActionURL();
        else
            portletURL = renderResponse.createRenderURL();
        if (request instanceof HttpServletRequest)
        {
            String contextPath = ((HttpServletRequest) request)
                    .getContextPath();
            if (pageURL.startsWith(contextPath))
                pageURL = pageURL.substring(contextPath.length());
        }
        portletURL.setParameter(PAGE, pageURL.replaceAll("&","&"));
        if (actionURL)
        {
            String originURL = request.getParameter(PAGE);
            if (originURL != null)
                portletURL.setParameter(ORIGIN, originURL);
        }
        return portletURL;
    }
View Full Code Here

Examples of javax.portlet.PortletURL

        if (!(response instanceof RenderResponse))
        {
            throw new IllegalStateException("Must be a RenderResponse");
        }
        RenderResponse renderResponse = (RenderResponse) response;
        PortletURL actionURL = renderResponse.createActionURL();
        return (actionURL.toString());
    }
View Full Code Here

Examples of javax.portlet.PortletURL

        */
       
       
       
        // Post Process for generated page   
        PortletURL actionURL = response.createActionURL();
        ScriptPostProcess processor = new ScriptPostProcess();
        processor.setInitalPage(page);
        processor.postProcessPage(actionURL, PerlParameters.ACTION_PARAMETER_PERL);
        String finalPage = processor.getFinalizedPage();
       
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.