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); }
private static void addModifier(Combobox cbo, String modifier) { Comboitem item = cbo.appendItem(StrUtil.piece(modifier, StrUtil.U)); item.setValue(Integer.parseInt(StrUtil.piece(modifier, StrUtil.U, 3))); }
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException { s.defaultReadObject(); schedSyncValueToSelection(); if (_model != null) { initDataListener(); // Map#Entry cannot be serialized, we have to restore them if (_model instanceof ListModelMap) { for (final Comboitem item : getItems()) { item.setValue(getElementAt(item.getIndex())); } } } }
@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(); }
/** * @see org.carewebframework.ui.FrameworkController#doAfterCompose(org.zkoss.zk.ui.Component) */ @Override public void doAfterCompose(final Component comp) throws Exception { super.doAfterCompose(comp); bgoSecurity = BgoUtil.initSecurity("BGO DISABLE PROB LIST EDITING", "BGOZ PROBLEM LIST EDIT"); lbProblems.setItemRenderer(problemRenderer); RowComparator.autowireColumnComparators(lbProblems.getListhead().getChildren()); m_bPersHistAndAct = SecurityUtil.isGranted("BGO PL INCLUDE PERS HIST W ACT"); for (Object item : cboFilter.getItems()) { Comboitem ci = (Comboitem) item; ProblemFilter filter = ProblemFilter.valueOf(ci.getValue().toString()); ci.setValue(m_bPersHistAndAct && filter == ProblemFilter.ACTIVE ? ProblemFilter.ACTIVE_PERSONAL : filter); } setFilter(getDefaultFilter()); getAppFramework().registerObject(patientContextEventHandler); getAppFramework().registerObject(encounterContextEventHandler); patientContextEventHandler.committed(); log.trace("Controller composed"); }
/** * Wire variables and events. */ @Override public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); for (CodeableConceptDt cat : EncounterUtil.getServiceCategories()) { CodingDt coding = cat.getCodingFirstRep(); Comboitem item = cboServiceCategory.appendItem(coding.getDisplay()); item.setValue(coding.getCode()); item.setTooltiptext(cat.getText()); } List<String> data = broker.callRPCList("RGCWENCX CLINLOC", null, "", 1, 9999); for (String itm : data) { String[] pcs = StrUtil.split(itm, StrUtil.U, 3); Listitem item = lstLocation.appendItem(pcs[1], pcs[0]); item.setAttribute("sc", pcs[2]); } }
String lbl = getLabel(Constants.LABEL_ID_SORT_MODE.replace("$", dt.name().toLowerCase())); Comboitem item = new Comboitem(lbl); item.setValue(dt); dateTypePicker.appendChild(item);
String pcs[] = StrUtil.split(sc, "~", 3); Comboitem item = cboServiceCategory.appendItem(pcs[1]); item.setValue(pcs[0]); item.setTooltiptext(pcs[2]);