我在一个项目中使用Struts标签显示下拉框内容(调用了数据库),部分代码如下:
<html:select property="workflowDefitionId" errorStyleClass="errorSelect">
<html:option value=""><fmt:message key="global.choice"/></html:option>
<html:options collection="workflowDefinitions" labelProperty="name" property="id"/>
</html:select>
<fmt:message key="global.redstar"/>
<fmt:message key="humanresource.train.subject"/>
<fmt:message key="global.colon"/>
<html:select property="trainId" errorStyleClass="errorSelect">
<html:option value=""><fmt:message key="global.choice"/></html:option>
<html:options collection="trains" labelProperty="subject" property="id"/>
</html:select> 
<fmt:message key="global.redstar"/>
下面collection="trains"下拉框的可以正常显示,但上面collection="workflowDefinitions"(工作流定义)的不显示,数据库里有相应的数据,这是为什么?