Ejemplo n.º 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();
    }
  }
Ejemplo n.º 2
0
  @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();
    }
  }