- This topic has 5 replies, 3 voices, and was last updated 18 years, 10 months ago by n_sini.
-
AuthorPosts
-
Scott MinorParticipantI am trying to get an advanced iteration working. Here is what I have
I return results back from the database. I placed the columns in a Value Object (columnVO) I then place this objects into an ArrayList called columns and then I place the arraylist of cloumns into a row value object (rowVO) and then place the rowVO into a rows arrayList.
The number of columns can change depending on what the user wants to see on the screen so I don’t know how many columns will be used or the number of rows returned. I can get the rows arraylist but I can’t get to the rows value object or the columns.
This is the code from the JSP
<logic:present name=”ReportData” scope=”request”>
<logic:iterate name=”ReportData” id=”rowData”>
<tr>
<!– Row Data –>
<logic:iterate id=”rowData” property=”alstColumns”>
<!– Have dataColumnVB –>
</logic:iterate>
</tr>
</logic:iterate>
</logic:present>Anyone can help…. Thanks.
Riyad KallaMemberMoving to Off Topic -> Soft dev because this is not ME related, its a Struts question.
Riyad KallaMemberScott,
Can you more clearly outline (wrap it in code tags so it keeps its formatting) the hierarchy of objects here? Also what is the error that you are getting?
Scott MinorParticipantI fixed the problem. I found an example of a double arraylist iterator. I will post the finally code in the next few days. This is something that many people have been having trouble with and no one is really answering the question on the web. I was able to get it to work after putting pieces together from about 10 or 15 sites and some dumb luck.
Riyad KallaMemberIt sounds like a beast of a problem, we appreciate you following up here for other users.
n_siniMemberSolution to this issue is, Property attribute is not be set
<logic:iterate name=”row” property=”comp_id.dealer.dealerBspDlrBspModules” id=”modulesSet” >
<logic:iterate name = “modulesSet” id=”module” >
<TD><bean:write name=”module” property=”moduleStatusbyCode.actionDescription” /></TD>
</logic:iterate>
</logic:iterate>Hope this helps.
-
AuthorPosts