Examples of URLMarkupGenerator


Examples of org.jboss.dashboard.ui.components.URLMarkupGenerator

        setAttribute("panelUID", HTTPSettings.AJAX_AREA_PREFFIX + "content_panel_" + panel.getPanelId());
        renderFragment("panelButton");
    }

    protected String getPanelActionLink(String action) {
        URLMarkupGenerator markupGenerator = UIServices.lookup().getUrlMarkupGenerator();
        return markupGenerator.getLinkToPanelAction(panel, action, false);
    }
View Full Code Here

Examples of org.jboss.dashboard.ui.components.URLMarkupGenerator

            NavigationManager navigationManager = NavigationManager.lookup();
            panel = navigationManager.getCurrentSection().getPanel(this.panel);
        } else {
            panel = (Panel) pageContext.getRequest().getAttribute(Parameters.RENDER_PANEL);
        }
        URLMarkupGenerator markupGenerator = UIServices.lookup().getUrlMarkupGenerator();
        String linkStr = markupGenerator.getLinkToPanelAction(panel, getAction(), params, Boolean.valueOf(useFriendlyUrl).booleanValue());
        try {
            pageContext.getOut().print(linkStr);
        } catch (java.io.IOException ex) {
            log.error("LinkTag error: " + linkStr, ex);
        }
View Full Code Here

Examples of org.jboss.dashboard.ui.components.URLMarkupGenerator

     * @param extraParams
     * @return
     * @deprecated. Use URLMarkupGenerator directly
     */
    public static String getLink(HttpServletRequest request, HttpServletResponse response, Panel panel, String action, String extraParams) {
        URLMarkupGenerator markupGenerator = UIServices.lookup().getUrlMarkupGenerator();
        String linkStr = markupGenerator.getLinkToPanelAction(panel, action, extraParams, true);
        return linkStr;
    }
View Full Code Here

Examples of org.jboss.dashboard.ui.components.URLMarkupGenerator

                ControllerServletHelper.lookup().initThreadLocal(wrap, getResponse());
            }
            catch (IOException ioe) {
                log.warn("IOException processing multipart ", ioe);
                log.warn("Invalid " + method + ": URL=" + getRequest().getRequestURL() + ". QueryString=" + getRequest().getQueryString());
                URLMarkupGenerator markupGenerator = UIServices.lookup().getUrlMarkupGenerator();
                if (markupGenerator != null) {
                    Map paramsMap = new HashMap();
                    paramsMap.put(RedirectionHandler.PARAM_PAGE_TO_REDIRECT, getErrorRedirectPage());
                    String uri = ContextTag.getContextPath(markupGenerator.getMarkup("org.jboss.dashboard.ui.components.RedirectionHandler", "redirectToSection", paramsMap), getRequest());
                    uri = StringEscapeUtils.unescapeHtml(uri);
                    getControllerStatus().setResponse(new RedirectToURLResponse(uri, !uri.startsWith(getRequest().getContextPath())));
                }
                return false;
            }
View Full Code Here

Examples of org.jboss.dashboard.ui.components.URLMarkupGenerator

    protected boolean isGlobalIncludeHost() {
        return Boolean.TRUE.equals(pageContext.getRequest().getAttribute(INCLUDE_HOST));
    }

    public String getContextHost() {
        URLMarkupGenerator urlmg = UIServices.lookup().getUrlMarkupGenerator();
        return urlmg.getContextHost(pageContext.getRequest());
    }
View Full Code Here

Examples of org.jboss.dashboard.ui.components.URLMarkupGenerator

            NavigationManager navigationManager = NavigationManager.lookup();
            panel = navigationManager.getCurrentSection().getPanel(this.panel);
        } else {
            panel = (Panel) pageContext.getRequest().getAttribute(Parameters.RENDER_PANEL);
        }
        URLMarkupGenerator markupGenerator = UIServices.lookup().getUrlMarkupGenerator();
        String linkStr = markupGenerator.getLinkToPanelAction(panel, getAction(), params, Boolean.valueOf(useFriendlyUrl).booleanValue());
        try {
            pageContext.getOut().print(linkStr);
        } catch (java.io.IOException e) {
            handleError(e);
        }
View Full Code Here

