Example #1
0
 public List<Organization> getOrganizationTags() {
   List<Organization> organizationTags = new ArrayList<Organization>();
   if (tag.getOrganizationTags() != null && !tag.getOrganizationTags().isEmpty()) {
     organizationTags.addAll(tag.getOrganizationTags());
   }
   return organizationTags;
 }
Example #2
0
  /**
   * Create a new empty instance of the one-to-many field
   *
   * @return forward to the same page
   */
  public String editOrganizationTags() {
    Organization item = new Organization();

    if (tag.getOrganizationTags() == null) {
      tag.setOrganizationTags(new HashSet());
    }
    tag.getOrganizationTags().add(item);
    return null;
  }
Example #3
0
 /**
  * Delete selected instance of the one-to-many field
  *
  * @return forward to the same page
  */
 public String deleteOrganizationTags() {
   UIData table = (UIData) FacesUtils.getComponent("tag:organizationTags");
   tag.getOrganizationTags().remove(table.getRowData());
   return null;
 }
Example #4
0
 public String deleteOrganization() {
   final UIData table = (UIData) FacesUtils.getComponent("tag:organizations");
   final Organization toDelete = (Organization) table.getRowData();
   tag.getOrganizationTags().remove(toDelete);
   return NavigationResults.EDIT;
 }
Example #5
0
 public Set<Organization> getOrganization() {
   return tag.getOrganizationTags();
 }
Example #6
0
 public String addOrganization() {
   tag.getOrganizationTags().add(getSelectedOrganization());
   return NavigationResults.EDIT;
 }