struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pedone, Tim" <Tim_Ped...@intuit.com>
Subject RE: ActionForm and request parameters
Date Thu, 24 Jan 2002 21:07:06 GMT
If I'm not mistaken, if you link directly to the action (MyAction?parm=X),
then Struts should put X into the ActionForm associated with that action if
it has a "parm" attribute.

It that what you are tring to accomplish?

Tim

-----Original Message-----
From: Bryan P. Glennon [mailto:bryan@bpgc.com]
Sent: Thursday, January 24, 2002 12:53 PM
To: Struts Users Mailing List
Subject: RE: ActionForm and request parameters


I feel like I am being really dense here...I must be missing something.
I understand that an action is executed after a submit (or am I wrong
here as well?). So what I want to do is this:

	page1.jsp  // This has a link to page2.jsp?parm=X

	I have a form bean for page2 that should populate the form
before it is displayed. I need to use the parm value to do this
properly. So where do I place an action that will have access both to
the parameter and to the form bean?

Thanks again for all the help.
Bryan

--
Bryan Glennon (mailto:bryan@bpgc.com)
BPG Consulting, Inc. (http://www.bpgc.com)
Tech Question? (mailto:techQuestion@bpgc.com)


-----Original Message-----
From: Brian Holzer [mailto:bholzer@sgi.sk.ca] 
Sent: Thursday, January 24, 2002 12:40 PM
To: struts-user@jakarta.apache.org
Subject: RE: ActionForm and request parameters


If you are doing an initial display, are you not loading the form values
from within an Action?  If so, request parameters are easily accessed as
the request is one of the parameters to your perform() method by using
the request.getParameter( paramName );

Brian

>>> bryan@bpgc.com 01/24/02 11:54am >>>
But what about the initial display? In order to populate the fields so
that the initial getXXX() calls will display the correct data, I need to
use a request parameter as a lookup key.

Thanks,
Bryan

--
Bryan Glennon (mailto:bryan@bpgc.com)
BPG Consulting, Inc. (http://www.bpgc.com)
Tech Question? (mailto:techQuestion@bpgc.com)


-----Original Message-----
From: Martin Farrell [mailto:Martin.Farrell@emap.com] 
Sent: Thursday, January 24, 2002 11:39 AM
To: 'Struts Users Mailing List'
Subject: RE: ActionForm and request parameters


Hi

You can just use the get set methods within a form, and use the validate
method to control what variables are filled in when. alternatively use
the action.perform method to check what parameters should be collected
when

martin

-----Original Message-----
From: Bryan P. Glennon [mailto:bryan@bpgc.com] 
Sent: 24 January 2002 17:41
To: struts-user@jakarta.apache.org 
Subject: ActionForm and request parameters


Morning -
    Is there anyway to get access to the request parameters in an
ActionForm bean? I need one of the parameters to do a lookup so that I
can correctly populate the form. 

Thanks,
Bryan
--
Bryan Glennon (mailto:bryan@bpgc.com)
BPG Consulting, Inc. (http://www.bpgc.com)
Tech Question? (mailto:techQuestion@bpgc.com)

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


** For great Emap magazine subscription & gift offers visit
http://www.emapmagazines.co.uk **

------------------------------------------------------------------------
--------
The information in this email is intended only for the addressee(s)
named above. Access to this email by anyone else is unauthorised. If you
are not the intended recipient of this message any disclosure, copying, 
distribution or any action taken in reliance on it is prohibited and may
be unlawful. 

Emap plc and or its subsidiaries do not warrant that any attachments are
free from 
viruses or other defects and accept no liability for any losses
resulting from 
infected email transmissions.

Please note that any views expressed in this email may be those of the
originator 
and do not necessarily reflect those of this organisation.
------------------------------------------------------------------------
--------


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


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



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


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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message