Package org.jboss.dashboard.ui.components

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


        // Ensure that the UI editor & viewer see the KPI
        passKPItoUI(kpi);
    }

    protected void passKPItoUI(KPI kpi) {
        KPIEditor kpiEditor = KPIEditor.lookup();
        KPIViewer kpiViewer = KPIViewer.lookup();
        if (kpiEditor.getKpi() == null) kpiEditor.setKpi(kpi);
        if (kpiViewer.getKpi() == null) kpiViewer.setKpi(kpi);
    }
View Full Code Here


    /**
     * Save changes on the KPI being edited.
     */
    public void actionSubmit(Panel panel, CommandRequest request) throws Exception {
        KPIEditor kpiEditor = KPIEditor.lookup();
        kpiEditor.actionSubmit(request);

        // Make the panel instance's description match the KPI description.
        String lang = LocaleManager.currentLang();
        String kpiDescr = request.getRequestObject().getParameter(KPIEditor.PARAM_KPI_DESCRIPTION);
        if (!StringUtils.isBlank(kpiDescr)) panel.getInstance().setTitle(kpiDescr, lang);

        // Make changes persistent.
        KPI kpi = kpiEditor.getKpi();
        kpi.save();

        // Ensure that the UI editor & viewer see the KPI changes
        passKPItoUI(kpi);
    }
View Full Code Here

        // Ensure that the UI editor & viewer see the KPI
        passKPItoUI(kpi);
    }

    protected void passKPItoUI(KPI kpi) {
        KPIEditor kpiEditor = UIBeanLocator.lookup().getEditor();
        KPIViewer kpiViewer = UIBeanLocator.lookup().getViewer();
        if (kpiEditor.getKpi() == null) kpiEditor.setKpi(kpi);
        if (kpiViewer.getKpi() == null) kpiViewer.setKpi(kpi);
    }
View Full Code Here

    /**
     * Save changes on the KPI being edited.
     */
    public void actionSubmit(Panel panel, CommandRequest request) throws Exception {
        KPIEditor kpiEditor = UIBeanLocator.lookup().getEditor();
        kpiEditor.actionSubmit(request);

        // Make the panel instance's description match the KPI description.
        String lang = LocaleManager.currentLang();
        String kpiDescr = request.getRequestObject().getParameter(KPIEditor.PARAM_KPI_DESCRIPTION);
        if (!StringUtils.isBlank(kpiDescr)) panel.getInstance().setTitle(kpiDescr, lang);

        // Make changes persistent.
        KPI kpi = kpiEditor.getKpi();
        kpi.save();

        // Ensure that the UI editor & viewer see the KPI changes
        passKPItoUI(kpi);
    }
View Full Code Here

        // Save the relationship between the panel and the KPI.
        panel.getInstance().setParameterValue(Dashboard.KPI_CODE, kpi.getCode());

        // Go to edit mode.
        KPIEditor kpiEditor = UIBeanLocator.lookup().getEditor(kpi);
        kpiEditor.setKpi(kpi);
        return panelActionEditMode(panel, request);
    }
View Full Code Here

    /**
     * Save changes on the KPI being edited.
     */
    public void actionSubmit(Panel panel, CommandRequest request) throws Exception {
        KPI kpi = getKPI(panel);
        KPIEditor kpiEditor = UIBeanLocator.lookup().getEditor(kpi);
        kpiEditor.actionSubmit(request);

        // Make the panel instance's description match the KPI description.
        String lang = LocaleManager.currentLang();
        String kpiDescr = request.getRequestObject().getParameter(KPIEditor.PARAM_KPI_DESCRIPTION);
        if (kpiDescr != null) panel.getInstance().setTitle(kpiDescr, lang);
View Full Code Here

TOP

Related Classes of org.jboss.dashboard.ui.components.KPIEditor

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.