I am trying to display list data using struts 2 tags. I have a list
List ==> Object array ==> Class object
I can get values from a list using java code as follows
for(int i=0;i<redemptionDetails.size();i++)
{
Object[] Obj=(Object[])redemptionDetails.get(i);
PointsRedemption ptredim=(PointsRedemption)Obj[0];
System.out.println(ptredim.getCarrierId());
}
where redemptionDetailsis the list.
but when I try to display using the Struts2 tags, I cannot view the details
I tried using Struts2 tags
<s:iterator value="redemptionDetails" status="redemptionDetails">
<s:set var="redemptionObject"
value="redemptionDetails.PointsRedemption"
scope="application"></s:set>
<s:set var="productObject"
value="redemptionDetails.PointsProduct"
scope="application"></s:set>
<script>
//alert(<s:property value="#redemptionObject" />);
</script>
<tr>
<td><s:property value="#application.redemptionObject.productCode" /></td>
<td><s:property value="#application.productObject.productCode" /></td>
</tr>
</s:iterator>
but I cannot get the result of desire. please, help
source
share