No, no, that's not what I need. The "sponsor" is just a string value in the meeting object. I don't need an array of sponsor objects. I just need an array of strings in my object.
Now that I think about it some more, I'm going to be working with the data as a list almost exclusively. As such, getSponsorList() and setSponsorList() are fairly straightforward. How I actually store them in the instance is really immaterial. Is it a "bad thing" to have private methods in a bean in case I need to do some manipulation of the array "under the covers"? -----Original Message----- From: Teddy Payne [mailto:[EMAIL PROTECTED] Sent: Thursday, December 21, 2006 12:36 PM To: CF-Talk Subject: Re: Using arrays in a simple bean Al, When you deal with one record or one sponsor at a time, you can use a getter/setter bean to modify its data. If you individually want to modidy a group of them, a typical useage is an array of bean objects. The array of bean objects gets expensive though creating all of the objects. If you just want to just output them, you would create a gateway, which would just return a query of the sponsors. Since you are dealing with only 10 though, you may be able to get away with an array of beans aka value objects. I would definitely test performance. Teddy On 12/21/06, Everett, Al (NIH/NIGMS) [C] <[EMAIL PROTECTED]> wrote: > > I'm using a bean cfc for an instance of a meeting. Each meeting can > have between 0 and 10 sponsors. (These are just string values.) > > Rather than have setSponsor1, getSponsor1, setSponsor2 etc. and have > 10 different properties in the instance, I thought I'd put it into an > array. This has two other side effects: Memory isn't taken up by > undefined variables and it should easily allow for future > expansion/contraction if the business rules should change. > > I'm having a bit of trouble getting my head around the best way to do > the getter/setter methods. Has anyone done something similar that I > could crib for ideas? > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264769 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

