示例#1
0
  private void resetOptionGroupRoles(Party party) {
    List<PartyRoleType> partyRoleTypes;

    partyRoleTypes = this.app.getServices().getCrudServicePartyRoleType().findAll();
    for (PartyRoleType partyRoleType : partyRoleTypes) {
      this.rolesGroup.addItem(partyRoleType.getDescription());
    }

    // set selection
    this.rolesGroup.setValue(null);
    if (party != null) {
      List<PartyRole> partyRoles;
      partyRoles = this.app.getServices().getCrudServicePartyRole().findByParty(party.getId());

      for (PartyRole p : partyRoles) {
        this.rolesGroup.select(p.getPartyRoleType().getDescription());
      }
    }
  }
示例#2
0
  private void resetOptionGroupClassification(Party party) {
    List<PartyType> partyTypes;
    BeanItemContainer<String> container;

    partyTypes = this.app.getServices().getCrudServicePartyType().findAll();
    container = new BeanItemContainer<String>(String.class);
    for (PartyType t : partyTypes) {
      container.addBean(t.getDescription());
    }
    this.classificationsGroup.setContainerDataSource(container);

    // set selection
    this.classificationsGroup.setValue(null);
    if (party != null) {
      List<PartyClassification> classifications;

      classifications =
          this.app.getServices().getCrudServicePartyClassification().findByParty(party.getId());
      for (PartyClassification p : classifications) {
        this.classificationsGroup.select(p.getPartyType().getDescription());
      }
    }
  }