Reputation: 21
I have some data in my list and I am trying to add those in a dropdown list .I am trying to iterate the list and adding in the dropdown. But I am not getting the proper result . Below are my code can anybody please help me out.
<select>
<logic:iterate name="CMSSetupForm" property="configListMetaData" id="configVO" type="com.infores.mdm.ui.domainobjects.cms.ConfigurationVO" indexId="indid">
<option value="<bean:write name="configVO" property="attributeGroup"/>">
</option>
</logic:iterate>
</select>
Thanks in advance.
Upvotes: 0
Views: 2543
Reputation: 993
You can use JSTL for this
You can use forEach of core taglib like this -
<c:forEach items="${names}" var="name">
<option value="${name}">${name}</option>
</c:forEach>
Assuming names is a List of String like this -
List<String> list = new ArrayList<String>();
Upvotes: 1