I have simplfied my code to make it easiear to understand:
I have an action class
public class MyAction extends ActionSupport {
private BigClass item;
public String myMethod(){
//call some services
this.item = processedStuff;
return SUCCESS;
}
}
and BigClass has an Array in it:
public class BigClass{
private String data1;
private String data2;
private List<MyBean> dataArray=new ArrayList()<MyBean>;
//setters and getters ...
}
and the strut.xml mapping
<result name="success" type="json">
<param name="includeProperties">
item\.data1,
item\.data2,
item\.dataArray\[\d+\]\.id,
item\.dataArray\[\d+\]\.name
</param>
</result>
as json result, I'm only getting information data1, and data2, the array is not returning.. however if I change
item\.dataArray\[\d+\]\.id,
item\.dataArray\[\d+\]\.name
to
item\.dataArray.*,
I get all the information I need.
is it the expression item\.dataArray\[\d+\]\.id
incorrect?