Package org.jboss.dashboard.ui

Examples of org.jboss.dashboard.ui.Dashboard


        }
    }

    public CommandResponse actionClear(CommandRequest request) {
        try {
            Dashboard dashboard = getDashboard();
            if (dashboard.unfilter()) {
                return new ShowCurrentScreenResponse();
            }
        } catch (Exception e) {
            log.error("Cannot refresh dashboard.",e);
        }
View Full Code Here


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

        try {
            Dashboard dashboard = getDashboard();
            if (dashboard.unfilter(propertyToDelete)) {
                return new ShowCurrentScreenResponse();
            }
        } catch (Exception e) {
            log.error("Cannot remove filter property.",e);
        }
View Full Code Here

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

        DataSetTable dataSetTable = (DataSetTable) getTable();
        DataProperty selectedProperty = dataSetTable.getDataProperty(columnIndex);
        DataProperty groupByProperty = dataSetTable.getGroupByProperty();
        Dashboard dashboard = DashboardHandler.lookup().getCurrentDashboard();
        if (groupByProperty != null) {
            // When the table is grouped then get the interval selected.
            Interval selectedInterval = (Interval) dataSetTable.getDataSet().getValueAt(rowIndex, 0);
            if (dashboard.filter(selectedProperty.getPropertyId(), selectedInterval, FilterByCriteria.ALLOW_ANY)) {
                // If drill-down then force the whole screen to be refreshed.
                return new ShowCurrentScreenResponse();
            }
        } else {
            Object selectedValue = dataSetTable.getValueAt(rowIndex, columnIndex);
            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

                Object minValue = result[1];
                Object maxValue = result[2];
                if (allowedValues == null && minValue == null && maxValue == null) continue;

                // Set the filter with this property.
                Dashboard currentDashboard = DashboardHandler.lookup().getCurrentDashboard();
                if (currentDashboard.filter(dashboardFilterProperty.getPropertyId(), minValue, true, maxValue, true, allowedValues, FilterByCriteria.ALLOW_ANY)) {
                    return new ShowCurrentScreenResponse();
                }
            }
        } catch (Exception e) {
            log.error("Error trying to filter properties for dashboard", e);
View Full Code Here

        }
    }

    public CommandResponse actionClear(CommandRequest request) {
        try {
            Dashboard dashboard = getDashboard();
            if (dashboard.unfilter()) {
                return new ShowCurrentScreenResponse();
            }
        } catch (Exception e) {
            log.error("Cannot refresh dashboard.",e);
        }
View Full Code Here

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

        try {
            Dashboard dashboard = getDashboard();
            if (dashboard.unfilter(propertyToDelete)) {
                return new ShowCurrentScreenResponse();
            }
        } catch (Exception e) {
            log.error("Cannot remove filter property.",e);
        }
View Full Code Here

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

        // Initialize a dashboard instance for the section.
        Dashboard dashboard = new Dashboard();
        dashboard.setSection(section);
        dashboard.init();
        dashboard.addListener(listener);
        dashboards.put(key, dashboard);
        return dashboard;
    }
View Full Code Here

    /**
     * Get the dashboard for the current page.
     */
    public 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.
        dashboard.init();
        return currentDashboard = dashboard;
    }
View Full Code Here

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

        DataSetTable dataSetTable = (DataSetTable) getTable();
        DataProperty selectedProperty = dataSetTable.getDataProperty(columnIndex);
        DataProperty groupByProperty = dataSetTable.getGroupByProperty();
        Dashboard dashboard = DashboardHandler.lookup().getCurrentDashboard();
        if (groupByProperty != null) {
            // When the table is grouped then get the interval selected.
            Interval selectedInterval = groupByProperty.getDomain().getIntervals()[rowIndex];
            dashboard.filter(selectedProperty.getPropertyId(), selectedInterval, FilterByCriteria.ALLOW_ANY);
        } else {
            Object selectedValue = dataSetTable.getValueAt(rowIndex, columnIndex);
            Collection values = new ArrayList();
            values.add(selectedValue);
            dashboard.filter(selectedProperty.getPropertyId(), null, false, null, false, values, FilterByCriteria.ALLOW_ANY);
        }
    }
View Full Code Here

TOP

Related Classes of org.jboss.dashboard.ui.Dashboard

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.