I'm using an object in another class which is used as a command object in form using spring mvc as shown below.
public class ManufacturerDO {
int manufacturerID;
String manufacturerName,manufacturerAddress;
}
this is an domain object under my command object.My doubt is how to get the fields in this domain object in my spring form.
I'm tried using the followings :
<form:select path="productManufacturer.manufacturerID">
<c:forEach var="manufacturer" items="${manufacturerList}">
<form:option value="${manufacturer.manufacturerName}">
<c:out value="${manufacturer.manufacturerName}" />
</form:option>
</c:forEach>
</form:select>
But getting the following exception: Invalid property 'productManufacturer' of bean class [com.global.onlineShop.ProductDO]: Value of nested property 'productManufacturer' is null.
Thanks in advance