/** Appends an item. */ public Comboitem appendItem(String label) { final Comboitem item = new Comboitem(label); item.setParent(this); return item; }
for(Empresa e : empresasList){ Comboitem item = new Comboitem(); item.setValue(e.getEmpId()); item.setLabel(e.getEmpNombre()); cb_empresa.appendChild(item); } if(cb_empresa.getItemCount()==1){ cb_empresa.setSelectedIndex(0); }
for(Empresa e : empresasList){ Comboitem item = new Comboitem(); item.setValue(e.getEmpId()); item.setLabel(e.getEmpNombre()); cb_empresa.appendItem(item); } if(cb_empresa.getItemCount()==1){ cb_empresa.setSelectedIndex(0); }
/** Creates an new and unloaded Comboitem. */ private Comboitem newUnloadedItem(ComboitemRenderer<?> renderer) { Comboitem item = null; if (renderer instanceof ComboitemRendererExt) item = ((ComboitemRendererExt) renderer).newComboitem(this); if (item == null) { item = new Comboitem(); item.applyProperties(); } return item; }
@Command public void setupQuicksearchByEvent(@BindingParam("searchlayout")Event event, @BindingParam("prefix") String prefix, @BindingParam("tags") String tags) throws WrongValueException, SearchException, IOException { if(event instanceof InputEvent) { InputEvent inputEvent = (InputEvent) event; String inputText = inputEvent.getValue(); List<String> searchFields = Arrays.asList(tags.split(",")); Map<UID, String> publishers = ZKLogic.findDocsStartingWith(prefix, searchFields, "proxy", inputText); Combobox searchBox = (Combobox) event.getTarget(); searchBox.getChildren().clear(); for (Map.Entry<UID, String > entry : publishers.entrySet()) { Comboitem item = new Comboitem(); item.setLabel(entry.getValue()); item.setValue(entry.getKey()); searchBox.appendChild(item); } } }
/** * Initialize the dialog. */ @Override public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); notification = (ScheduledNotification) arg.get("notification"); for (Priority priority : Priority.values()) { Comboitem item = new Comboitem(PriorityRenderer.getDisplayName(priority), PriorityRenderer.getImage(priority)); item.setValue(priority); cboPriority.appendChild(item); } if (notification == null) { notification = new ScheduledNotification(); notification.setPriority(Priority.LOW); notification.setDeliveryDate(new FMDate()); recipients.add(new Recipient(UserContext.getActiveUser())); } else { service.getScheduledNotificationRecipients(notification, recipients); } populateForm(); }
for (DateType dt : DateType.values()) { String lbl = getLabel(Constants.LABEL_ID_SORT_MODE.replace("$", dt.name().toLowerCase())); Comboitem item = new Comboitem(lbl); item.setValue(dt); dateTypePicker.appendChild(item);