Let me re-phrase my question a little:
Let's say I am passing to my JSP page one transfer object A which contains a property (called bs) that consists of an ArrayList of transfer objects B. Each of the B transfer objects contain a property (called cs) that consists of an ArrayList of transfer objects C.
So in my JSP page I start iterating through the B transfer objects with the following forEach statement:
forEach items="${A.bs}" var="bs" Now I'm iterating through the ArrayList of B objects by referencing them by the bs parameter. Within this iteration, I want to iterate through the ArrayList of C objects that are tied to each of the B objects. In the past, I've used a second forEach iteration to iterate through the ArrayList of C objects like this:
forEach items="${bs.cs}" var="cs" And now I'm able to access/iterate through the ArrayList of C objects that are imbedded within the ArrayList of B objects that is ultimately imbedded in the one A object. I use this second forEach to create a options list HTML element.
What I don't understand is why I can't replace the second forEach with the following code:
select property="${bs.somebeanproperty}" html ptions collection="${bs.bs}" property="elementID" labelProperty="element" ..where the elementID and element properties have the appropriate setter/getter methods in the C object.
This is the error that I get when I try to use the above code:
Cannot find bean under name [com.product.to.CharelementTO@1747e0f, com.product.to.CharelementTO@100200c] Where CharelementTO is equivalent to the C object noted above.
So why would the forEach be able to recognize the C ArrayList and not the html
ptions (when I use it with the collections property) not recognize it.
Any ideas?