Examples of Dashboard


Examples of org.jboss.dashboard.ui.Dashboard

        }
        getDashboard().refresh();
    }

    public CommandResponse actionClear(CommandRequest request) throws Exception {
        Dashboard dashboard = getDashboard();
        if (dashboard.unfilter()) {
            return new ShowCurrentScreenResponse();
        }
        return null;
    }
View Full Code Here

Examples of org.jboss.dashboard.ui.Dashboard

    public CommandResponse actionDeleteFilteredProperty(CommandRequest request) throws Exception {
        String propertyToDelete = request.getRequestObject().getParameter("filteredPropertyToDelete");
        if (propertyToDelete == null || propertyToDelete.trim().length() == 0) return null;

        Dashboard dashboard = getDashboard();
        if (dashboard.unfilter(propertyToDelete)) {
            return new ShowCurrentScreenResponse();
        }
        return null;
    }
View Full Code Here

Examples of org.jboss.dashboard.ui.Dashboard

        int rowIndex = Integer.parseInt(request.getRequestObject().getParameter("rowindex"));
        int columnIndex = Integer.parseInt(request.getRequestObject().getParameter("columnindex"));

        DataSetTable dataSetTable = (DataSetTable) getTable();
        DataProperty selectedProperty = dataSetTable.getDataProperty(columnIndex);
        Dashboard dashboard = DashboardHandler.lookup().getCurrentDashboard();
        Object selectedValue = dataSetTable.getValueAt(rowIndex, columnIndex);
        if (selectedValue instanceof Interval) {
            if (dashboard.filter(selectedProperty.getPropertyId(), (Interval) selectedValue, FilterByCriteria.ALLOW_ANY)) {
                // If drill-down then force the whole screen to be refreshed.
                return new ShowCurrentScreenResponse();
            }
        } else {
            Collection values = new ArrayList();
            values.add(selectedValue);
            if (dashboard.filter(selectedProperty.getPropertyId(), null, false, null, false, values, FilterByCriteria.ALLOW_ANY)) {
                // If drill-down then force the whole screen to be refreshed.
                return new ShowCurrentScreenResponse();
            }
        }
        return null;
View Full Code Here

Examples of org.jboss.dashboard.ui.Dashboard

        // Return an existent dashboard.
        Long key = section.getDbid();
        if (dashboards.containsKey(key)) return dashboards.get(key);

        // Initialize a dashboard instance for the section.
        Dashboard dashboard = new Dashboard();
        dashboard.setSection(section);
        dashboard.addListener(listener);
        dashboards.put(key, dashboard);

        // Init the dashboard (the related data sets will be loaded).
        dashboard.init();
        return dashboard;
    }
View Full Code Here

Examples of org.jboss.dashboard.ui.Dashboard

    /**
     * Get the dashboard for the current page.
     */
    public synchronized Dashboard getCurrentDashboard() {
        NavigationManager navMgr = NavigationManager.lookup();
        Dashboard dashboard = getDashboard(navMgr.getCurrentSection());
        if (dashboard == null) return null// When a section is being deleted the current section is null.
       
        if (currentDashboard == null) return currentDashboard = dashboard;
        if (dashboard.equals(currentDashboard)) return currentDashboard;

        // If the dashboard has been abandoned then re-initialize it when coming back.
        currentDashboard = dashboard;
        dashboard.init();
        return dashboard;
    }
View Full Code Here

Examples of org.jboss.dashboard.ui.Dashboard

public class DashboardProcessor extends AbstractChainProcessor {

    private static final String PARAM_REFRESH = "refresh";

    public boolean processRequest() throws Exception {
        Dashboard dashboard = DashboardHandler.lookup().getCurrentDashboard();
        if (dashboard != null) {
            String refresh = getHttpRequest().getParameter(PARAM_REFRESH);
            boolean isRefresh = Boolean.parseBoolean(refresh);
            if (isRefresh) dashboard.refresh();
        }

        return true;
    }
View Full Code Here

Examples of org.jboss.dashboard.ui.Dashboard

        AbstractChartDisplayer abstractChartDisplayer = (AbstractChartDisplayer) getDataDisplayer();
        DataProperty property = abstractChartDisplayer.getDomainProperty();
        Integer series = Integer.decode(request.getRequestObject().getParameter(PARAM_NSERIE));
        DataSet dataSet = abstractChartDisplayer.buildXYDataSet();
        Interval interval = (Interval) dataSet.getValueAt(series, 0);
        Dashboard dashboard = DashboardHandler.lookup().getCurrentDashboard();
        if (dashboard.filter(property.getPropertyId(), interval, FilterByCriteria.ALLOW_ANY)) {
            return new ShowCurrentScreenResponse();
        }
        return null;
    }
View Full Code Here

Examples of org.jboss.dashboard.ui.Dashboard

        // Return an existent dashboard.
        Long key = section.getDbid();
        if (dashboards.containsKey(key)) return dashboards.get(key);

        // Initialize a dashboard instance for the section.
        Dashboard dashboard = new Dashboard();
        dashboard.setSection(section);
        dashboard.addListener(listener);
        dashboards.put(key, dashboard);

        // Init the dashboard (the related data sets will be loaded).
        dashboard.init();
        return dashboard;
    }
View Full Code Here

Examples of org.jboss.dashboard.ui.Dashboard

    /**
     * Get the dashboard for the current page.
     */
    public synchronized Dashboard getCurrentDashboard() {
        NavigationManager navMgr = NavigationManager.lookup();
        Dashboard dashboard = getDashboard(navMgr.getCurrentSection());
        if (dashboard == null) return null// When a section is being deleted the current section is null.
       
        if (currentDashboard == null) return currentDashboard = dashboard;
        if (dashboard.equals(currentDashboard)) return currentDashboard;

        // If the dashboard has been abandoned then re-initialize it when coming back.
        currentDashboard = dashboard;
        dashboard.init();
        return dashboard;
    }
View Full Code Here

Examples of org.jboss.dashboard.ui.Dashboard

        int rowIndex = Integer.parseInt(request.getRequestObject().getParameter("rowindex"));
        int columnIndex = Integer.parseInt(request.getRequestObject().getParameter("columnindex"));

        DataSetTable dataSetTable = (DataSetTable) getTable();
        DataProperty selectedProperty = dataSetTable.getDataProperty(columnIndex);
        Dashboard dashboard = DashboardHandler.lookup().getCurrentDashboard();
        Object selectedValue = dataSetTable.getValueAt(rowIndex, columnIndex);
        if (selectedValue instanceof Interval) {
            if (dashboard.filter(selectedProperty.getPropertyId(), (Interval) selectedValue, FilterByCriteria.ALLOW_ANY)) {
                // If drill-down then force the whole screen to be refreshed.
                return new ShowCurrentScreenResponse();
            }
        } else {
            Collection values = new ArrayList();
            values.add(selectedValue);
            if (dashboard.filter(selectedProperty.getPropertyId(), null, false, null, false, values, FilterByCriteria.ALLOW_ANY)) {
                // If drill-down then force the whole screen to be refreshed.
                return new ShowCurrentScreenResponse();
            }
        }
        return 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.