code: private List<Serializable> getSelectedValues(List<IdName> values, List<Serializable> defaultValues) {
          List<Serializable> selectedValues = new ArrayList<Serializable>();
          if (defaultValues == null) {
              return selectedValues;
          }
          for (Serializable s : defaultValues) {
              for  (IdName in : values) {
                  if (s instanceof IdName) {
                      if ((in.getId() != null) && in.getId().equals( ((IdName)s).getId())) {
                          selectedValues.add(in);
                          break;
                      }
                  } else if ((in.getId() != null) && in.getId().equals(s)) {
                      selectedValues.add(in);
                      break;
                  }
              }
          }
          
          return selectedValues;
      }
docs: a default value must be simple java object , or an IdName but only with the id