示例#1
0
  /** Handle Ajax request */
  @Override
  @SuppressWarnings("unchecked")
  public boolean ajaxEventReceived(AjaxEvent ajaxEvent) {
    AjaxEventType type = ajaxEvent.getEventType();

    if (type == FILTER_CHANGE) {
      currentFilter = ((PayloadAjaxEvent<EntrySelectorFilter>) ajaxEvent).getPayload();

      List<User> users = getUsers();
      userListView.setList(users);

      return false;
    } else if (type == USER_UPDATED || type == USER_DELETED || type == PASSWORD_CHANGED) {
      // update user list
      List<User> users = getUsers();
      userListView.setList(users);

      selectorPanel.refreshList(ajaxEvent.getTarget());

      getTabbedPanel().succesfulSave(ajaxEvent.getTarget());

      return false;
    }

    return true;
  }
示例#2
0
  @Override
  public boolean ajaxEventReceived(AjaxEvent ajaxEvent) {
    AjaxEventType type = ajaxEvent.getEventType();

    if (type == DepartmentAjaxEventType.DEPARTMENT_DELETED
        || type == DepartmentAjaxEventType.DEPARTMENT_UPDATED) {
      // update customer list
      List<UserDepartment> depts = getUserDepartments();
      deptListView.setList(depts);

      entrySelectorPanel.refreshList(ajaxEvent.getTarget());

      getTabbedPanel().succesfulSave(ajaxEvent.getTarget());
    }

    return true;
  }