OK, so I would try to put what I intend to achieve.
I actually have a collection of
java objects(say of Class P) whose data I need to display in tabular form(and I am doing this using velocity template).
If fields in object are not collection type then for each java object there is a row in table, and I am happy.
But java object can have collection based fields too, in which case all of the data in collection is getting placed in same box which I don't want. I want a new row for every next value in collection.
So I planned to make a new java class(say A) with only non-collection fields, and then to loop through the collections of original java object(keeping fields null wherever needed) and just put the data in A's instance.
So for every original java object I can have multiple objects of A.
So if P's instance has data as x,y,z,collection1 with values (a,b,c),collection2 with values(m,n)
then there would be A's instances with data as
instance 1:x,y,z,a,m
instance 2:b,n
instance 3:c
I hope I could clarify.
Manish