@Override protected void onGo(final ComponentContainer container, final ScreenData<?> data) { if (CurrentProjectVariables.canRead(ProjectRolePermissionCollections.TASKS)) { InsideProjectNavigationMenu projectModuleMenu = (InsideProjectNavigationMenu) ((MobileNavigationManager) UI.getCurrent().getContent()).getNavigationMenu(); projectModuleMenu.selectButton(AppContext.getMessage(ProjectCommonI18nEnum.VIEW_TASK)); if (data.getParams() instanceof Integer) { ProjectTaskService taskService = ApplicationContextUtil.getSpringBean(ProjectTaskService.class); SimpleTask task = taskService.findById((Integer) data.getParams(), AppContext.getAccountId()); if (task != null) { this.view.previewItem(task); super.onGo(container, data); AppContext.addFragment( ProjectLinkGenerator.generateTaskPreviewLink( task.getTaskkey(), task.getProjectShortname()), task.getTaskname()); } else { NotificationUtil.showRecordNotExistNotification(); return; } } } else { NotificationUtil.showMessagePermissionAlert(); } }
@Override protected void onGo(ComponentContainer container, ScreenData<?> data) { if (CurrentProjectVariables.canRead(ProjectRolePermissionCollections.BUGS)) { InsideProjectNavigationMenu projectModuleMenu = (InsideProjectNavigationMenu) ((MobileNavigationManager) UI.getCurrent().getContent()).getNavigationMenu(); projectModuleMenu.selectButton(AppContext.getMessage(ProjectCommonI18nEnum.VIEW_BUG)); BugFilterParameter param = (BugFilterParameter) data.getParams(); super.onGo(container, data); this.doSearch(param.getSearchCriteria()); AppContext.addFragment( "project/bug/list/" + GenericLinkUtils.encodeParam(CurrentProjectVariables.getProjectId()), AppContext.getMessage(BugI18nEnum.VIEW_LIST_TITLE)); } else { NotificationUtil.showMessagePermissionAlert(); } }