ActionMapping mapping,
ActionForm actionForm,
HttpServletRequest request,
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());