Examples of URLMarkupGenerator


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

     * @param response
     * @param portableUrl Indicate if url shoulf be portable (slower) or not (faster for URL resources).
     * @return an url to the resource
     */
    public String getResourceUrl(ServletRequest request, ServletResponse response, boolean portableUrl) {
        URLMarkupGenerator markupGenerator = UIServices.lookup().getUrlMarkupGenerator();
        Map<String, String> params = new HashMap<String, String>();
        params.put("resName", portableUrl ? getPortableResourceName() : getResourceName());
        return markupGenerator.getPermanentLink("org.jboss.dashboard.ui.components.ResourcesHandler", "retrieve", params);
    }
View Full Code Here

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

     * @param response
     * @param portableUrl Indicate if url shoulf be portable (slower) or not (faster for URL resources).
     * @return an url to the resource
     */
    public String getResourceUrl(ServletRequest request, ServletResponse response, boolean portableUrl) {
        URLMarkupGenerator markupGenerator = UIServices.lookup().getUrlMarkupGenerator();
        Map params = new HashMap();
        params.put("resName", portableUrl ? getPortableResourceName() : getResourceName());
        return markupGenerator.getPermanentLink("org.jboss.dashboard.ui.components.ResourcesHandler", "retrieve", params);
    }
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

        });
        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

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

            workspace = (WorkspaceImpl) UIServices.lookup().getWorkspacesManager().getWorkspace(workspaceId);
        } catch (Exception e) {
            log.error("Error: ", e);
            return null;
        }
        URLMarkupGenerator markupGenerator = UIServices.lookup().getUrlMarkupGenerator();
        return markupGenerator.getLinkToWorkspace(workspace, true);
    }
View Full Code Here

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

        setAttribute("isAjax", isAjax);
        renderFragment("menuEntry" + (enabled ? "" : "Disabled"));
    }

    protected String getPanelActionLink(HttpServletRequest request, HttpServletResponse response, Panel panel, String action) {
        URLMarkupGenerator markupGenerator = UIServices.lookup().getUrlMarkupGenerator();
        return markupGenerator.getLinkToPanelAction(panel, action, true);
    }
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

        paramsMap.clear();
        return EVAL_BODY_INCLUDE;
    }

    public int doEndTag() throws JspException {
        URLMarkupGenerator urlMarkupGenerator = UIServices.lookup().getUrlMarkupGenerator();
        String markup = friendly ? urlMarkupGenerator.getMarkup(getBean(), getAction(), paramsMap) : urlMarkupGenerator.getPermanentLink(getBean(), getAction(), paramsMap) ;
        try {
            pageContext.getOut().print(markup);
        } catch (java.io.IOException ex) {
            log.error("Error: ", ex);
        }
View Full Code Here

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

    public int doStartTag() throws JspException {
        return EVAL_BODY_INCLUDE;
    }

    public int doEndTag() throws JspException {
        URLMarkupGenerator urlMarkupGenerator = UIServices.lookup().getUrlMarkupGenerator();
        String markup = friendly ? urlMarkupGenerator.getBaseURI() : urlMarkupGenerator.getServletMapping();
        try {
            pageContext.getOut().print(markup);
        } catch (java.io.IOException ex) {
            log.error("Error: ", ex);
        }
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.