I'm building my first real struts app. (Okay, its also my first real Java app, my 
first real servlet app and a bunch of other firsts, but who's counting? :-)

I'd like to present a form that contains a few selection lists, with values taken from 
a few tables in my database.

Let's say the lists are:
1) A list of documents the user can have sent to him
2) A list of transport methods he can choose (ftp, email, snail mail, etc...)
3) A list of credit cards that we currently accept.

Obviously, these are logically disparate lists, so I would rather not create a 
form-specific bean to encapsulate all this information.

What I'd *REALLY* like to do is have a DocsBean, a DeliveryOptionsBean and a 
CreditCardBean that each load themselves from the database. And in a perfect world, 
I'd like to be able to specify (in the action tag of my struts-config) that form 
UserOrder wants all three of those beans loaded into the request scope.

Is that possible? It appears to me that the action tag only takes a single formbean 
name, so I am assuming I have to find a different way to do what I want. Any 
suggestions?

Failing that, I suppose I could chain together a couple of actions: a) a pre-action 
that would load my beans for me and then b) the actual forward to the userform.jsp. 
But that seems a bit tedious. (Why write by hand what could be abstracted out and 
built into the next version of Struts?)

I've got lots more questions, but I'll try to keep them in separate threads.

Jefficus

Reply via email to