<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 20, 2017 at 8:11 AM, Philippe Marschall <span dir="ltr"><<a href="mailto:philippe.marschall@gmail.com" target="_blank">philippe.marschall@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, Jul 18, 2017 at 9:01 PM, Mariano Martinez Peck<br>
<div><div class="h5"><<a href="mailto:marianopeck@gmail.com">marianopeck@gmail.com</a>> wrote:<br>
><br>
><br>
> On Tue, Jul 18, 2017 at 1:09 PM, Philippe Marschall<br>
> <<a href="mailto:philippe.marschall@gmail.com">philippe.marschall@gmail.com</a>> wrote:<br>
>><br>
>> On Tue, Jul 18, 2017 at 4:02 PM, Mariano Martinez Peck<br>
>> <<a href="mailto:marianopeck@gmail.com">marianopeck@gmail.com</a>> wrote:<br>
>> > Hi guys,<br>
>> ><br>
>> > Ley's say I have a root component registered in /registration which<br>
>> > takes<br>
>> > care of user registration. Inside a callback of a button ('Register') I<br>
>> > want<br>
>> > to redirect to /reps (my real app prefix) which is associated to a<br>
>> > different<br>
>> > root task which renders the welcome/login window from which you enter to<br>
>> > the<br>
>> > app.<br>
>> ><br>
>> > What I want is to "auto-login" after register. So I need to make a<br>
>> > redirect<br>
>> > from /registration to /reps but auto-getting a session for that root<br>
>> > task<br>
>> > etc. I guess the way to do this is to simulate getting a session and<br>
>> > make<br>
>> > the redirect  to /reps_s=...<br>
>> ><br>
>> > Any ideas?<br>
>><br>
>> Maybe you can take some ideas from WARestfulComponentFilter >><br>
>> #startSessionWithRoot: you can use #rootComponent: switch the root<br>
>> component.<br>
>><br>
><br>
> Hi Philippe,<br>
><br>
> Thanks, that did work nicely. The only thing that took me some time to<br>
> figure out is HOW to build the methods with the pragmas. There was no<br>
> subclass of the filter as an example. I had to search lot in mailing lists<br>
> until I come up with a working method example. I ended doing something like<br>
> this:<br>
><br>
> userRegistration<br>
> <get><br>
> <path: '/registration'><br>
> self startSessionWithRoot: MyComponent new.<br>
><br>
> If we can add that into the class comment it would be cool.<br>
<br>
</div></div>This is standard Seaside-REST for which quite some documentation is<br>
available [1] [2]. The only thing outdated is the loading but it seems<br>
as if you managed that part.<br>
<br>
 [1] <a href="https://github.com/SeasideSt/Seaside/wiki/Seaside-REST" rel="noreferrer" target="_blank">https://github.com/SeasideSt/<wbr>Seaside/wiki/Seaside-REST</a><br>
 [2] <a href="http://book.seaside.st/book/advanced/restful" rel="noreferrer" target="_blank">http://book.seaside.st/book/<wbr>advanced/restful</a><br>
<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div><br></div><div><br></div><div>Thanks Philippe I wasn't aware of that information. Very useful!</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
Cheers<br>
Philippe<br>
______________________________<wbr>_________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.<wbr>squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" rel="noreferrer" target="_blank">http://lists.squeakfoundation.<wbr>org/cgi-bin/mailman/listinfo/<wbr>seaside</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br></div>
</div></div>