* @param value
* @throws AppException
*/
protected void parserSelectElement(String parentId, Element e, String inputCss, ContainHTMLElementTag elementDiv,
String value) throws AppException {
SelectElementTag selectElement = new SelectElementTag();
String selectedValue = value;
selectElement.setCssClass(inputCss);
selectElement.setReadonly(e.readonly());
selectElement.setDisabled(e.disabled());
selectElement.setId(StringUtil.joinString(_SPLIT_DO, parentId, e.id()));
String[] values = e.source().value();
if (values != null && values.length > 0) {
int idx = 0;
for (String d : values) {
OptionElementTag optionElement = new OptionElementTag();
optionElement.setDisplay(Element.LabelContent.getLabelContent(e.source().display()[idx++]));
optionElement.setValue(d);
// 设定option被选择
if (d.equals(selectedValue)) {
optionElement.setSelected(true);
}
selectElement.addChildrenTag(optionElement);
}
}
// 作为异常报错的提示标示
selectElement.setTitle(Element.LabelContent.getLabelContent(StringUtil.isEmpty(e.label()) ? e.id().toUpperCase() : e.label()));
selectElement.setRequired(e.required());
selectElement.setTabindex(String.valueOf(tabIndex.next()));
elementDiv.addChildrenTag(selectElement);
}