StringBuffer buffer = new StringBuffer();
String theValue = fm.getValue();
BOInstance data = null;
if (fm.getL10n().equals("连接内容")) {
System.out.println("isDyn:::::::::::" + isDyn);
System.out.println("连接内容:::::::::::" + fm.getLinkForms());
System.out.println("fm.getInputConfig():::::::::::"
+ fm.getInputConfig());
}
if (theValue != null && !"".equals(theValue.trim())) {
DOBO corrBO = fm.getLinkBO();
if (corrBO == null && fm.getLinkService() != null) {
corrBO = fm.getLinkService().getBo();
}
/**
* 可变动态下拉列表, 根据连接的FORMMODEL,一般静态staticlist 确定使用的服务
*/
if (isDyn) {
DOFormModel linkFm = (DOFormModel) fm.getLinkForms().get(0);
String theLinkValue = fm.getData()
.getValue(linkFm.getColName());
if (theLinkValue != null) {
List list = StringUtil.getStaticList(fm.getInputConfig());
for (Iterator it = list.iterator(); it.hasNext();) {
String[] halfs = (String[]) it.next();
if ((theLinkValue != null && theLinkValue
.equals(halfs[0]))) {
DOService theCorrService = DOService
.getService(halfs[1]);
if (theCorrService != null) {
corrBO = theCorrService.getBo();
}
break;
}
}
}
data = DOValueResultList.getAInstance(null, corrBO, theValue);
} else {
data = DOValueResultList.getAInstance(fm, corrBO, theValue);
}
}
if (default_data && data == null && fm.getLinkService() != null) {
data = fm.getLinkService().getBo().getCorrInstance();
if (data != null) {
theValue = data.getUid();
}
}
buffer.append(" <input type='hidden' class='resultlistpopup' name='")
.append(fm.getColName()).append("' id='")
.append(fm.getFullColID()).append("' serviceName='")
.append(fm.getLinkService().getName()).append("' ");
if (theValue != null) {
buffer.append(" value='").append(theValue).append("'");
}
buffer.append(this.appendValidateConfig(fm));
this.appendHtmlJs(buffer, fm);
buffer.append("/>");
buffer.append(
"<input type='text' style='border:#B3B3B3 1px solid;margin-top:1px' onchange=\"if(this.value==''){this.previousSibling.value='';}\"'")
.append(" onclick=\"this.style.borderColor='#406B9B'\" onmouseover=\"this.style.borderColor='#99E300'\" onmouseout=\"this.style.borderColor='#A1BCA3'\" name='")
.append(fm.getFullColID()).append("_show' id='")
.append(fm.getFullColID()).append("_show' class='")
.append(fm.getFullColID()).append("_show' ");
buffer.append(getDecoration(fm));
if (data != null) {
buffer.append(" value='").append(data.getName()).append("'");
}
// else{
// buffer.append(" value='").append(fm.getL10n())
// .append("'");
// }
if (data != null) {
buffer.append(" title='").append(data.getName()).append("'");
} else {
buffer.append(" title='").append(fm.getL10n()).append("'");
}
if (isReadOnly(fm)) {