Anna,

What I would do is start with an action (lets call it PopulateCreateAction)
that gets the collection from the DB, creates a new ActionForm and populates
that action form with the collections. I would place that in the request
scope and then do a standard action forward to the create.jsp. 

You should then come into create.jsp with the form prefilled and everything
works normally from there. :)

Al


-----Original Message-----
From: Anna Kerekes [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 04, 2004 3:58 PM
To: Struts Users Mailing List
Subject: input form

Hello,
 
I have a jsp (create.jsp), a form-bean (CreateMessageForm.java), and an
action (CreateMessageAction.java).
 
Currently, the user inputs their info into create.jsp, hits 'submit', and
the action gets the info from the form-bean
and does stuff with it.  Instead, I would like to get some information(
collections) from a database and populate "create.jsp" with them. So I would
like to:
 
- get a collection from the database
- put this collection into the request
- populate create.jsp from the request object
-  let the user edit the form (including the pre-populated parts)
- hit submit
- CreateMessageAction gets info from form-bean and does stuff...
 
Do I have to write a separate Action class for putting the collection (from
database) into the request object?  Or can I somehow incorporate this into
my current CreateMessageAction class ?
 
please help,
Anna Kerekes

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

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

Reply via email to