Examples of org.jboss.dashboard.ui.components.URLMarkupGenerator

     * @param extraParams
     * @return
     * @deprecated. Use URLMarkupGenerator directly
     */
    public static String getLink(HttpServletRequest request, HttpServletResponse response, Panel panel, String action, String extraParams) {
        URLMarkupGenerator markupGenerator = UIServices.lookup().getUrlMarkupGenerator();
        String linkStr = markupGenerator.getLinkToPanelAction(panel, action, extraParams, true);
        return linkStr;
    }
View Full Code Here

Examples of org.jboss.dashboard.ui.components.URLMarkupGenerator

            instanceGroup.put(instance.getInstanceId(), instance);
        }
        final String language = currentLocale.getLanguage();

        JavascriptTree tree = new JavascriptTree("Panels", 0);
        URLMarkupGenerator umkg = UIServices.lookup().getUrlMarkupGenerator();
        for (Iterator itGroups = groups.keySet().iterator(); itGroups.hasNext();) {
            String providerGroupName = (String) itGroups.next();
            Map providerGroup = (Map) groups.get(providerGroupName);
            JavascriptTree providerGroupTree = new JavascriptTree(providerGroupName, 0);
            for (Iterator itProviders = providerGroup.keySet().iterator(); itProviders.hasNext();) {
                String providerId = (String) itProviders.next();
                JavascriptTree providerTree = new JavascriptTree(providerId, 0);
                Map instanceGroups = (Map) providerGroup.get(providerId);
                for (Iterator itInstanceGroups = instanceGroups.keySet().iterator(); itInstanceGroups.hasNext();) {
                    String instanceGroupName = (String) itInstanceGroups.next();
                    if ("".equals(instanceGroupName)) {
                        Map instancesInGroup = (Map) instanceGroups.get(instanceGroupName);
                        for (Iterator itInstance = instancesInGroup.keySet().iterator(); itInstance.hasNext();) {
                            Long instanceId = (Long) itInstance.next();
                            PanelInstance instance = (PanelInstance) instancesInGroup.get(instanceId);
                            // Refactoring. The components system manages the actions by a configuration tree.
                            // with this condition we mantain the compatibility with the old configuration system.
                            String linkStr = "";

                            if ((request.getAttribute("configType") == null) || (request.getAttribute("configType").equals(STANDARD_CONFIG))){
                                Map params = new HashMap();
                                params.put("id=" , instance.getInstanceId());
                                linkStr = umkg.getMarkup("PanelsHandler", "createPanel", params);
                            }
                            else if (request.getAttribute("configType").equals(TREE_CONFIG))
                                linkStr = "javascript: submitForm(" + instanceId.toString() + ");";

                            String title = LocalizeTag.getLocalizedValue(instance.getTitle(), language, true);
View Full Code Here

Examples of org.jboss.dashboard.ui.components.URLMarkupGenerator

                ControllerServletHelper.lookup().updateRequestContext(wrap, response);
            }
            catch (IOException ioe) {
                log.warn("IOException processing multipart ", ioe);
                log.warn("Invalid " + method + ": URL=" + request.getRequestURL() + ". QueryString=" + request.getQueryString());
                URLMarkupGenerator markupGenerator = UIServices.lookup().getUrlMarkupGenerator();
                if (markupGenerator != null) {
                    Map paramsMap = new HashMap();
                    paramsMap.put(RedirectionHandler.PARAM_PAGE_TO_REDIRECT, errorRedirectPage);
                    String uri = ContextTag.getContextPath(markupGenerator.getMarkup("org.jboss.dashboard.ui.components.RedirectionHandler", "redirectToSection", paramsMap), request);
                    uri = StringEscapeUtils.unescapeHtml(uri);
                    controllerStatus.setResponse(new RedirectToURLResponse(uri, !uri.startsWith(request.getContextPath())));
                }
                return false;
            }
View Full Code Here

Examples of org.jboss.dashboard.ui.components.URLMarkupGenerator

        });
        return SKIP_BODY;
    }

    protected void printBaseHref() throws IOException {
        URLMarkupGenerator urlMarkupGenerator = UIServices.lookup().getUrlMarkupGenerator();
        ServletRequest request = pageContext.getRequest();
        String baseHref = urlMarkupGenerator.getBaseHref(request);
        StringBuffer sb = new StringBuffer();
        sb.append("<base href=\"").append(baseHref).append("\">");
        pageContext.getOut().println(sb);
    }
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.