Greetings,
I have the following in a WATask: MyWATask>>go self call: RedirectThing new. self halt. The component RedirectThing does a browser redirect with code like this: RedirectThing>>updateRoot: anHtmlRoot anHtmlRoot meta redirectAfter: 2 to: self redirectUrl I do get to the redirected page but control never gets transferred back to the "self halt" in MyWATask>>go. Is there some way to call #answer: from RedirectThing so that control goes back to MyWATask>>go and still getting the redirect to work? Thanks, Frank _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hi Frank,
You only get back to the control flow following #call: when you send an #answer: in a callback. If you do not want that, you can also use #show: instead of #call: (see http://book.seaside.st/book/components/calling/show-answer) Maybe you should explain a bit more on what you are doing. It seems a little strange to me to call a component to do a redirect. Maybe we can help a bit more. Johan On 03 Jul 2012, at 04:18, squeakman wrote: > Greetings, > > I have the following in a WATask: > > MyWATask>>go > self call: RedirectThing new. > self halt. > > The component RedirectThing does a browser redirect with code like this: > > RedirectThing>>updateRoot: anHtmlRoot > > anHtmlRoot meta redirectAfter: 2 to: self redirectUrl > > I do get to the redirected page but control never gets transferred back to the "self halt" in MyWATask>>go. > > Is there some way to call #answer: from RedirectThing so that control goes back to MyWATask>>go and still getting the redirect to work? > > Thanks, > Frank > > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
On 05/07/2012 3:40 AM, Johan Brichau wrote:
> Maybe you should explain a bit more on what you are doing. It seems a little strange to me to call a component to do a redirect. > Maybe we can help a bit more. > I am trying to use PayPal. PayPal has the following flow: 1. Call PayPal to start a payment - PayPal returns a token which is to be used in the next step. 2. From within the same web browser as in Step 1, redirect the web browser to a new PayPal url. I have this sequence implemented in MyWATask which looks like: MyWATask>>go | payPalToken | payPalToken := self call: PayPalStep1. self call:( PayPalStep2 new token: payPalToken). self halt. PayPalStep2>>updateRoot: anHtmlRoot anHtmlRoot meta redirectAfter: 2 to: 'http://www.somePlaceElse.com' What I want to happen is to have PayPalStep2 do do the redirect and then somehow do an #answer: so that control can go back to MyWaTask>>go and hopefully execute the "self halt". I hope this explanation sheds some light on what I am trying to do. Thanks for you hints on using show: I will experiment with that. Regards, Frank _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
At 02:30 06/07/2012, squeakman wrote:
>What I want to happen is to have PayPalStep2 do do the redirect and >then somehow do an #answer: so that control can go back to >MyWaTask>>go and hopefully execute the "self halt". Frank, I'd suggest having a look at: SqueakTwitterAPI >> twitterCallback The package is: 'Twitter-Squeak' Hoping this helps, Reza _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
On 06/07/2012 12:18 AM, Reza Razavi wrote:
> I'd suggest having a look at: > > SqueakTwitterAPI >> twitterCallback > > The package is: 'Twitter-Squeak' This was a huge help, pretty much exactly what I was looking for, a big thanks. Frank _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
At 14:35 07/07/2012, squeakman wrote:
>On 06/07/2012 12:18 AM, Reza Razavi wrote: > >>I'd suggest having a look at: >> >>SqueakTwitterAPI >> twitterCallback >> >>The package is: 'Twitter-Squeak' > >This was a huge help, pretty much exactly what I was looking for, a >big thanks. Thanks for your feedback Frank! This piece of code addresses indeed smartly a quite complex problem, while providing a framework for addressing other similar ones. Reza http://linkedin.com/in/razavi _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |