In my Spring Application have one Bean..
public class SampleBean{
private String id;
private String name;
private String marks;
--------
--------
}
And my Another Service bean Crating Property like..
List<SampleBean> list = new Array<SampleBean>();
//Setter and getters
And in my Controller class Set some values to list
And now my jsp i'm getting these values using Jquery..
<c:set var="modalAttributeName"value="MODEL1" />
<c:set var="modalAttribute"value="${requestScope[modalAttributeName]}" />
<form:select class="select_box" path="country" id="country">
<form:options items="${modalAttribute.list}" />
</form:select>
It is showing entire Bean name like SampleBean@0
But i want in this Select box only SampleBean class name only..
So how to Display name using Jquery?
EDIT
i'm trying like this but empty box showing..
<form:select class="select_box" path="country" id="country">
<c:forEach items="${modalAttribute.list}" var="result">
<form:options item="${result.name}" />
</c:forEach>
</form:select>