I'm trying to display data in a report-like manner where there is a list of
cases and within each case there is a sub report of details.  I want to
minimize the number of times I have to hit the database to 2.  Once to get
all the various case info and a second to get all details.  

My choices then are to iterate through the case list and within the iterate
tags, also iterate through the second list and display only those with a
case number that matches.  However, I believe this would take up way too
much processing time to display the page.

The other choice is to take the 2 collections(vectors) and filter the second
vector into small case-specific vectors and add them to each record of the
first vector, so I get this

diseaseList:
        code, description, diagList:
                                code, id
        code, description, diagList:
                                code, id
...

I've tried to implement the latter, but cannot get the small vector to
iterate.  Does anyone have any ideas or suggestions?

<logic:iterate id="diseaseList" name="cdrCaseByDiseaseForm"
property="diseaseList">
    <bean:write name="diseaseList" property="code"/>
    <bean:write name="diseaseList" property="descriptionL1"/>

    <logic:iterate id="diagList" name="diseaseList" property="diagList"/>
        <bean:write name="diagList" property="gicdCode"/>
        <bean:write name="diagList" property="gcsiId"/>
    </logic:iterate> 

</logic:iterate> 

Reply via email to