예제 #1
0
 private void setSelectItems(FormItem si, ArrayList<ClSelectionItem> items) {
   if (items == null) {
     items = new ArrayList<ClSelectionItem>();
   }
   LinkedHashMap<String, String> map = new LinkedHashMap<String, String>();
   map.put("-1", "---");
   for (ClSelectionItem item : items) {
     map.put(item.getId() + "", item.getValue());
   }
   si.setValueMap(map);
   si.setValue("-1");
 }
예제 #2
0
 public static void setSelectItems(FormItem si, ArrayList<ClSelectionItem> items) {
   if (items == null) {
     items = new ArrayList<ClSelectionItem>();
   }
   if (si instanceof ChkGridItem) {
     ((ChkGridItem) si).setItems(items);
     return;
   }
   LinkedHashMap<String, String> map = new LinkedHashMap<String, String>();
   for (ClSelectionItem item : items) {
     map.put(item.getId() + "", item.getValue());
   }
   si.setValueMap(map);
 }