@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(); }
Comboitem item = new Comboitem(lbl); item.setValue(dt); dateTypePicker.appendChild(item);