是否可以显示弹簧下拉列表表单的组合(连续)项目标签?
就像是 :
<form:select path="project" id="role" >
<form:options items="${projectList}" itemValue="projectID" itemLabel="startDate +'To'+ endDate"/>
</form:select>
谢谢。
是否可以显示弹簧下拉列表表单的组合(连续)项目标签?
就像是 :
<form:select path="project" id="role" >
<form:options items="${projectList}" itemValue="projectID" itemLabel="startDate +'To'+ endDate"/>
</form:select>
谢谢。
As per my understanding its not possible. But you should set the itemLabel property in that way from your controller itself if you need it like that in the jsp.
Or you can also go for <c:forEach/>
and inside that you can create the options with pure html tag and in case of label you can combine both the properties there like you have tried to do in your question.
Hope this helps you. Cheers.
在提交操作后返回到同一表单后,下拉列表的绑定不起作用。选定的值不会重新显示在表单上。