on 6/11/01 8:24 PM, "Gary Lawrence Murphy" <[EMAIL PROTECTED]> wrote:
>>>>>> "J" == Jon Stevens <[EMAIL PROTECTED]> writes:
>
>>> (this is to support legacy interfaces, so there's no option of
>>> using actions; the page select must be driven by the data
>>> requested)
>
> J> Actions can be specified at any time by placing the information
> J> into the query string.
>
> I'm not certain I follow. Do you mean I can alter the query string
> _after_ receiving the request? This would be very, very useful. Where
> can I do this re-writing of the query so subsequent Turbine processing
> uses the Action?
All the query/path_info/post data information is stored in the
ParameterParser class and you can modify it at any point in Turbine's
processing chain.
> I'd understood that the query string, as received from the remote
> browser, must contain the action parameter to select the action; the docs
> suggest that the action is done before just about everything else and
> I hadn't considered that I could deflect it on the fly.
If you read through Turbine.java you can see the chain of events. It is
pretty well documented in there.
> In this particular case, though, I cannot have the browser agents
> change their URLs, I must accept the old URLs they are already using,
> and those URLs do not include the action parameter -- if I can make my
> tests of the form data and then slyly insert the correct Action before
> processing continues, this is a much better plan.
That will work just fine. You can also set things up so that you execute an
Action based on the incoming URI. This is very typical of other frameworks,
but personally, I feel that it is bad design in most cases. Yours is one of
the first cases that I have seen where it would be valid, although, I would
tend to want to use mod_rewrite to add the action/Foo to the request URI
instead.
> J> ... Generally, you can always come up with another solution
> J> to chaining two Screen Modules together that ends up being a
> J> cleaner design in the long run.
>
> Ok, I'll take your word for it ;)
:-)
-jon
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]