struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul McCulloch <paul.mccull...@axiossystems.com>
Subject RE: Question with beans and iterate
Date Thu, 02 Sep 2004 09:44:04 GMT
Although this is (probably) possible your object model is making things more
difficult than it needs to be. 

I would consider remodelling this as a single Map of Items where each Item
has, in addition to it's other properties, a Collection of SubItems. This
will be fairly easy to render using the JSTL iteration tags (iterate over
the Map of Items, within that iterate over the current Item's SubItems).

HTH,

Paul

> -----Original Message-----
> From: Mariano Garcia [mailto:mariano.garcia@optivamedia.com]
> Sent: Thursday, September 02, 2004 10:08 AM
> To: Struts Users Mailing List
> Subject: Question with beans and iterate
> 
> 
> Hi all,
> 
> I have a problem and I don't know the best way to solve it. 
> This is the
> situation
> 
> There are two Maps, included in request by an action:
> a. itemMap (Item objects)
> b. subItemMap (SubItem objects)
> 
> The Item object has a property (subitem_id) that identifies a
> subItemMap. I want to iterate the itemMap in order to show the Item
> property values in the view, and to show its asociated 
> SubItem property
> values.
> 
> Do you know what could be the best way to do it?
> 
> Regards.
> 
> -- 
>   Mariano García González :: Ingeniero de Sistemas
> ----------------------------------------------------
>         OPTIVA MEDIA            PGP 0x89E8E4CE
> 	c/ Musgo 2 
> 	Ed. Europa II 
> 	280023 Madrid (España)
>         t. +34 91 297 72 71
> 	f. +34 91 297 72 72
>         www.optivamedia.com
> 
> © This message is printed on 100% recycled electrons.
> 


**********************************************************************
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you are not the addressee
indicated in this message (or responsible for delivery of the message to such person), you
may not copy or deliver this message to anyone. In such case, you should destroy this message,
and notify us immediately. If you or your employer does not consent to Internet email messages
of this kind, please advise us immediately. Opinions, conclusions and other information expressed
in this message are not given or endorsed by my Company or employer unless otherwise indicated
by an authorised representative independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via
electronic mail attachments we cannot guarantee that attachments do not contain computer virus
code.  You are therefore strongly advised to undertake anti virus checks prior to accessing
the attachment to this electronic mail.  Axios Systems Ltd grants no warranties regarding
performance use or quality of any attachment and undertakes no liability for loss or damage
howsoever caused.
**********************************************************************


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


Mime
View raw message