/ Published in: Java

Genera un combo por código.
paso 1: arrastrar un selectOneChoice al modo diseño.
paso 2: en el value del wizard seleccionar la función.
paso 1: arrastrar un selectOneChoice al modo diseño.
paso 2: en el value del wizard seleccionar la función.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/** Función que carga el combo de tipo de inmovilizacion con su iterator de su correspondiente vista * @return - variable de tipo List que contiene las opciones del combo */ DCBindingContainer bindcont = ADFUtils.getDCBindingContainer(); DCIteratorBinding iterator = bindcont.findIteratorBinding("ITERADOR_DE_LA_VISTA"); ViewObject view = iterator.getViewObject(); List<SelectItem> listEstados = new ArrayList<SelectItem>(); if (view != null && view.getRowCount() > 0) { Row rowCurrent = view.first(); for (int i = 0; i < view.getRowCount(); i++) { listEstados.add(new SelectItem(rowCurrent.getAttribute("PRIMARY_KEY_DE_LA_VIEW").toString(), rowCurrent.getAttribute("DESCRIPCION_DE_LA_VIEW").toString())); rowCurrent = view.next(); } } return listEstados; }
Comments
