Package org.projectforge.web.user

Examples of org.projectforge.web.user.UsersComparator


    emailList = "";

    // User select
    final UsersProvider usersProvider = new UsersProvider();
    final FieldsetPanel fsUserSelect = gridBuilder.newFieldset(getString("plugins.poll.attendee.users"));
    assignUsersListHelper = new MultiChoiceListHelper<PFUserDO>().setComparator(new UsersComparator()).setFullList(
        usersProvider.getSortedUsers());
    assignUsersListHelper.setAssignedItems(model.getUserDoFromAttendees());
    final Select2MultiChoice<PFUserDO> users = new Select2MultiChoice<PFUserDO>(fsUserSelect.getSelect2MultiChoiceId(),
        new PropertyModel<Collection<PFUserDO>>(this.assignUsersListHelper, "assignedItems"), usersProvider);
    fsUserSelect.add(users);
View Full Code Here


        // Full access users
        final FieldsetPanel fs = gridBuilder
            .newFieldset(getString("plugins.teamcal.fullAccess"), getString("plugins.teamcal.access.users"));
        final UsersProvider usersProvider = new UsersProvider();
        final Collection<PFUserDO> fullAccessUsers = new UsersProvider().getSortedUsers(getData().getFullAccessUserIds());
        fullAccessUsersListHelper = new MultiChoiceListHelper<PFUserDO>().setComparator(new UsersComparator()).setFullList(
            usersProvider.getSortedUsers());
        if (fullAccessUsers != null) {
          for (final PFUserDO user : fullAccessUsers) {
            fullAccessUsersListHelper.addOriginalAssignedItem(user).assignItem(user);
          }
        }
        final Select2MultiChoice<PFUserDO> users = new Select2MultiChoice<PFUserDO>(fs.getSelect2MultiChoiceId(),
            new PropertyModel<Collection<PFUserDO>>(this.fullAccessUsersListHelper, "assignedItems"), usersProvider);
        fs.add(users);
      }
      {
        // Read-only access users
        final FieldsetPanel fs = gridBuilder.newFieldset(getString("plugins.teamcal.readonlyAccess"),
            getString("plugins.teamcal.access.users"));
        final UsersProvider usersProvider = new UsersProvider();
        final Collection<PFUserDO> readOnlyAccessUsers = new UsersProvider().getSortedUsers(getData().getReadonlyAccessUserIds());
        readonlyAccessUsersListHelper = new MultiChoiceListHelper<PFUserDO>().setComparator(new UsersComparator()).setFullList(
            usersProvider.getSortedUsers());
        if (readOnlyAccessUsers != null) {
          for (final PFUserDO user : readOnlyAccessUsers) {
            readonlyAccessUsersListHelper.addOriginalAssignedItem(user).assignItem(user);
          }
        }
        final Select2MultiChoice<PFUserDO> users = new Select2MultiChoice<PFUserDO>(fs.getSelect2MultiChoiceId(),
            new PropertyModel<Collection<PFUserDO>>(this.readonlyAccessUsersListHelper, "assignedItems"), usersProvider);
        fs.add(users);
      }
      {
        // Minimal access users
        final FieldsetPanel fs = gridBuilder.newFieldset(getString("plugins.teamcal.minimalAccess"),
            getString("plugins.teamcal.access.users"));
        final UsersProvider usersProvider = new UsersProvider();
        final Collection<PFUserDO> minimalAccessUsers = new UsersProvider().getSortedUsers(getData().getMinimalAccessUserIds());
        minimalAccessUsersListHelper = new MultiChoiceListHelper<PFUserDO>().setComparator(new UsersComparator()).setFullList(
            usersProvider.getSortedUsers());
        if (minimalAccessUsers != null) {
          for (final PFUserDO user : minimalAccessUsers) {
            minimalAccessUsersListHelper.addOriginalAssignedItem(user).assignItem(user);
          }
View Full Code Here

    fsDesc.add(desc);

    // attendee list
    final FieldsetPanel fsAttendee = gridBuilder.newFieldset(getString("plugins.poll.attendee.users"));
    final UsersProvider usersProvider = new UsersProvider();
    final MultiChoiceListHelper<PFUserDO> attendeeHelper = new MultiChoiceListHelper<PFUserDO>().setComparator(new UsersComparator())
        .setFullList(usersProvider.getSortedUsers());
    attendeeHelper.setAssignedItems(attendeePFUserList);
    final Select2MultiChoice<PFUserDO> attendees = new Select2MultiChoice<PFUserDO>(fsAttendee.getSelect2MultiChoiceId(),
        new PropertyModel<Collection<PFUserDO>>(attendeeHelper, "assignedItems"), usersProvider);
    fsAttendee.add(attendees);
View Full Code Here

  private void createEnabledChoices()
  {
    final UsersProvider usersProvider = new UsersProvider();
    // User select
    final FieldsetPanel fsUserSelect = gridBuilder.newFieldset(getString("plugins.poll.attendee.users"));
    final MultiChoiceListHelper<PFUserDO> assignUsersListHelper = new MultiChoiceListHelper<PFUserDO>().setComparator(new UsersComparator())
        .setFullList(usersProvider.getSortedUsers());
    final HashSet<PFUserDO> attendeess = new HashSet<PFUserDO>();
    for (final PollAttendeeDO attendee : model.getPollAttendeeList()) {
      if (attendee.getUser() != null) {
        attendeess.add(attendee.getUser());
View Full Code Here

    }
    {
      // Owners
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("plugins.licensemanagement.owner")).setLabelSide(false);
      final UsersProvider usersProvider = new UsersProvider();
      assignOwnersListHelper = new MultiChoiceListHelper<PFUserDO>().setComparator(new UsersComparator()).setFullList(
          usersProvider.getSortedUsers());
      final Collection<PFUserDO> owners = ((LicenseDao) getBaseDao()).getSortedOwners(data);
      if (owners != null) {
        for (final PFUserDO owner : owners) {
          assignOwnersListHelper.addOriginalAssignedItem(owner).assignItem(owner);
View Full Code Here

TOP

Related Classes of org.projectforge.web.user.UsersComparator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.