You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Chris Newland <ch...@emorphia.com> on 2001/09/04 19:33:59 UTC
C2: Action to modify request parameters
Hi All,
I'm writing an action that is a pre-filter to DatabaseAddAction that
modifies request parameters before they are sent to the database.
In the map() method of my action I can get the parameters using:
Request req = (Request)objectModel.get(Constants.REQUEST_OBJECT);
String my_param = (String)request.getParameter("my_param");
// process parameter here
But there is no request.setParameter() to return the updated value to the
request.
Is this possible? (I hope so)
Thanks,
Chris
--
Chris Newland
Software Research Engineer
Emorphia Ltd
Registered in England. 4133002
Mill House, Station Approach, Harlow Mill, Harlow, Essex, CM20 2EL, UK
Email: chris.newland@emorphia.com
Tel: +44 (0)1279 450100
Fax: +44 (0)1279 450102
Check out FIPA-OS at http://fipa-os.sourceforge.net/
This message may contain information proprietary to Emorphia so any
unauthorised disclosure, copying or distribution of its contents is strictly
prohibited.
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: Action to modify request parameters
Posted by "Piroumian, Konstantin" <KP...@flagship.ru>.
> Hi All,
>
> I'm writing an action that is a pre-filter to DatabaseAddAction that
> modifies request parameters before they are sent to the database.
>
> In the map() method of my action I can get the parameters using:
>
> Request req = (Request)objectModel.get(Constants.REQUEST_OBJECT);
> String my_param = (String)request.getParameter("my_param");
>
> // process parameter here
>
> But there is no request.setParameter() to return the updated value to the
> request.
>
> Is this possible? (I hope so)
You have to use request attributes to pass additional data with your
request - you cannot change request parameters.
See:
request.getAttribute()
request.setAttribute()
Konstantin
>
> Thanks,
>
> Chris
>
> --
> Chris Newland
> Software Research Engineer
>
> Emorphia Ltd
> Registered in England. 4133002
> Mill House, Station Approach, Harlow Mill, Harlow, Essex, CM20 2EL, UK
>
> Email: chris.newland@emorphia.com
> Tel: +44 (0)1279 450100
> Fax: +44 (0)1279 450102
>
> Check out FIPA-OS at http://fipa-os.sourceforge.net/
>
> This message may contain information proprietary to Emorphia so any
> unauthorised disclosure, copying or distribution of its contents is
strictly
> prohibited.
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: C2: Action to modify request parameters
Posted by "Piroumian, Konstantin" <KP...@flagship.ru>.
> Hi Konstantin,
>
> Sorry for appearing stupid but I still don't see how attributes can help
me.
>
> here is the original situation:
>
> 1) Form is submitted and form values are set into request *parameters*
> 2) DatabaseAddAction reads request *parameters* and puts them into
database.
>
> But I need to manipulate the parameters first so I thought I'd put an
action
> between the form and the DatabaseAddAction which alters the request
> parameters:
>
> 1) Form values set into request *parameters*
>
> 2) My action reads values from request *parameters*
>
> I cannot set new values back into request parameters
>
> If I set the new values into request attributes then the DatabaseAddAction
> ignores these and reads the original values from the request parameters.
>
> If I set the new values into sitemap parameters then the DatabaseAddAction
> ignores these and reads the original values from the request parameters.
>
> 3) DatabaseAddAction reads request *parameters*
>
> Request attributes are different from request parameters aren't they?
Yes, request attributes are used exactly for the tasks similar to yours. You
can have an action, which get request parameters and put them into
attributes (it can be a single object, holding all the necessary data) and
you have to change DatabaseAddAction to make it use attributes instead of
parameters (or ask in cocoon-dev to do it). I'm not familiar with the
DatabaseAddAction, but as I can see, it explicitly uses request parameters
and there's no other option now.
Other solution can be creating a new request with new parameters, but it's
not a good way.
kot
>
> Thanks for your patience,
>
> Chris
>
> > -----Original Message-----
> > From: Piroumian, Konstantin [mailto:KPiroumian@flagship.ru]
> > Sent: 05 September 2001 10:43
> > To: cocoon-users@xml.apache.org
> > Subject: Re: C2: Action to modify request parameters
> >
> >
> > Why you don't want to use request attributes? They are the right place
of
> > holding this kind of information and passing between different
processing
> > layers: actions, pages, etc.
> >
> >
> > ----- Original Message -----
> > From: "Chris Newland" <ch...@emorphia.com>
> > To: <co...@xml.apache.org>
> > Sent: Wednesday, September 05, 2001 1:30 PM
> > Subject: RE: C2: Action to modify request parameters
> >
> >
> > This is what I thought :(
> >
> > So it is not possible to use another action to modify the request
> > parameters
> > that will be picked up by DatabaseAddAction since I would have to put
the
> > updated values into the sitemap parameters and DatabaseAddAction
> > only looks
> > in the request parameters?
> >
> > Guess I'll have to subclass the Database<X>Action classes in
> > order to filter
> > the parameters.
> >
> > Thanks,
> >
> > Chris
> >
> > > -----Original Message-----
> > > From: Jrn Heid [mailto:heid@fh-heilbronn.de]
> > > Sent: 05 September 2001 10:22
> > > To: cocoon-users@xml.apache.org
> > > Subject: AW: C2: Action to modify request parameters
> > >
> > >
> > > No. There are two maps.
> > >
> > > -----Ursprngliche Nachricht-----
> > > Von: Chris Newland [mailto:chris.newland@emorphia.com]
> > > Gesendet: Mittwoch, 5. September 2001 11:14
> > > An: cocoon-users@xml.apache.org
> > > Betreff: RE: C2: Action to modify request parameters
> > >
> > >
> > > Does this mean that sitemap parameters override request
> > parameters of the
> > > same name?
> > >
> > > Form:
> > > Set request parameter
> > >
> > > --->
> > >
> > > Filter action:
> > > Get request parameter
> > > Alter parameter
> > > Save in sitemap parameter
> > >
> > > --->
> > >
> > > DatabaseAddAction:
> > > use sitemap parameter instead of request parameter with same name
> > >
> > > Otherwise, I cannot chain these actions without altering the code in
> > > DatabaseAddAction (which I am trying not to do)
> > >
> > > Thanks,
> > >
> > > Chris
> > >
> > > > -----Original Message-----
> > > > From: Jrn Heid [mailto:heid@fh-heilbronn.de]
> > > > Sent: 04 September 2001 19:14
> > > > To: cocoon-users@xml.apache.org
> > > > Subject: AW: C2: Action to modify request parameters
> > > >
> > > >
> > > > I think not. But you can use sitemap params (that's the
> > > preferred way for
> > > > actions). And this works with the sitemap, other actions, xslt...
> > > >
> > > > -----Ursprngliche Nachricht-----
> > > > Von: Chris Newland [mailto:chris.newland@emorphia.com]
> > > > Gesendet: Dienstag, 4. September 2001 19:34
> > > > An: Cocoon-Users
> > > > Betreff: C2: Action to modify request parameters
> > > >
> > > >
> > > > Hi All,
> > > >
> > > > I'm writing an action that is a pre-filter to DatabaseAddAction that
> > > > modifies request parameters before they are sent to the database.
> > > >
> > > > In the map() method of my action I can get the parameters using:
> > > >
> > > > Request req = (Request)objectModel.get(Constants.REQUEST_OBJECT);
> > > > String my_param = (String)request.getParameter("my_param");
> > > >
> > > > // process parameter here
> > > >
> > > > But there is no request.setParameter() to return the updated
> > > value to the
> > > > request.
> > > >
> > > > Is this possible? (I hope so)
> > > >
> > > > Thanks,
> > > >
> > > > Chris
> > > >
> > > > --
> > > > Chris Newland
> > > > Software Research Engineer
> > > >
> > > > Emorphia Ltd
> > > > Registered in England. 4133002
> > > > Mill House, Station Approach, Harlow Mill, Harlow, Essex, CM20 2EL,
UK
> > > >
> > > > Email: chris.newland@emorphia.com
> > > > Tel: +44 (0)1279 450100
> > > > Fax: +44 (0)1279 450102
> > > >
> > > > Check out FIPA-OS at http://fipa-os.sourceforge.net/
> > > >
> > > > This message may contain information proprietary to Emorphia so any
> > > > unauthorised disclosure, copying or distribution of its contents
> > > > is strictly
> > > > prohibited.
> > > >
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > Please check that your question has not already been answered in the
> > > > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> > > >
> > > > To unsubscribe, e-mail: <co...@xml.apache.org>
> > > > For additional commands, e-mail: <co...@xml.apache.org>
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > Please check that your question has not already been answered in the
> > > > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> > > >
> > > > To unsubscribe, e-mail: <co...@xml.apache.org>
> > > > For additional commands, e-mail: <co...@xml.apache.org>
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > Please check that your question has not already been answered in the
> > > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> > >
> > > To unsubscribe, e-mail: <co...@xml.apache.org>
> > > For additional commands, e-mail: <co...@xml.apache.org>
> > >
> > >
> > > ---------------------------------------------------------------------
> > > Please check that your question has not already been answered in the
> > > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> > >
> > > To unsubscribe, e-mail: <co...@xml.apache.org>
> > > For additional commands, e-mail: <co...@xml.apache.org>
> > >
> > >
> > >
> >
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <co...@xml.apache.org>
> > For additional commands, e-mail: <co...@xml.apache.org>
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <co...@xml.apache.org>
> > For additional commands, e-mail: <co...@xml.apache.org>
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: C2: Action to modify request parameters
Posted by Chris Newland <ch...@emorphia.com>.
Hi Konstantin,
Sorry for appearing stupid but I still don't see how attributes can help me.
here is the original situation:
1) Form is submitted and form values are set into request *parameters*
2) DatabaseAddAction reads request *parameters* and puts them into database.
But I need to manipulate the parameters first so I thought I'd put an action
between the form and the DatabaseAddAction which alters the request
parameters:
1) Form values set into request *parameters*
2) My action reads values from request *parameters*
I cannot set new values back into request parameters
If I set the new values into request attributes then the DatabaseAddAction
ignores these and reads the original values from the request parameters.
If I set the new values into sitemap parameters then the DatabaseAddAction
ignores these and reads the original values from the request parameters.
3) DatabaseAddAction reads request *parameters*
Request attributes are different from request parameters aren't they?
Thanks for your patience,
Chris
> -----Original Message-----
> From: Piroumian, Konstantin [mailto:KPiroumian@flagship.ru]
> Sent: 05 September 2001 10:43
> To: cocoon-users@xml.apache.org
> Subject: Re: C2: Action to modify request parameters
>
>
> Why you don't want to use request attributes? They are the right place of
> holding this kind of information and passing between different processing
> layers: actions, pages, etc.
>
>
> ----- Original Message -----
> From: "Chris Newland" <ch...@emorphia.com>
> To: <co...@xml.apache.org>
> Sent: Wednesday, September 05, 2001 1:30 PM
> Subject: RE: C2: Action to modify request parameters
>
>
> This is what I thought :(
>
> So it is not possible to use another action to modify the request
> parameters
> that will be picked up by DatabaseAddAction since I would have to put the
> updated values into the sitemap parameters and DatabaseAddAction
> only looks
> in the request parameters?
>
> Guess I'll have to subclass the Database<X>Action classes in
> order to filter
> the parameters.
>
> Thanks,
>
> Chris
>
> > -----Original Message-----
> > From: Jrn Heid [mailto:heid@fh-heilbronn.de]
> > Sent: 05 September 2001 10:22
> > To: cocoon-users@xml.apache.org
> > Subject: AW: C2: Action to modify request parameters
> >
> >
> > No. There are two maps.
> >
> > -----Ursprngliche Nachricht-----
> > Von: Chris Newland [mailto:chris.newland@emorphia.com]
> > Gesendet: Mittwoch, 5. September 2001 11:14
> > An: cocoon-users@xml.apache.org
> > Betreff: RE: C2: Action to modify request parameters
> >
> >
> > Does this mean that sitemap parameters override request
> parameters of the
> > same name?
> >
> > Form:
> > Set request parameter
> >
> > --->
> >
> > Filter action:
> > Get request parameter
> > Alter parameter
> > Save in sitemap parameter
> >
> > --->
> >
> > DatabaseAddAction:
> > use sitemap parameter instead of request parameter with same name
> >
> > Otherwise, I cannot chain these actions without altering the code in
> > DatabaseAddAction (which I am trying not to do)
> >
> > Thanks,
> >
> > Chris
> >
> > > -----Original Message-----
> > > From: Jrn Heid [mailto:heid@fh-heilbronn.de]
> > > Sent: 04 September 2001 19:14
> > > To: cocoon-users@xml.apache.org
> > > Subject: AW: C2: Action to modify request parameters
> > >
> > >
> > > I think not. But you can use sitemap params (that's the
> > preferred way for
> > > actions). And this works with the sitemap, other actions, xslt...
> > >
> > > -----Ursprngliche Nachricht-----
> > > Von: Chris Newland [mailto:chris.newland@emorphia.com]
> > > Gesendet: Dienstag, 4. September 2001 19:34
> > > An: Cocoon-Users
> > > Betreff: C2: Action to modify request parameters
> > >
> > >
> > > Hi All,
> > >
> > > I'm writing an action that is a pre-filter to DatabaseAddAction that
> > > modifies request parameters before they are sent to the database.
> > >
> > > In the map() method of my action I can get the parameters using:
> > >
> > > Request req = (Request)objectModel.get(Constants.REQUEST_OBJECT);
> > > String my_param = (String)request.getParameter("my_param");
> > >
> > > // process parameter here
> > >
> > > But there is no request.setParameter() to return the updated
> > value to the
> > > request.
> > >
> > > Is this possible? (I hope so)
> > >
> > > Thanks,
> > >
> > > Chris
> > >
> > > --
> > > Chris Newland
> > > Software Research Engineer
> > >
> > > Emorphia Ltd
> > > Registered in England. 4133002
> > > Mill House, Station Approach, Harlow Mill, Harlow, Essex, CM20 2EL, UK
> > >
> > > Email: chris.newland@emorphia.com
> > > Tel: +44 (0)1279 450100
> > > Fax: +44 (0)1279 450102
> > >
> > > Check out FIPA-OS at http://fipa-os.sourceforge.net/
> > >
> > > This message may contain information proprietary to Emorphia so any
> > > unauthorised disclosure, copying or distribution of its contents
> > > is strictly
> > > prohibited.
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > Please check that your question has not already been answered in the
> > > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> > >
> > > To unsubscribe, e-mail: <co...@xml.apache.org>
> > > For additional commands, e-mail: <co...@xml.apache.org>
> > >
> > >
> > > ---------------------------------------------------------------------
> > > Please check that your question has not already been answered in the
> > > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> > >
> > > To unsubscribe, e-mail: <co...@xml.apache.org>
> > > For additional commands, e-mail: <co...@xml.apache.org>
> > >
> > >
> > >
> >
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <co...@xml.apache.org>
> > For additional commands, e-mail: <co...@xml.apache.org>
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <co...@xml.apache.org>
> > For additional commands, e-mail: <co...@xml.apache.org>
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: C2: Action to modify request parameters
Posted by "Piroumian, Konstantin" <KP...@flagship.ru>.
Why you don't want to use request attributes? They are the right place of
holding this kind of information and passing between different processing
layers: actions, pages, etc.
----- Original Message -----
From: "Chris Newland" <ch...@emorphia.com>
To: <co...@xml.apache.org>
Sent: Wednesday, September 05, 2001 1:30 PM
Subject: RE: C2: Action to modify request parameters
This is what I thought :(
So it is not possible to use another action to modify the request parameters
that will be picked up by DatabaseAddAction since I would have to put the
updated values into the sitemap parameters and DatabaseAddAction only looks
in the request parameters?
Guess I'll have to subclass the Database<X>Action classes in order to filter
the parameters.
Thanks,
Chris
> -----Original Message-----
> From: Jörn Heid [mailto:heid@fh-heilbronn.de]
> Sent: 05 September 2001 10:22
> To: cocoon-users@xml.apache.org
> Subject: AW: C2: Action to modify request parameters
>
>
> No. There are two maps.
>
> -----Ursprngliche Nachricht-----
> Von: Chris Newland [mailto:chris.newland@emorphia.com]
> Gesendet: Mittwoch, 5. September 2001 11:14
> An: cocoon-users@xml.apache.org
> Betreff: RE: C2: Action to modify request parameters
>
>
> Does this mean that sitemap parameters override request parameters of the
> same name?
>
> Form:
> Set request parameter
>
> --->
>
> Filter action:
> Get request parameter
> Alter parameter
> Save in sitemap parameter
>
> --->
>
> DatabaseAddAction:
> use sitemap parameter instead of request parameter with same name
>
> Otherwise, I cannot chain these actions without altering the code in
> DatabaseAddAction (which I am trying not to do)
>
> Thanks,
>
> Chris
>
> > -----Original Message-----
> > From: Jrn Heid [mailto:heid@fh-heilbronn.de]
> > Sent: 04 September 2001 19:14
> > To: cocoon-users@xml.apache.org
> > Subject: AW: C2: Action to modify request parameters
> >
> >
> > I think not. But you can use sitemap params (that's the
> preferred way for
> > actions). And this works with the sitemap, other actions, xslt...
> >
> > -----Ursprngliche Nachricht-----
> > Von: Chris Newland [mailto:chris.newland@emorphia.com]
> > Gesendet: Dienstag, 4. September 2001 19:34
> > An: Cocoon-Users
> > Betreff: C2: Action to modify request parameters
> >
> >
> > Hi All,
> >
> > I'm writing an action that is a pre-filter to DatabaseAddAction that
> > modifies request parameters before they are sent to the database.
> >
> > In the map() method of my action I can get the parameters using:
> >
> > Request req = (Request)objectModel.get(Constants.REQUEST_OBJECT);
> > String my_param = (String)request.getParameter("my_param");
> >
> > // process parameter here
> >
> > But there is no request.setParameter() to return the updated
> value to the
> > request.
> >
> > Is this possible? (I hope so)
> >
> > Thanks,
> >
> > Chris
> >
> > --
> > Chris Newland
> > Software Research Engineer
> >
> > Emorphia Ltd
> > Registered in England. 4133002
> > Mill House, Station Approach, Harlow Mill, Harlow, Essex, CM20 2EL, UK
> >
> > Email: chris.newland@emorphia.com
> > Tel: +44 (0)1279 450100
> > Fax: +44 (0)1279 450102
> >
> > Check out FIPA-OS at http://fipa-os.sourceforge.net/
> >
> > This message may contain information proprietary to Emorphia so any
> > unauthorised disclosure, copying or distribution of its contents
> > is strictly
> > prohibited.
> >
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <co...@xml.apache.org>
> > For additional commands, e-mail: <co...@xml.apache.org>
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <co...@xml.apache.org>
> > For additional commands, e-mail: <co...@xml.apache.org>
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: C2: Action to modify request parameters
Posted by Chris Newland <ch...@emorphia.com>.
This is what I thought :(
So it is not possible to use another action to modify the request parameters
that will be picked up by DatabaseAddAction since I would have to put the
updated values into the sitemap parameters and DatabaseAddAction only looks
in the request parameters?
Guess I'll have to subclass the Database<X>Action classes in order to filter
the parameters.
Thanks,
Chris
> -----Original Message-----
> From: Jörn Heid [mailto:heid@fh-heilbronn.de]
> Sent: 05 September 2001 10:22
> To: cocoon-users@xml.apache.org
> Subject: AW: C2: Action to modify request parameters
>
>
> No. There are two maps.
>
> -----Ursprngliche Nachricht-----
> Von: Chris Newland [mailto:chris.newland@emorphia.com]
> Gesendet: Mittwoch, 5. September 2001 11:14
> An: cocoon-users@xml.apache.org
> Betreff: RE: C2: Action to modify request parameters
>
>
> Does this mean that sitemap parameters override request parameters of the
> same name?
>
> Form:
> Set request parameter
>
> --->
>
> Filter action:
> Get request parameter
> Alter parameter
> Save in sitemap parameter
>
> --->
>
> DatabaseAddAction:
> use sitemap parameter instead of request parameter with same name
>
> Otherwise, I cannot chain these actions without altering the code in
> DatabaseAddAction (which I am trying not to do)
>
> Thanks,
>
> Chris
>
> > -----Original Message-----
> > From: Jrn Heid [mailto:heid@fh-heilbronn.de]
> > Sent: 04 September 2001 19:14
> > To: cocoon-users@xml.apache.org
> > Subject: AW: C2: Action to modify request parameters
> >
> >
> > I think not. But you can use sitemap params (that's the
> preferred way for
> > actions). And this works with the sitemap, other actions, xslt...
> >
> > -----Ursprngliche Nachricht-----
> > Von: Chris Newland [mailto:chris.newland@emorphia.com]
> > Gesendet: Dienstag, 4. September 2001 19:34
> > An: Cocoon-Users
> > Betreff: C2: Action to modify request parameters
> >
> >
> > Hi All,
> >
> > I'm writing an action that is a pre-filter to DatabaseAddAction that
> > modifies request parameters before they are sent to the database.
> >
> > In the map() method of my action I can get the parameters using:
> >
> > Request req = (Request)objectModel.get(Constants.REQUEST_OBJECT);
> > String my_param = (String)request.getParameter("my_param");
> >
> > // process parameter here
> >
> > But there is no request.setParameter() to return the updated
> value to the
> > request.
> >
> > Is this possible? (I hope so)
> >
> > Thanks,
> >
> > Chris
> >
> > --
> > Chris Newland
> > Software Research Engineer
> >
> > Emorphia Ltd
> > Registered in England. 4133002
> > Mill House, Station Approach, Harlow Mill, Harlow, Essex, CM20 2EL, UK
> >
> > Email: chris.newland@emorphia.com
> > Tel: +44 (0)1279 450100
> > Fax: +44 (0)1279 450102
> >
> > Check out FIPA-OS at http://fipa-os.sourceforge.net/
> >
> > This message may contain information proprietary to Emorphia so any
> > unauthorised disclosure, copying or distribution of its contents
> > is strictly
> > prohibited.
> >
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <co...@xml.apache.org>
> > For additional commands, e-mail: <co...@xml.apache.org>
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <co...@xml.apache.org>
> > For additional commands, e-mail: <co...@xml.apache.org>
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
AW: C2: Action to modify request parameters
Posted by Jörn Heid <he...@fh-heilbronn.de>.
No. There are two maps.
-----Ursprüngliche Nachricht-----
Von: Chris Newland [mailto:chris.newland@emorphia.com]
Gesendet: Mittwoch, 5. September 2001 11:14
An: cocoon-users@xml.apache.org
Betreff: RE: C2: Action to modify request parameters
Does this mean that sitemap parameters override request parameters of the
same name?
Form:
Set request parameter
--->
Filter action:
Get request parameter
Alter parameter
Save in sitemap parameter
--->
DatabaseAddAction:
use sitemap parameter instead of request parameter with same name
Otherwise, I cannot chain these actions without altering the code in
DatabaseAddAction (which I am trying not to do)
Thanks,
Chris
> -----Original Message-----
> From: Jörn Heid [mailto:heid@fh-heilbronn.de]
> Sent: 04 September 2001 19:14
> To: cocoon-users@xml.apache.org
> Subject: AW: C2: Action to modify request parameters
>
>
> I think not. But you can use sitemap params (that's the preferred way for
> actions). And this works with the sitemap, other actions, xslt...
>
> -----Ursprngliche Nachricht-----
> Von: Chris Newland [mailto:chris.newland@emorphia.com]
> Gesendet: Dienstag, 4. September 2001 19:34
> An: Cocoon-Users
> Betreff: C2: Action to modify request parameters
>
>
> Hi All,
>
> I'm writing an action that is a pre-filter to DatabaseAddAction that
> modifies request parameters before they are sent to the database.
>
> In the map() method of my action I can get the parameters using:
>
> Request req = (Request)objectModel.get(Constants.REQUEST_OBJECT);
> String my_param = (String)request.getParameter("my_param");
>
> // process parameter here
>
> But there is no request.setParameter() to return the updated value to the
> request.
>
> Is this possible? (I hope so)
>
> Thanks,
>
> Chris
>
> --
> Chris Newland
> Software Research Engineer
>
> Emorphia Ltd
> Registered in England. 4133002
> Mill House, Station Approach, Harlow Mill, Harlow, Essex, CM20 2EL, UK
>
> Email: chris.newland@emorphia.com
> Tel: +44 (0)1279 450100
> Fax: +44 (0)1279 450102
>
> Check out FIPA-OS at http://fipa-os.sourceforge.net/
>
> This message may contain information proprietary to Emorphia so any
> unauthorised disclosure, copying or distribution of its contents
> is strictly
> prohibited.
>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: C2: Action to modify request parameters
Posted by Chris Newland <ch...@emorphia.com>.
Does this mean that sitemap parameters override request parameters of the
same name?
Form:
Set request parameter
--->
Filter action:
Get request parameter
Alter parameter
Save in sitemap parameter
--->
DatabaseAddAction:
use sitemap parameter instead of request parameter with same name
Otherwise, I cannot chain these actions without altering the code in
DatabaseAddAction (which I am trying not to do)
Thanks,
Chris
> -----Original Message-----
> From: Jörn Heid [mailto:heid@fh-heilbronn.de]
> Sent: 04 September 2001 19:14
> To: cocoon-users@xml.apache.org
> Subject: AW: C2: Action to modify request parameters
>
>
> I think not. But you can use sitemap params (that's the preferred way for
> actions). And this works with the sitemap, other actions, xslt...
>
> -----Ursprngliche Nachricht-----
> Von: Chris Newland [mailto:chris.newland@emorphia.com]
> Gesendet: Dienstag, 4. September 2001 19:34
> An: Cocoon-Users
> Betreff: C2: Action to modify request parameters
>
>
> Hi All,
>
> I'm writing an action that is a pre-filter to DatabaseAddAction that
> modifies request parameters before they are sent to the database.
>
> In the map() method of my action I can get the parameters using:
>
> Request req = (Request)objectModel.get(Constants.REQUEST_OBJECT);
> String my_param = (String)request.getParameter("my_param");
>
> // process parameter here
>
> But there is no request.setParameter() to return the updated value to the
> request.
>
> Is this possible? (I hope so)
>
> Thanks,
>
> Chris
>
> --
> Chris Newland
> Software Research Engineer
>
> Emorphia Ltd
> Registered in England. 4133002
> Mill House, Station Approach, Harlow Mill, Harlow, Essex, CM20 2EL, UK
>
> Email: chris.newland@emorphia.com
> Tel: +44 (0)1279 450100
> Fax: +44 (0)1279 450102
>
> Check out FIPA-OS at http://fipa-os.sourceforge.net/
>
> This message may contain information proprietary to Emorphia so any
> unauthorised disclosure, copying or distribution of its contents
> is strictly
> prohibited.
>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
AW: C2: Action to modify request parameters
Posted by Jörn Heid <he...@fh-heilbronn.de>.
I think not. But you can use sitemap params (that's the preferred way for
actions). And this works with the sitemap, other actions, xslt...
-----Ursprüngliche Nachricht-----
Von: Chris Newland [mailto:chris.newland@emorphia.com]
Gesendet: Dienstag, 4. September 2001 19:34
An: Cocoon-Users
Betreff: C2: Action to modify request parameters
Hi All,
I'm writing an action that is a pre-filter to DatabaseAddAction that
modifies request parameters before they are sent to the database.
In the map() method of my action I can get the parameters using:
Request req = (Request)objectModel.get(Constants.REQUEST_OBJECT);
String my_param = (String)request.getParameter("my_param");
// process parameter here
But there is no request.setParameter() to return the updated value to the
request.
Is this possible? (I hope so)
Thanks,
Chris
--
Chris Newland
Software Research Engineer
Emorphia Ltd
Registered in England. 4133002
Mill House, Station Approach, Harlow Mill, Harlow, Essex, CM20 2EL, UK
Email: chris.newland@emorphia.com
Tel: +44 (0)1279 450100
Fax: +44 (0)1279 450102
Check out FIPA-OS at http://fipa-os.sourceforge.net/
This message may contain information proprietary to Emorphia so any
unauthorised disclosure, copying or distribution of its contents is strictly
prohibited.
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>