Struts 2 is giving a strange behavior that the commercial,productCategory objects is not set on on form submission.It happens in some cases like these.Other fields are getting set properly
Most of the cases struts 2 is setting the custom objects very well and even for complex objects like List inside a object but in this case it is giving strange behavior.
Can somebody help in this.Can i debug the struts 2 code to check why it is not setting the property.If possible let me know the steps
Hibernate domain object:
public class Brand {
private Long id;
private String brandName;
private String brandDescription;
private Brand productSubCategory;
private ProductCategory productCategory;
private CommercialType commercial;
/* getters and setters */
}
JSP:
<s:select label = "Commercial Type"
name = "brand.commercial.id"
list = "#attr.masterData.commercialTypes"
listKey = "id"
listValue = "commercialType"
value = "%{brand.commercial.id}"
theme = "simple"
headerKey = ""
headerValue = "--Select--"
/>