struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Johnson <chach...@gmail.com>
Subject Re: forEach> for an object that extends ArrayList in Application **and** Session
Date Wed, 13 Apr 2005 20:26:22 GMT
bingo, that was it. Thank you!

On 4/13/05, Abdullah Jibaly <Abdullah.Jibaly@aeroxchange.com> wrote:
> try:
> 
> <c:forEach items="${sessionScope['userPortfolios']}" var="p">
>        <c:out value="${p.portfolioName}" />
> </c:forEach>
> 
> -Abdullah
> 
> -----Original Message-----
> From: David Johnson [mailto:chachany@gmail.com]
> Sent: Wednesday, April 13, 2005 2:46 PM
> To: Struts Users Mailing List
> Subject: Re: forEach> for an object that extends ArrayList in
> Application **and** Session
> 
> Oh, and to answer the other question, I stored the
> PortfolioBeanCollection on the session under the key
> 
> "userPortfolios" like this:
> 
> PortfolioBeanCollection myPortfolios= loadUserPortfolios(userID);
> session.setAttribute("userPortfolios",myPortfolios);
> 
> On 4/13/05, David Johnson <chachany@gmail.com> wrote:
> > that makes sense, but the individual portfolios (the members of the
> > PortfolioBeanCollection) dont really have a name, I just looped
> > through my result set doing
> >
> > PortfolioBeanCollection PBC=new PortfolioBeanCollection ();
> > while (result.hasnext){
> > pbc.add (new PortfolioBean(resultSet.getString("namefield")));
> > }
> >
> > so I really just used the PortfolioBeanCollection as if it were a
> > garden variety ArrayList.... does your comment still apply?
> >
> > On 4/13/05, Dave Newton <newton@pingsite.com> wrote:
> > > David Johnson wrote:
> > >
> > > ><c:forEach var="portfolio" items="${userPortfolios}">
> > > >     <c:out value="${portfolioName}"/><br>
> > > ></c:forEach>
> > > >
> > > >it outputs the proper number of <br> tags, but is not preperly
> > > >displaying the correct PortfolioBeanCollection.PortfolioBean.portfolioName
> > > >
> > > >
> > > You're not specifying the bean from which to get the property.
> > >
> > > <c:out value="${portfolion.portfolioName}"/>
> > >
> > > Dave
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> >
> > --
> > -Dave
> > ChaChaNY@Gmail.com
> >
> 
> --
> -Dave
> ChaChaNY@Gmail.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 


-- 
-Dave
ChaChaNY@Gmail.com

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


Mime
View raw message