Пример #1
0
 /* (non-Javadoc)
  * @see com.vaadin.ui.AbstractField#getInternalValue()
  */
 @Override
 @SuppressWarnings("unchecked")
 protected Collect getInternalValue() {
   Collect collect = new Collect();
   if (selectField.getValue() instanceof Set) {
     Set<String> selected = (Set<String>) selectField.getValue();
     for (String value : selected) {
       collect.addIncludeGroup(value);
     }
   } else {
     collect.addIncludeGroup((String) selectField.getValue());
   }
   return collect;
 }
Пример #2
0
 /* (non-Javadoc)
  * @see com.vaadin.ui.AbstractField#setInternalValue(java.lang.Object)
  */
 @Override
 protected void setInternalValue(Collect value) {
   selectField.setValue(new TreeSet<String>(value.getIncludeGroups()));
 }