コード例 #1
0
  @Override
  protected void onGo(ComponentContainer container, ScreenData<?> data) {
    if (AppContext.canRead(RolePermissionCollections.ACCOUNT_ROLE)) {
      RoleContainer roleContainer = (RoleContainer) container;
      roleContainer.removeAllComponents();
      roleContainer.addComponent(view.getWidget());
      searchCriteria = (RoleSearchCriteria) data.getParams();
      doSearch(searchCriteria);

      AccountSettingBreadcrumb breadcrumb =
          ViewManager.getCacheComponent(AccountSettingBreadcrumb.class);
      breadcrumb.gotoRoleList();
    } else {
      NotificationUtil.showMessagePermissionAlert();
    }
  }
コード例 #2
0
ファイル: RoleReadPresenter.java プロジェクト: gsccs/mycollab
  @Override
  protected void onGo(ComponentContainer container, ScreenData<?> data) {
    if (AppContext.canRead(RolePermissionCollections.ACCOUNT_ROLE)) {
      RoleService roleService = ApplicationContextUtil.getSpringBean(RoleService.class);
      SimpleRole role = roleService.findById((Integer) data.getParams(), AppContext.getAccountId());
      if (role != null) {
        RoleContainer roleContainer = (RoleContainer) container;
        roleContainer.removeAllComponents();
        roleContainer.addComponent(view.getWidget());
        view.previewItem(role);

        AccountSettingBreadcrumb breadcrumb =
            ViewManager.getCacheComponent(AccountSettingBreadcrumb.class);
        breadcrumb.gotoRoleRead(role);
      } else {
        NotificationUtil.showRecordNotExistNotification();
      }
    } else {
      NotificationUtil.showMessagePermissionAlert();
    }
  }