public static UIComponent resolveListMember(View view, UIBasicListMember torendero) { UIComponent parent = view.getComponent(torendero.parentFullID); UIBoundList boundlist = parent instanceof UISelect? ((UISelect) parent).optionnames : (UIBoundList)parent; String[] valuelist = boundlist.getValue(); // Reference off the end of an array is not an error - it may be being dynamically expanded String value = torendero.choiceindex < valuelist.length ? valuelist[torendero.choiceindex] : ""; String submittingname = boundlist.submittingname; UIBoundString togo = new UIBoundString(); togo.setValue(value); if (torendero.willinput) { togo.submittingname = submittingname; togo.willinput = true; } return togo; }
public static StringSet computeSelectionSet(UIBound selection) { StringSet togo = new StringSet(); if (selection instanceof UIBoundList) { togo.addAll(((UIBoundList) selection).getValue()); } else if (selection instanceof UIBoundString) { togo.add(((UIBoundString) selection).getValue()); } return togo; }
if (ishtmlselect) { pos.print(">\n"); String[] values = select.optionlist.getValue(); String[] names = select.optionnames == null ? values : select.optionnames.getValue(); String[] groups = select.groupnames == null? null : select.groupnames.getValue(); String lastgroup = ""; for (int i = 0; i < values.length; ++i) { UISelectChoice torender = (UISelectChoice) torendero; UISelect parent = (UISelect) view.getComponent(torender.parentFullID); String value = parent.optionlist.getValue()[torender.choiceindex];