FAQ
Sorry, heres another newbie question.

I have a bean that stores collections of data that have been retrieved
from a database.

When I try and logically iterate these collections on my JSP page, it
says "Cannot find bean Results in any scope"

But my bean does exist and println its results on my tomcat window?

What am I doing wrong?


Thanks

Chirag




--
NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited.

Search Discussions

  • Adam Levine at Aug 14, 2003 at 3:03 pm
    How are you attempting to display and iterate? code snippets help us find
    out what's going on....




    From: "Mehta, Chirag (IT)" <Chirag.Mehta@morganstanley.com>
    Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
    To: <struts-user@jakarta.apache.org>
    Subject: Dumbo Question
    Date: Thu, 14 Aug 2003 15:58:48 +0100

    Sorry, heres another newbie question.

    I have a bean that stores collections of data that have been retrieved
    from a database.

    When I try and logically iterate these collections on my JSP page, it
    says "Cannot find bean Results in any scope"

    But my bean does exist and println its results on my tomcat window?

    What am I doing wrong?


    Thanks

    Chirag




    --
    NOTICE: If received in error, please destroy and notify sender. Sender does
    not waive confidentiality or privilege, and use is prohibited.

    _________________________________________________________________
    The new MSN 8: smart spam protection and 2 months FREE*
    http://join.msn.com/?page=features/junkmail


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
    For additional commands, e-mail: struts-user-help@jakarta.apache.org
  • David Graham at Aug 14, 2003 at 3:10 pm

    --- "Mehta, Chirag (IT)" wrote:
    Sorry, heres another newbie question.

    I have a bean that stores collections of data that have been retrieved
    from a database.

    When I try and logically iterate these collections on my JSP page, it
    says "Cannot find bean Results in any scope"

    But my bean does exist and println its results on my tomcat window?

    What am I doing wrong?
    Using the JSTL you can do this:

    <c:forEach var="res" items="${Results}">
    <c:out value="${res.myProperty}"/>
    </c:forEach>

    That assumes that the objects stored in your "Results" collection have a
    getMyProperty() method.

    David


    Thanks

    Chirag




    --
    NOTICE: If received in error, please destroy and notify sender. Sender
    does not waive confidentiality or privilege, and use is prohibited.

    __________________________________
    Do you Yahoo!?
    Yahoo! SiteBuilder - Free, easy-to-use web site design software
    http://sitebuilder.yahoo.com

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
    For additional commands, e-mail: struts-user-help@jakarta.apache.org
  • Mehta, Chirag (IT) at Aug 14, 2003 at 3:12 pm
    My code is:

    <tr>
    <logic:iterate name = "Results" property="ColumnNames" id="columnName"
    >
    <td><bean:write name="columnName"/></td>
    </logic:iterate>
    </tr>

    Results.java is the name of an ActionForm which has my collections as
    get and set properties.

    This is created using an DataBaseConnect class which is initialised in
    my Action class.

    Hope that helps.

    Chirag

    -----Original Message-----
    From: Adam Levine
    Sent: 14 August 2003 16:01
    To: struts-user@jakarta.apache.org
    Subject: Re: Dumbo Question


    How are you attempting to display and iterate? code snippets help us
    find
    out what's going on....




    From: "Mehta, Chirag (IT)" <Chirag.Mehta@morganstanley.com>
    Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
    To: <struts-user@jakarta.apache.org>
    Subject: Dumbo Question
    Date: Thu, 14 Aug 2003 15:58:48 +0100

    Sorry, heres another newbie question.

    I have a bean that stores collections of data that have been retrieved
    from a database.

    When I try and logically iterate these collections on my JSP page, it
    says "Cannot find bean Results in any scope"

    But my bean does exist and println its results on my tomcat window?

    What am I doing wrong?


    Thanks

    Chirag




    --
    NOTICE: If received in error, please destroy and notify sender. Sender
    does
    not waive confidentiality or privilege, and use is prohibited.

    _________________________________________________________________
    The new MSN 8: smart spam protection and 2 months FREE*
    http://join.msn.com/?page=features/junkmail


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
    For additional commands, e-mail: struts-user-help@jakarta.apache.org



    --
    NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
    For additional commands, e-mail: struts-user-help@jakarta.apache.org
  • Qasim Khawaja at Aug 15, 2003 at 1:05 am
    In your struts config file in the form-beans section there is a line
    associating a name to you ActionForm e.g

    <form-bean name="loginForm" type="com.me.LoginForm">

    Results.java should map to "type" in the line above.

    the ActionForm should be in session scope with that name.

    Q

    Mehta, Chirag (IT) wrote:
    My code is:

    <tr>
    <logic:iterate name = "Results" property="ColumnNames" id="columnName"

    <td><bean:write name="columnName"/></td>
    </logic:iterate>
    </tr>

    Results.java is the name of an ActionForm which has my collections as
    get and set properties.

    This is created using an DataBaseConnect class which is initialised in
    my Action class.

    Hope that helps.

    Chirag

    -----Original Message-----
    From: Adam Levine
    Sent: 14 August 2003 16:01
    To: struts-user@jakarta.apache.org
    Subject: Re: Dumbo Question


    How are you attempting to display and iterate? code snippets help us
    find
    out what's going on....




    From: "Mehta, Chirag (IT)" <Chirag.Mehta@morganstanley.com>
    Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
    To: <struts-user@jakarta.apache.org>
    Subject: Dumbo Question
    Date: Thu, 14 Aug 2003 15:58:48 +0100

    Sorry, heres another newbie question.

    I have a bean that stores collections of data that have been retrieved
    from a database.

    When I try and logically iterate these collections on my JSP page, it
    says "Cannot find bean Results in any scope"

    But my bean does exist and println its results on my tomcat window?

    What am I doing wrong?


    Thanks

    Chirag




    --
    NOTICE: If received in error, please destroy and notify sender. Sender
    does
    not waive confidentiality or privilege, and use is prohibited.

    _________________________________________________________________
    The new MSN 8: smart spam protection and 2 months FREE*
    http://join.msn.com/?page=features/junkmail


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
    For additional commands, e-mail: struts-user-help@jakarta.apache.org



    --
    NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
    For additional commands, e-mail: struts-user-help@jakarta.apache.org
  • Nicholas L Mohler at Aug 14, 2003 at 3:41 pm
    Look at the way that you have named your "ColumnNames" property in the jsp
    and your form. Try it with property="columnNames" with form methods
    getColumnNames and setColumnNames. We've had seen that problem a couple
    times on our team and lining the names up properly does the trick.

    Nick





    "Mehta, Chirag (IT)"
    <Chirag.Mehta@morgans To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
    tanley.com> cc:
    Subject: RE: Dumbo Question
    08/14/2003 11:11 AM
    Please respond to
    "Struts Users Mailing
    List"






    My code is:

    <tr>
    <logic:iterate name = "Results" property="ColumnNames" id="columnName"
    >
    <td><bean:write name="columnName"/></td>
    </logic:iterate>
    </tr>

    Results.java is the name of an ActionForm which has my collections as
    get and set properties.

    This is created using an DataBaseConnect class which is initialised in
    my Action class.

    Hope that helps.

    Chirag

    -----Original Message-----
    From: Adam Levine
    Sent: 14 August 2003 16:01
    To: struts-user@jakarta.apache.org
    Subject: Re: Dumbo Question


    How are you attempting to display and iterate? code snippets help us
    find
    out what's going on....




    From: "Mehta, Chirag (IT)" <Chirag.Mehta@morganstanley.com>
    Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
    To: <struts-user@jakarta.apache.org>
    Subject: Dumbo Question
    Date: Thu, 14 Aug 2003 15:58:48 +0100

    Sorry, heres another newbie question.

    I have a bean that stores collections of data that have been retrieved
    from a database.

    When I try and logically iterate these collections on my JSP page, it
    says "Cannot find bean Results in any scope"

    But my bean does exist and println its results on my tomcat window?

    What am I doing wrong?


    Thanks

    Chirag




    --
    NOTICE: If received in error, please destroy and notify sender. Sender
    does
    not waive confidentiality or privilege, and use is prohibited.

    _________________________________________________________________
    The new MSN 8: smart spam protection and 2 months FREE*
    http://join.msn.com/?page=features/junkmail


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
    For additional commands, e-mail: struts-user-help@jakarta.apache.org



    --
    NOTICE: If received in error, please destroy and notify sender. Sender
    does not waive confidentiality or privilege, and use is prohibited.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
    For additional commands, e-mail: struts-user-help@jakarta.apache.org






    ---------------------------------------------------------------------
    To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
    For additional commands, e-mail: struts-user-help@jakarta.apache.org
  • Mehta, Chirag (IT) at Aug 15, 2003 at 9:11 am
    I've done all this. Still no luck.

    Does anyone have any other suggestions.

    My problem again,

    I have a Action class that initiallises a databaseaccess class.
    The DBAccess class populates a Results Action form.

    Now when I iterate in my JSP page over the properties in my Results
    Form, I get "Results Not Found in Any Scope."

    Note that, if I initialise a new Results() in my Action class before my
    req.setAttribute("Results", result) line, it says "Collection Not Found"
    as I have not populated it?

    Please help.

    Thanks

    Chirag

    -----Original Message-----
    From: Qasim Khawaja
    Sent: 15 August 2003 02:04
    To: Struts Users Mailing List
    Subject: Re: Dumbo Question


    In your struts config file in the form-beans section there is a line
    associating a name to you ActionForm e.g

    <form-bean name="loginForm" type="com.me.LoginForm">

    Results.java should map to "type" in the line above.

    the ActionForm should be in session scope with that name.

    Q

    Mehta, Chirag (IT) wrote:
    My code is:

    <tr>
    <logic:iterate name = "Results" property="ColumnNames"
    id="columnName"
    <td><bean:write name="columnName"/></td>
    </logic:iterate>
    </tr>

    Results.java is the name of an ActionForm which has my collections as
    get and set properties.

    This is created using an DataBaseConnect class which is initialised in
    my Action class.

    Hope that helps.

    Chirag

    -----Original Message-----
    From: Adam Levine
    Sent: 14 August 2003 16:01
    To: struts-user@jakarta.apache.org
    Subject: Re: Dumbo Question


    How are you attempting to display and iterate? code snippets help us
    find
    out what's going on....




    From: "Mehta, Chirag (IT)" <Chirag.Mehta@morganstanley.com>
    Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
    To: <struts-user@jakarta.apache.org>
    Subject: Dumbo Question
    Date: Thu, 14 Aug 2003 15:58:48 +0100

    Sorry, heres another newbie question.

    I have a bean that stores collections of data that have been retrieved
    from a database.

    When I try and logically iterate these collections on my JSP page, it
    says "Cannot find bean Results in any scope"

    But my bean does exist and println its results on my tomcat window?

    What am I doing wrong?


    Thanks

    Chirag




    --
    NOTICE: If received in error, please destroy and notify sender. Sender
    does
    not waive confidentiality or privilege, and use is prohibited.

    _________________________________________________________________
    The new MSN 8: smart spam protection and 2 months FREE*
    http://join.msn.com/?page=features/junkmail


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
    For additional commands, e-mail: struts-user-help@jakarta.apache.org



    --
    NOTICE: If received in error, please destroy and notify sender.
    Sender does not waive confidentiality or privilege, and use is
    prohibited.


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
    For additional commands, e-mail: struts-user-help@jakarta.apache.org



    --
    NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
    For additional commands, e-mail: struts-user-help@jakarta.apache.org
  • Mehta, Chirag (IT) at Aug 15, 2003 at 10:44 am
    Ok. Got a step further but spent the last 2 hours trying to figure this
    out. This is my code in my JSP page.
    I get an error of org.apache.jasper.JasperException: Cannot find bean
    rowData in any scope.

    The second logic iterate is on a 2D Collection. It will display tbdata
    if I ask it too but the whole row of data goes in a cell. But I would
    like to put one piece of data in each cell. Ie:

    Test Test Test

    NOT

    Test|Test|Test Test|Test|Test Test|Test|Test




    <TABLE border = "1">
    <tr> <logic:iterate name="Results" property="columnnames"
    id="columnname" >
    <th><bean:write name="columnname"/></th>
    </logic:iterate> </tr>

    <logic:iterate name="Results" property="tabledata" id="tbdata">
    <tr> <logic:iterate name="tbdata" id="rowData">
    <td><bean:write name="rowData"/></td>
    </logic:iterate> </tr>
    </logic:iterate>

    </TABLE>


    Please help someone!

    Chirag


    --
    NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
    For additional commands, e-mail: struts-user-help@jakarta.apache.org
  • Nicholas L Mohler at Aug 15, 2003 at 11:10 am
    Chirag,

    I looked at your code, and it looks right. It makes me think that
    something must be wrong with the data. Your data should look like this:

    - You have an object called Results in scope that has a collection property
    called tabledata (tbdata).
    - Each object in the tbdata collection is itselt a collection of objects
    (rowData)

    Verify that your data looks like that...if your data looks right, then I'm
    stumped as your code looks right.
    Nick






    "Mehta, Chirag (IT)"
    <Chirag.Mehta@morgans To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
    tanley.com> cc:
    Subject: RE: Dumbo Question
    08/15/2003 06:44 AM
    Please respond to
    "Struts Users Mailing
    List"






    Ok. Got a step further but spent the last 2 hours trying to figure this
    out. This is my code in my JSP page.
    I get an error of org.apache.jasper.JasperException: Cannot find bean
    rowData in any scope.

    The second logic iterate is on a 2D Collection. It will display tbdata
    if I ask it too but the whole row of data goes in a cell. But I would
    like to put one piece of data in each cell. Ie:

    Test Test
    Test

    NOT

    Test|Test|Test Test|Test|Test
    Test|Test|Test




    <TABLE border = "1">
    <tr> <logic:iterate name="Results" property="columnnames"
    id="columnname" >
    <th><bean:write name="columnname"/></th>
    </logic:iterate> </tr>

    <logic:iterate name="Results" property="tabledata" id="tbdata">
    <tr> <logic:iterate name="tbdata" id="rowData">
    <td><bean:write name="rowData"/></td>
    </logic:iterate> </tr>
    </logic:iterate>

    </TABLE>


    Please help someone!

    Chirag


    --
    NOTICE: If received in error, please destroy and notify sender. Sender
    does not waive confidentiality or privilege, and use is prohibited.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
    For additional commands, e-mail: struts-user-help@jakarta.apache.org






    ---------------------------------------------------------------------
    To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
    For additional commands, e-mail: struts-user-help@jakarta.apache.org
  • Mehta, Chirag (IT) at Aug 15, 2003 at 12:17 pm
    DOH! That's exactly what I have done.

    Is there anywhere were I have to state that the tabledata contains
    ojects of type List?

    And is there anything I might have to configure in my config.xml or my
    ActionClass.

    The weird thing is that the first iterate works fine - for the column
    headings.

    And the outer loop in the second iterate works too. It will print out
    the collection in cell one of the tabledata for example.



    -----Original Message-----
    From: Nicholas L Mohler
    Sent: 15 August 2003 12:09
    To: Struts Users Mailing List
    Subject: RE: Dumbo Question








    Chirag,

    I looked at your code, and it looks right. It makes me think that
    something must be wrong with the data. Your data should look like this:

    - You have an object called Results in scope that has a collection
    property
    called tabledata (tbdata).
    - Each object in the tbdata collection is itselt a collection of objects
    (rowData)

    Verify that your data looks like that...if your data looks right, then
    I'm
    stumped as your code looks right.
    Nick







    "Mehta, Chirag (IT)"

    <Chirag.Mehta@morgans To: "Struts
    Users Mailing List" <struts-user@jakarta.apache.org>
    tanley.com> cc:

    Subject: RE: Dumbo
    Question
    08/15/2003 06:44 AM

    Please respond to

    "Struts Users Mailing

    List"









    Ok. Got a step further but spent the last 2 hours trying to figure this
    out. This is my code in my JSP page.
    I get an error of org.apache.jasper.JasperException: Cannot find bean
    rowData in any scope.

    The second logic iterate is on a 2D Collection. It will display tbdata
    if I ask it too but the whole row of data goes in a cell. But I would
    like to put one piece of data in each cell. Ie:

    Test Test
    Test

    NOT

    Test|Test|Test Test|Test|Test
    Test|Test|Test




    <TABLE border = "1">
    <tr> <logic:iterate name="Results" property="columnnames"
    id="columnname" >
    <th><bean:write name="columnname"/></th>
    </logic:iterate> </tr>

    <logic:iterate name="Results" property="tabledata" id="tbdata">
    <tr> <logic:iterate name="tbdata" id="rowData">
    <td><bean:write name="rowData"/></td>
    </logic:iterate> </tr>
    </logic:iterate>

    </TABLE>


    Please help someone!

    Chirag


    --
    NOTICE: If received in error, please destroy and notify sender. Sender
    does not waive confidentiality or privilege, and use is prohibited.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
    For additional commands, e-mail: struts-user-help@jakarta.apache.org






    ---------------------------------------------------------------------
    To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
    For additional commands, e-mail: struts-user-help@jakarta.apache.org



    --
    NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
    For additional commands, e-mail: struts-user-help@jakarta.apache.org
  • Nicholas L Mohler at Aug 15, 2003 at 1:23 pm
    I'm not sure what is wrong then...I've pasted some code snippets from my
    working code. There really isn't anything special that you need to do. As
    long as the data is constructed correctly, and the data/context names
    correclty line up, it should work... :-)

    Hope that you see something helpful in the following code snippets...
    Nick

    In the class that accesses the DB, I have the following:
    answer.setColumnNames(columns);

    while (results.next()) {
    Iterator columnIter = columns.iterator();
    Collection dataValues = new ArrayList();
    while(columnIter.hasNext()) {
    String dataValue = results.getString(columnIter.next().toString
    ());
    if (dataValue == null) {
    dataValue = "";
    }
    dataValues.add(dataValue);
    }
    answer.addToColumnData(dataValues);
    }

    Note that "answer is a bean that has two collection objects: columnNames
    and ColumnData. The addToColumnData() method adds to the collection of
    columnData.


    In the ActionClass, the "answer" object is put into the request with a name
    defined by "DBTablesReportAction.TABLE_REPORT_LIST"

    In the jsp:
    <logic:iterate name="<%= DBTablesReportAction.TABLE_REPORT_LIST %>"
    id="dataRow" indexId="index" property="columnData">
    <tr align="left" class="<%= (index.intValue()%2 == 0) ?
    "ReportRowEven" : "ReportRowOdd" %>">
    <logic:iterate name="dataRow" id="columnDataRow">
    <td align="right">
    <bean:write name="columnDataRow"/>
    </td>
    </logic:iterate>
    </tr>
    </logic:iterate>






    "Mehta, Chirag (IT)"
    <Chirag.Mehta@morgans To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
    tanley.com> cc:
    Subject: RE: Dumbo Question
    08/15/2003 08:17 AM
    Please respond to
    "Struts Users Mailing
    List"






    DOH! That's exactly what I have done.

    Is there anywhere were I have to state that the tabledata contains
    ojects of type List?

    And is there anything I might have to configure in my config.xml or my
    ActionClass.

    The weird thing is that the first iterate works fine - for the column
    headings.

    And the outer loop in the second iterate works too. It will print out
    the collection in cell one of the tabledata for example.



    -----Original Message-----
    From: Nicholas L Mohler
    Sent: 15 August 2003 12:09
    To: Struts Users Mailing List
    Subject: RE: Dumbo Question








    Chirag,

    I looked at your code, and it looks right. It makes me think that
    something must be wrong with the data. Your data should look like this:

    - You have an object called Results in scope that has a collection
    property
    called tabledata (tbdata).
    - Each object in the tbdata collection is itselt a collection of objects
    (rowData)

    Verify that your data looks like that...if your data looks right, then
    I'm
    stumped as your code looks right.
    Nick







    "Mehta, Chirag (IT)"

    <Chirag.Mehta@morgans To: "Struts
    Users Mailing List" <struts-user@jakarta.apache.org>
    tanley.com> cc:

    Subject: RE: Dumbo
    Question
    08/15/2003 06:44 AM

    Please respond to

    "Struts Users Mailing

    List"









    Ok. Got a step further but spent the last 2 hours trying to figure this
    out. This is my code in my JSP page.
    I get an error of org.apache.jasper.JasperException: Cannot find bean
    rowData in any scope.

    The second logic iterate is on a 2D Collection. It will display tbdata
    if I ask it too but the whole row of data goes in a cell. But I would
    like to put one piece of data in each cell. Ie:

    Test Test
    Test

    NOT

    Test|Test|Test Test|Test|Test
    Test|Test|Test




    <TABLE border = "1">
    <tr> <logic:iterate name="Results" property="columnnames"
    id="columnname" >
    <th><bean:write name="columnname"/></th>
    </logic:iterate> </tr>

    <logic:iterate name="Results" property="tabledata" id="tbdata">
    <tr> <logic:iterate name="tbdata" id="rowData">
    <td><bean:write name="rowData"/></td>
    </logic:iterate> </tr>
    </logic:iterate>

    </TABLE>


    Please help someone!

    Chirag


    --
    NOTICE: If received in error, please destroy and notify sender. Sender
    does not waive confidentiality or privilege, and use is prohibited.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
    For additional commands, e-mail: struts-user-help@jakarta.apache.org






    ---------------------------------------------------------------------
    To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
    For additional commands, e-mail: struts-user-help@jakarta.apache.org



    --
    NOTICE: If received in error, please destroy and notify sender. Sender
    does not waive confidentiality or privilege, and use is prohibited.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
    For additional commands, e-mail: struts-user-help@jakarta.apache.org






    ---------------------------------------------------------------------
    To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
    For additional commands, e-mail: struts-user-help@jakarta.apache.org
  • Mehta, Chirag (IT) at Aug 15, 2003 at 1:42 pm
    Thanks mate. I got it working. In my DbConnect class I was using a for
    statement. I changed it to a while loop like yours and god knows why,
    but that sorted out my scope problem!!



    -----Original Message-----
    From: Nicholas L Mohler
    Sent: 15 August 2003 12:09
    To: Struts Users Mailing List
    Subject: RE: Dumbo Question








    Chirag,

    I looked at your code, and it looks right. It makes me think that
    something must be wrong with the data. Your data should look like this:

    - You have an object called Results in scope that has a collection
    property
    called tabledata (tbdata).
    - Each object in the tbdata collection is itselt a collection of objects
    (rowData)

    Verify that your data looks like that...if your data looks right, then
    I'm
    stumped as your code looks right.
    Nick







    "Mehta, Chirag (IT)"

    <Chirag.Mehta@morgans To: "Struts
    Users Mailing List" <struts-user@jakarta.apache.org>
    tanley.com> cc:

    Subject: RE: Dumbo
    Question
    08/15/2003 06:44 AM

    Please respond to

    "Struts Users Mailing

    List"









    Ok. Got a step further but spent the last 2 hours trying to figure this
    out. This is my code in my JSP page.
    I get an error of org.apache.jasper.JasperException: Cannot find bean
    rowData in any scope.

    The second logic iterate is on a 2D Collection. It will display tbdata
    if I ask it too but the whole row of data goes in a cell. But I would
    like to put one piece of data in each cell. Ie:

    Test Test
    Test

    NOT

    Test|Test|Test Test|Test|Test
    Test|Test|Test




    <TABLE border = "1">
    <tr> <logic:iterate name="Results" property="columnnames"
    id="columnname" >
    <th><bean:write name="columnname"/></th>
    </logic:iterate> </tr>

    <logic:iterate name="Results" property="tabledata" id="tbdata">
    <tr> <logic:iterate name="tbdata" id="rowData">
    <td><bean:write name="rowData"/></td>
    </logic:iterate> </tr>
    </logic:iterate>

    </TABLE>


    Please help someone!

    Chirag


    --
    NOTICE: If received in error, please destroy and notify sender. Sender
    does not waive confidentiality or privilege, and use is prohibited.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
    For additional commands, e-mail: struts-user-help@jakarta.apache.org






    ---------------------------------------------------------------------
    To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
    For additional commands, e-mail: struts-user-help@jakarta.apache.org



    --
    NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
    For additional commands, e-mail: struts-user-help@jakarta.apache.org

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriesstruts
postedAug 14, '03 at 3:00p
activeAug 15, '03 at 1:42p
posts12
users5
websitestruts.apache.org
irc#struts

People

Translate

site design / logo © 2022 Grokbase