On Tue, Apr 1, 2008 at 5:04 AM, Mikko Lipasti &lt;<a href="mailto:mikko.lipasti@polarcom.fi">mikko.lipasti@polarcom.fi</a>&gt; wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">&gt; Yes it does. What would be the best way to do 2.5? Can I submit an action using a link, other than masquerading form submission using $button-&gt;as_link.<br>
&gt;<br>
&gt; Perhaps serializing the action submission into GET args would work but I don&#39;t know how to do that..<br>
<br>
</div>Ideas, anyone?</blockquote><div><br>(Mikko, sorry for answering late. I&#39;m not sure I was the best authority and I&#39;ve been looking for a/starting a new job since the beginning of March.)<br><br>First, I want to answer the question and then I want ask it again in a new context.<br>
</div></div><br>The answer is pretty straightforward, to send an action with a request, you just need to submit the action again. For example:<br><br>Jifty-&gt;web-&gt;link(<br>&nbsp;&nbsp;&nbsp; label =&gt; &#39;View Details&#39;,<br>&nbsp;&nbsp;&nbsp; url =&gt; &#39;/search_and_detail&#39;,<br>
&nbsp;&nbsp;&nbsp; submit =&gt; Jifty-&gt;web-&gt;request-&gt;action(&#39;search-results&#39;),<br>);<br><br>Any action that has been processed for the current request can be submitted again and will be processed with the next request again. To perform the intermediate jump, you can call tangent() from within a before rule of the dispatcher.<br>
<br>before &#39;search_and_detail&#39; =&gt; run {<br>&nbsp;&nbsp;&nbsp; tangent(&#39;detail&#39;);<br>};<br>on &#39;detail&#39; =&gt; run { ... };<br><br>You can get the gist of all this from Jifty::Manual::Continuations. (I&#39;m mostly quoting that since I have not directly tested it recently, so if I&#39;m wrong, then this has changed.)<br>
<br>Now, my question is this: how do you do the same thing from within an onclick handler that replaces a region? <br><br>I haven&#39;t figured out the right combination for saving a continuation containing an action within the webservices call. I&#39;m going through and tracing out where continuations are saved and called out of requests as generalized in the flow chart shown in Jifty::Manual::Continuations to learn how this works in detail, but if someone can give me a hint in the meantime, that&#39;d be great.<br>
<br>Cheers,<br>Sterling<br><br>P.S. Look for me at the Grant Street Group booth at YAPC::NA. I won&#39;t be making it in person :( , but I&#39;m the poster child for their push to hire telecommuting Perl hackers.<br>