facebook

Iterating with Struts

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #218489 Reply

    Scott Minor
    Participant

    I 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.

    #218529 Reply

    Riyad Kalla
    Member

    Moving to Off Topic -> Soft dev because this is not ME related, its a Struts question.

    #218534 Reply

    Riyad Kalla
    Member

    Scott,
    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?

    #218734 Reply

    Scott Minor
    Participant

    I 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.

    #218735 Reply

    Riyad Kalla
    Member

    It sounds like a beast of a problem, we appreciate you following up here for other users.

    #246488 Reply

    n_sini
    Member

    Solution 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.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Iterating with Struts

You must be logged in to post in the forum log in