[jifty-devel] Continuations with URL query parameters

Sean E. Millichamp sean at bruenor.org
Sun Dec 10 18:29:14 EST 2006


I have the following use of continuations and parameters in templates:

/host/index.html:
...
<% Jifty->web->tangent( url => "/host/detail", label => "Detail",
	parameters => { hostid => $host->id } ) %>
...

/host/detail:
<%args>
$hostid
</%args>
...
<% Jifty->web->tangent( url => "/host/createnetwork", 
	label => "Add" ) %>
...

/host/createnetwork:
...
<% Jifty->web->return( submit => $action ) %>
...

I go to the URL: http://localhost:8888/host/index.html
Then I click on "Detail", which ends up being a link to something like: 
http://localhost:8888/host/?J:CREATE=1;J:PATH=/host/detail?hostid=2
The detail page shows fine.  Then I click on the "Add" link which does a
tangent to /host/createnetwork.  When it returns I get sent back
to /host/detail, but hostid=2 is no longer passed in to <%args> and I
get a Mason error of "no value sent for required parameter 'hostid'".

My question is: how can I do this (pass simple state through) and have
continuations preserve it?  I thought 'tangent' was supposed to do that,
but it doesn't seem to preserve URL query parameters.  Is that a bug or
am I just going about this the wrong way?

Sean




More information about the jifty-devel mailing list