// returns the current value pair contained in the panelgroup public String getCurrentPanelChildValue(int childIndex) { Object obj = currentPanel.getChildren().get(childIndex); String returnStr = ""; if (obj instanceof HtmlSelectOneMenu) { HtmlSelectOneMenu menu = (HtmlSelectOneMenu) obj; returnStr = menu.getValue().toString(); } else if (obj instanceof HtmlInputText) { HtmlInputText text = (HtmlInputText) obj; returnStr = text.getValue().toString(); } else if (obj instanceof HtmlOutputText) { HtmlOutputText text = (HtmlOutputText) obj; returnStr = text.getValue().toString(); } return returnStr; }