Package org.jmanage.webui.dashboard.framework

Examples of org.jmanage.webui.dashboard.framework.DashboardConfig


                                 HttpServletResponse response)
            throws Exception {
        DashboardRepository instance = DashboardRepository.getInstance();
        ApplicationConfig appConfig = context.getApplicationConfig();
        String currentDashboardId = request.getParameter("dashBID");
        DashboardConfig currentDashboardConfig = null;
        for(String dashboardId : appConfig.getDashboards()){
            if(currentDashboardId.equals(dashboardId)){
                currentDashboardConfig = instance.get(dashboardId);
                break;
            }
        }
        if(currentDashboardConfig == null)
            currentDashboardConfig = instance.get(currentDashboardId);
        request.setAttribute("dashboardPage", currentDashboardConfig.getTemplate());
       
        /*set current page for navigation*/
        request.setAttribute(RequestAttributes.NAV_CURRENT_PAGE, currentDashboardConfig.getName());
       
        return mapping.findForward(Forwards.SUCCESS);
    }
View Full Code Here


   
   
    public static String refreshComponent(WebContext context, HttpServletRequest request,
            String dashboardId, String componentId){

        DashboardConfig dashboardConfig = DashboardRepository.getInstance().get(dashboardId);
        DashboardContext dashboardContext = new DashboardContextImpl(context, dashboardConfig,
                request, true); // set the refresh request       
        assert dashboardConfig != null : "Error retrieving dashboard details. id=" + dashboardId;
        DashboardComponent component = dashboardConfig.getComponents().get(componentId);
        assert component != null : "Error retrieving component. id=" + componentId;
        try{
            return component.draw(dashboardContext);
        }catch(Throwable e){
            logger.log(Level.SEVERE, "Error displaying component", e);
View Full Code Here

            ApplicationConfig appConfig = context.getApplicationConfig();
           
            // Graphs at cluster level are not supported yet
            assert !appConfig.isCluster();
            String dashboardId = request.getParameter("dashBID");
            DashboardConfig currentDashboardConfig = DashboardRepository.getInstance().get(dashboardId);
           
            assert currentDashboardConfig != null : "Error retrieving dashboard details";
            DashboardComponent component =
                    currentDashboardConfig.getComponents().get(getId());

            String componentDisplay = component.draw(new DashboardContextImpl(context, currentDashboardConfig,
                    (HttpServletRequest)pageContext.getRequest()));
            componentDisplay = MessageFormat.format(componentDisplay, getWidth(),
                    getHeight(), Utils.getCookieValue(request, "JSESSIONID"));
View Full Code Here

TOP

Related Classes of org.jmanage.webui.dashboard.framework.DashboardConfig

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.