Examples of ShowCurrentScreenResponse


Examples of org.jboss.dashboard.ui.controller.responses.ShowCurrentScreenResponse

                log.error("Error importing KPIs from file (" + file + ")", e);
                messagesHandler.addError(new ExportHandlerMessage("import.kpis.importAbortedError", new Object[] {}).getMessage(LocaleManager.currentLocale()));
            }
            setComponentIncludeJSP(getKpiImportResultJSP());
        }
        return new ShowCurrentScreenResponse();
    }
View Full Code Here

Examples of org.jboss.dashboard.ui.controller.responses.ShowCurrentScreenResponse

            File file = (File) request.getFilesByParamName().get("importFile");
            ImportResult[] results = getExportManager().load(new FileInputStream(file));
            getSessionInfo().setImportResult(results);
            return new ShowPanelPage(panel, request, PAGE_IMPORT_PREVIEW);
        }
        return new ShowCurrentScreenResponse();
    }
View Full Code Here

Examples of org.jboss.dashboard.ui.controller.responses.ShowCurrentScreenResponse

            File file = (File) request.getFilesByParamName().get("importFile");
            ImportResult[] results = getExportManager().load(new FileInputStream(file));
            getSessionInfo().setImportResult(results);
            return new ShowPanelPage(panel, request, PAGE_IMPORT_PREVIEW);
        }
        return new ShowCurrentScreenResponse();
    }
View Full Code Here

Examples of org.jboss.dashboard.ui.controller.responses.ShowCurrentScreenResponse

        });
        modalDialog.show();

        // Force the current screen to be refreshed so the error report will be displayed.
        ControllerStatus controllerStatus = ControllerStatus.lookup();
        controllerStatus.setResponse(new ShowCurrentScreenResponse());
    }
View Full Code Here

Examples of org.jboss.dashboard.ui.controller.responses.ShowCurrentScreenResponse

        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.controller.responses.ShowCurrentScreenResponse

            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();
            }
        } catch (Exception e) {
            log.error("Cannot apply filter.",e);
        }
        return null;
View Full Code Here

Examples of org.jboss.dashboard.ui.controller.responses.ShowCurrentScreenResponse

            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();
            }
        }
        return null;
    }
View Full Code Here

Examples of org.jboss.dashboard.ui.controller.responses.ShowCurrentScreenResponse

    }

    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.controller.responses.ShowCurrentScreenResponse

        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.controller.responses.ShowCurrentScreenResponse

     */
    public CommandResponse actionChangeScopeForElement(CommandRequest request) throws Exception {
        String graphicElement = request.getParameter("graphicElement");
        if (graphicElement == null || "".equals(graphicElement)) {
            log.error("Missing required parameter: graphicElement.");
            return new ShowCurrentScreenResponse();
        }
        String graphicElementClassName = graphicElement.substring(0, 1).toUpperCase() + graphicElement.substring(1);
        Class graphicElementClass = Class.forName("org.jboss.dashboard.ui.resources." + graphicElementClassName);
        Method managerGetter = graphicElementClass.getMethod("getManager", new Class[]{});
        GraphicElementManager manager = (GraphicElementManager) managerGetter.invoke(null, new Object[]{});
        FormStatus status = SessionManager.getCurrentFormStatus();
        status.clear();

        String elementId = request.getParameter(graphicElement + "Id");
        String workspaceId = request.getParameter("workspaceId");
        String sectionIdParam = request.getParameter("sectionId");
        String panelIdParam = request.getParameter("panelId");
        log.debug("Changing scope to " + workspaceId + "->" + sectionIdParam + "->" + panelIdParam);
        workspaceId = "".equals(workspaceId) ? null : workspaceId;
        Long sectionId = "".equals(sectionIdParam) || sectionIdParam == null ? null : new Long(sectionIdParam);
        Long panelId = "".equals(panelIdParam) || panelIdParam == null ? null : new Long(panelIdParam);
        if (workspaceId == null) {
            sectionId = null;
            panelId = null;
        }
        if (sectionId == null && manager.getElementScopeDescriptor().isAllowedPanel())
            panelId = null;

        if (elementId != null) {
            final GraphicElement element = manager.getElementByDbid(elementId);
            if (element != null) {
                log.debug("Find " + graphicElement + " with id=" + element.getId() + " and workspace=" + workspaceId + " and section=" + sectionId + " and panel=" + panelId);
                GraphicElement existingElement = manager.getElement(element.getId(), workspaceId, sectionId, panelId);
                if (existingElement != null) {
                    log.warn("Refusing change " + graphicElement + " workspace, as it would match an existing one.");
                    status.addMessage("ui.admin.workarea." + graphicElement + "s.cannotChangeScope");
                } else {
                    element.clearDeploymentFiles();
                    element.setWorkspaceId(workspaceId);
                    element.setSectionId(sectionId);
                    element.setPanelId(panelId);
                    manager.createOrUpdate(element);
                }
            } else {
                log.error(graphicElementClass + " not found, id=" + elementId);
            }
        } else {
            log.error("Not all parameters informed: " + graphicElement + "Id.");
        }
        return new ShowCurrentScreenResponse();
    }
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.