I'm trying to put a select list on my page.  The contents of the list need to come 
from the database.  I have a DAO layer, so I'm doing okay isolating the database 
access, but I'm still not quite sure when to retrieve the values and where to put them.

In most of the examples I look at, and the struts-example webapp is no different, when 
you get down to the details, it'll say something like:

"In real life, these would be loaded from a database"

Well, that's in the 'subscription.jsp' page, and I *know* that "in real life" it 
wouldn't be loaded from the database *there*!

I'm reading the docs for the <html:collection> and there are so many combinations of 
attributes that I'm still a bit confused.  So far I've worked out that I can:

1. Put a Collection in some scope, as the example does.

2. Put a method in my ActionForm extension that returns a Collection

There are probably more.  Can someone give me some guidance on which method of 
supplying choices for a select list might work best for me?

I'd like to get them into application scope if possible-- once they're loaded they're 
good "forever" and can be shared among sessions.  (They change infrequently, and can 
wait for a restart on maintenance weekend to load the new values.)

Thanks!

-- 
Wendy in Chandler, AZ



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to