예제 #1
0
 @SafeVarargs
 public final void setSelection(T... selection) {
   AbstractSelect presentation = getPresentation();
   if (presentation != null) {
     switch (selection.length) {
       case 0:
         presentation.setValue(null);
         break;
       case 1:
         presentation.setValue(selection[0]);
         break;
       default:
         presentation.setValue(Arrays.asList(selection));
     }
   }
   this.selection = selection;
 }
예제 #2
0
 @SafeVarargs
 public final void setChoices(T... choices) {
   setModel(new BeanItemContainer<>(beanType, Arrays.asList(choices)));
 }