You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Stefan Burkard <sb...@previon.ch> on 2004/02/15 18:22:16 UTC
woody/flowscript and URI-problem
hi there
i've got a problem with the combination of woody/flowscript and URIs. i
followed the registration-example in the cocoon-wiki that uses woody and
flowscript. that runs perfectly.
as i changed this example step by step to my needs, i arrived with this
problem:
i'm putting the locale for i18n in the URI of all requests, for example
"/en/woodyform.xml" that runs also fine to build the form.
but when i submit the form i use the construct
"#{$continuation/id}.continue" as the form-action. the complete request
is then "en/[id].continue" and i have a sitemap-entry that matches
this post with "*/*.continue" and i pass the pure id with <map:call
continuation="{2}"/> but this ends with the error "Resource Not Found".
to test that the sitemap really calls this code, i changed the value of
the continuation like this <map:call continuation="{1}/{2}"/> and i get
- correctly - an error, so it runs the correct code in the sitemap
finally my question: isn't it possible to submit the continuation-id
with any other information in the URI? if i switch back all my files to
a URI without locale everythings ok again!
thanks and greetings
stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: woody/flowscript and URI-problem
Posted by Bruno Dumon <br...@outerthought.org>.
On Sun, 2004-02-15 at 18:22, Stefan Burkard wrote:
> hi there
>
> i've got a problem with the combination of woody/flowscript and URIs. i
> followed the registration-example in the cocoon-wiki that uses woody and
> flowscript. that runs perfectly.
>
> as i changed this example step by step to my needs, i arrived with this
> problem:
> i'm putting the locale for i18n in the URI of all requests, for example
> "/en/woodyform.xml" that runs also fine to build the form.
>
> but when i submit the form i use the construct
> "#{$continuation/id}.continue" as the form-action. the complete request
> is then "en/[id].continue" and i have a sitemap-entry that matches
> this post with "*/*.continue" and i pass the pure id with <map:call
> continuation="{2}"/> but this ends with the error "Resource Not Found".
>
> to test that the sitemap really calls this code, i changed the value of
> the continuation like this <map:call continuation="{1}/{2}"/> and i get
> - correctly - an error, so it runs the correct code in the sitemap
>
> finally my question: isn't it possible to submit the continuation-id
> with any other information in the URI?
Nope, that should work just fine.
The problem I usually run into is that my URL path gets longer each
request, i.e. the form is initially displayed on this URL:
/x/y/en/form
and with each form submit, the URL gets a bit longer:
/x/y/en/en/2332.continue
/x/y/en/en/en/54343.continue
Therefore I usually put an absolute URL in the form action.
However, since you're sure the code inside that matcher gets executed,
it's probably something else.
--
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org bruno@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: woody/flowscript and URI-problem
Posted by Bruno Dumon <br...@outerthought.org>.
On Mon, 2004-02-16 at 16:12, Jan Hoskens wrote:
> > If you're following an "as long as it works its fine" attitude, yes. The
> > fact that resources should be identified by URL's is basic web
> > architecture though.
>
> What are you referring to with 'basic web architecture'? Is there anyting
> more I should know?
> (Just trying to learn a bit ;-)
Haven't read the document myself yet, but this should provide a good
intro:
http://www.w3.org/TR/webarch/
The part below "2. Identification" is certainly relevant here.
Quote: "A URI must be assigned to a resource in order for agents to be
able to refer to the resource.", which is IMO a pretty good reason to
give your resources URI's.
For example, to go back to the flowscript-case, if I put the
continuation ID in the URL, I could throw the URL in my chat client, you
can click on it and continue the flow where I left it (assuming all
authentication is OK).
Also relevant here is the whole ReST story, I remember Paul Prescod had
some good intro articles on that on xml.com.
--
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org bruno@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: woody/flowscript and URI-problem
Posted by Jan Hoskens <jh...@schaubroeck.be>.
> If you're following an "as long as it works its fine" attitude, yes. The
> fact that resources should be identified by URL's is basic web
> architecture though.
What are you referring to with 'basic web architecture'? Is there anyting
more I should know?
(Just trying to learn a bit ;-)
Kind Regards,
Jan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: woody/flowscript and URI-problem
Posted by Bruno Dumon <br...@outerthought.org>.
On Mon, 2004-02-16 at 15:47, Jan Hoskens wrote:
> > I prefer to see the the continuation ID's in the URL. I see the
> > continuations as resources existing on the server (temporary resources
> > then), and a resource should be addressed by an URL.
> >
> > The URL-structure I'm currently using is as follows. Suppose the thing
> > we're editing is an "order", then I would have the following URL's:
> >
> > /orders/<order-id> : displays the order
> > /orders/<order-id>/edit : start the flow for editing
> > /orders/<order-id>/edit/<continuation-id> : continue the editing flow
> > /orders/new : creates a new order
> > (flow then continues at /orders/new/edit/...)
> > /orders : display list of all orders
> >
> > the paths can of course be prefixed by whatever you like (like an
> > application and language identifying part).
> >
> > Note that I don't use (and don't need to use) the ".continue" part after
> > the continuation-id.
> >
>
> Well it's just a matter of taste, isn't it? As long as you pass your
> continuation-id and catch it at the right place in your sitemap, there won't
> be any problem.
If you're following an "as long as it works its fine" attitude, yes. The
fact that resources should be identified by URL's is basic web
architecture though.
--
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org bruno@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: woody/flowscript and URI-problem
Posted by Jan Hoskens <jh...@schaubroeck.be>.
> I prefer to see the the continuation ID's in the URL. I see the
> continuations as resources existing on the server (temporary resources
> then), and a resource should be addressed by an URL.
>
> The URL-structure I'm currently using is as follows. Suppose the thing
> we're editing is an "order", then I would have the following URL's:
>
> /orders/<order-id> : displays the order
> /orders/<order-id>/edit : start the flow for editing
> /orders/<order-id>/edit/<continuation-id> : continue the editing flow
> /orders/new : creates a new order
> (flow then continues at /orders/new/edit/...)
> /orders : display list of all orders
>
> the paths can of course be prefixed by whatever you like (like an
> application and language identifying part).
>
> Note that I don't use (and don't need to use) the ".continue" part after
> the continuation-id.
>
Well it's just a matter of taste, isn't it? As long as you pass your
continuation-id and catch it at the right place in your sitemap, there won't
be any problem.
Bye,
Jan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: woody/flowscript and URI-problem
Posted by Bruno Dumon <br...@outerthought.org>.
On Mon, 2004-02-16 at 08:12, Jan Hoskens wrote:
> > to test that the sitemap really calls this code, i changed the value of
> > the continuation like this <map:call continuation="{1}/{2}"/> and i get
> > - correctly - an error, so it runs the correct code in the sitemap
> >
> > finally my question: isn't it possible to submit the continuation-id
> > with any other information in the URI? if i switch back all my files to
> > a URI without locale everythings ok again!
>
> I use flowscript with my continuation id in a hidden request field. My uri
> is whatever I like, just something to recognize the uri so I know when I
> have to check the requestparameter and call the continuation (sometthing
> like edit.continue).
I prefer to see the the continuation ID's in the URL. I see the
continuations as resources existing on the server (temporary resources
then), and a resource should be addressed by an URL.
The URL-structure I'm currently using is as follows. Suppose the thing
we're editing is an "order", then I would have the following URL's:
/orders/<order-id> : displays the order
/orders/<order-id>/edit : start the flow for editing
/orders/<order-id>/edit/<continuation-id> : continue the editing flow
/orders/new : creates a new order
(flow then continues at /orders/new/edit/...)
/orders : display list of all orders
the paths can of course be prefixed by whatever you like (like an
application and language identifying part).
Note that I don't use (and don't need to use) the ".continue" part after
the continuation-id.
--
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org bruno@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: woody/flowscript and URI-problem
Posted by Jan Hoskens <jh...@schaubroeck.be>.
> to test that the sitemap really calls this code, i changed the value of
> the continuation like this <map:call continuation="{1}/{2}"/> and i get
> - correctly - an error, so it runs the correct code in the sitemap
>
> finally my question: isn't it possible to submit the continuation-id
> with any other information in the URI? if i switch back all my files to
> a URI without locale everythings ok again!
I use flowscript with my continuation id in a hidden request field. My uri
is whatever I like, just something to recognize the uri so I know when I
have to check the requestparameter and call the continuation (sometthing
like edit.continue). Is this what you mean? I don't see why you're getting
your error, it should work if the {2} is your continuationid, maybe a little
more information would help.
Greetings Jan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org