Examples of PanelInstance


Examples of org.jboss.dashboard.workspace.PanelInstance

            WorkspaceImpl workspace = (WorkspaceImpl) UIServices.lookup().getWorkspacesManager().getWorkspace(workspaceId);
            PanelInstance[] instances = workspace.getPanelInstancesInGroup(providerId);
            if (instances != null) {
                TreeSet instancias = new TreeSet(new Comparator() {
                    public int compare(Object o1, Object o2) {
                        PanelInstance p1 = (PanelInstance) o1;
                        PanelInstance p2 = (PanelInstance) o2;
                        return p1.getTitle(SessionManager.getLang()).compareToIgnoreCase(p2.getTitle(SessionManager.getLang()));
                    }
                });
                TreeSet grupos = new TreeSet();

                for (int i = 0; i < instances.length; i++) {
                    PanelInstance instance = instances[i];
                    String grupo = instance.getParameterValue(PanelInstance.PARAMETER_GROUP, language);
                    if (grupo != null && !"".equals(grupo.trim())) {
                        grupos.add(grupo);
                    } else {
                        instancias.add(instance);
                    }
                }
                for (Iterator iterator = grupos.iterator(); iterator.hasNext();) {
                    String grupo = (String) iterator.next();
                    children.add(getNewGroupNode(workspaceId, grupo));
                }
                for (Iterator iterator = instancias.iterator(); iterator.hasNext();) {
                    PanelInstance panelInstance = (PanelInstance) iterator.next();
                    children.add(getNewInstanceNode(panelInstance));
                }
            }
        } catch (Exception e) {
            log.error("Error: ", e);
View Full Code Here

Examples of org.jboss.dashboard.workspace.PanelInstance

        try {
            WorkspaceImpl workspace = (WorkspaceImpl) UIServices.lookup().getWorkspacesManager().getWorkspace(getWorkspaceId());
            PanelInstance[] instances = workspace.getPanelInstances();
            TreeSet instancias = new TreeSet(new Comparator() {
                public int compare(Object o1, Object o2) {
                    PanelInstance p1 = (PanelInstance) o1;
                    PanelInstance p2 = (PanelInstance) o2;
                    return p1.getTitle(SessionManager.getLang()).compareToIgnoreCase(p2.getTitle(SessionManager.getLang()));
                }
            });
            for (int i = 0; i < instances.length; i++) {
                PanelInstance instance = instances[i];
                String groupName = instance.getParameterValue(PanelInstance.PARAMETER_GROUP, language);
                String provider = instance.getProvider().getGroup();
                if (getGroupName().equals(groupName) && getProviderId().equals(provider)) {
                    instancias.add(instance);
                }
            }
            for (Iterator iterator = instancias.iterator(); iterator.hasNext();) {
                PanelInstance panelInstance = (PanelInstance) iterator.next();
                children.add(getNewInstanceNode(panelInstance));
            }

        } catch (Exception e) {
            log.error("Error: ", e);
View Full Code Here

Examples of org.jboss.dashboard.workspace.PanelInstance

            }
        }
    }

    protected boolean checkPanelDuplicated(Panel panel) {
        PanelInstance instance = panel.getInstance();
        Set sections = new HashSet();
        Panel[] panels = instance.getAllPanels();
        for (int i = 0; i < panels.length; i++) {
            Panel panel1 = panels[i];
            sections.add(panel1.getSection());
        }
        return sections.size() > 1;
View Full Code Here

Examples of org.jboss.dashboard.workspace.PanelInstance

                    renderFragment("outputHeaders");
                    Iterator it = panelInstances.iterator();
                    int counter = 0;
                    while (it.hasNext()) {
                        String instanceId = it.next().toString();
                        PanelInstance instance = workspace.getPanelInstance(instanceId);
                        setAttribute("instanceId", instanceId);
                        setAttribute("group", instance.getResource(instance.getProvider().getGroup(), getLocale()));
                        setAttribute("description", instance.getResource(instance.getProvider().getDescription(), getLocale()));
                        setAttribute("title", getLocalizedValue(instance.getTitle()));
                        setAttribute("counter", counter);
                        counter++;
                        renderFragment("outputOpt");
                    }
                    renderFragment("outputOptEnd");
View Full Code Here

Examples of org.jboss.dashboard.workspace.PanelInstance

        if (instances != null) {
            List sortedInstances = new ArrayList(instances.size());

            for (Iterator itInstance = instances.keySet().iterator(); itInstance.hasNext(); ) {
                Long instanceId = (Long) itInstance.next();
                PanelInstance instance = (PanelInstance) instances.get(instanceId);
                String title = (String) LocaleManager.lookup().localize(instance.getTitle());
                Map mapRepresentation = new HashMap();
                mapRepresentation.put("title", title);
                mapRepresentation.put("instanceId", instanceId);
                sortedInstances.add(mapRepresentation);
            }
View Full Code Here

Examples of org.jboss.dashboard.workspace.PanelInstance

        if (instances != null) {
            List sortedInstances = new ArrayList(instances.size());

            for (Iterator itInstance = instances.keySet().iterator(); itInstance.hasNext(); ) {
                Long instanceId = (Long) itInstance.next();
                PanelInstance instance = (PanelInstance) instances.get(instanceId);
                String title = (String) LocaleManager.lookup().localize(instance.getTitle());
                Map mapRepresentation = new HashMap();
                mapRepresentation.put("title", title);
                mapRepresentation.put("instanceId", instanceId);
                sortedInstances.add(mapRepresentation);
            }
View Full Code Here

Examples of org.jboss.dashboard.workspace.PanelInstance

        return true;
    }

    private void prepareConfigure(PanelInstance instance) {
        // We'll work on a cloned copy to
        PanelInstance panel = instance.getPartialClonedCopy();

        // Store panel in session
        SessionManager.setCurrentPanel(panel);

        FormStatus formStatus = new FormStatus();
View Full Code Here

Examples of org.jboss.dashboard.workspace.PanelInstance

            WorkspaceImpl workspace = (WorkspaceImpl) UIServices.lookup().getWorkspacesManager().getWorkspace(workspaceId);
            PanelInstance[] instances = workspace.getPanelInstancesInGroup(providerId);
            if (instances != null) {
                TreeSet instancias = new TreeSet(new Comparator() {
                    public int compare(Object o1, Object o2) {
                        PanelInstance p1 = (PanelInstance) o1;
                        PanelInstance p2 = (PanelInstance) o2;
                        return p1.getTitle(SessionManager.getLang()).compareToIgnoreCase(p2.getTitle(SessionManager.getLang()));
                    }
                });
                TreeSet grupos = new TreeSet();

                for (int i = 0; i < instances.length; i++) {
                    PanelInstance instance = instances[i];
                    String grupo = instance.getParameterValue(PanelInstance.PARAMETER_GROUP, language);
                    if (grupo != null && !"".equals(grupo.trim())) {
                        grupos.add(grupo);
                    } else {
                        instancias.add(instance);
                    }
                }
                for (Iterator iterator = grupos.iterator(); iterator.hasNext();) {
                    String grupo = (String) iterator.next();
                    children.add(getNewGroupNode(workspaceId, grupo));
                }
                for (Iterator iterator = instancias.iterator(); iterator.hasNext();) {
                    PanelInstance panelInstance = (PanelInstance) iterator.next();
                    children.add(getNewInstanceNode(panelInstance));
                }
            }
        } catch (Exception e) {
            log.error("Error: ", e);
View Full Code Here

Examples of org.jboss.dashboard.workspace.PanelInstance

            WorkspaceImpl workspace = (WorkspaceImpl) UIServices.lookup().getWorkspacesManager().getWorkspace(workspaceId);
            PanelInstance[] instances = workspace.getPanelInstancesInGroup(providerId);
            if (instances != null) {
                TreeSet instancias = new TreeSet(new Comparator() {
                    public int compare(Object o1, Object o2) {
                        PanelInstance p1 = (PanelInstance) o1;
                        PanelInstance p2 = (PanelInstance) o2;
                        return p1.getTitle(SessionManager.getLang()).compareToIgnoreCase(p2.getTitle(SessionManager.getLang()));
                    }
                });
                TreeSet grupos = new TreeSet();

                for (int i = 0; i < instances.length; i++) {
                    PanelInstance instance = instances[i];
                    String grupo = instance.getParameterValue(PanelInstance.PARAMETER_GROUP, language);
                    if (grupo != null && !"".equals(grupo.trim())) {
                        grupos.add(grupo);
                    } else {
                        instancias.add(instance);
                    }
                }
                for (Iterator iterator = grupos.iterator(); iterator.hasNext();) {
                    String grupo = (String) iterator.next();
                    children.add(getNewGroupNode(workspaceId, grupo));
                }
                for (Iterator iterator = instancias.iterator(); iterator.hasNext();) {
                    PanelInstance panelInstance = (PanelInstance) iterator.next();
                    children.add(getNewInstanceNode(panelInstance));
                }
            }
        } catch (Exception e) {
            log.error("Error: ", e);
View Full Code Here

Examples of org.jboss.dashboard.workspace.PanelInstance

    private ShowPanelConfigComponent showPanelConfigComponent;

    public void service(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws FormatterException {
        try {
            PanelInstance instance = showPanelConfigComponent.getPanelInstance();
            if (instance != null) {
                renderFragment("outputStart");

                renderPanelParameters(httpServletRequest, instance, instance.getSystemParameters());
                renderPanelParameters(httpServletRequest, instance, instance.getCustomParameters());

                renderFragment("outputEnd");
            } else {
                log.warn("Error: panelInstance is null");
            }
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.