<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 18, 2017 at 4:01 PM, Mariano Martinez Peck <span dir="ltr"><<a href="mailto:marianopeck@gmail.com" target="_blank">marianopeck@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="gmail-">On Tue, Jul 18, 2017 at 1:09 PM, 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-m_3070719145129349516gmail-">On Tue, Jul 18, 2017 at 4:02 PM, Mariano Martinez Peck<br>
<<a href="mailto:marianopeck@gmail.com" target="_blank">marianopeck@gmail.com</a>> wrote:<br>
> Hi guys,<br>
><br>
> Ley's say I have a root component registered in /registration which takes<br>
> care of user registration. Inside a callback of a button ('Register') I want<br>
> to redirect to /reps (my real app prefix) which is associated to a different<br>
> root task which renders the welcome/login window from which you enter to the<br>
> app.<br>
><br>
> What I want is to "auto-login" after register. So I need to make a redirect<br>
> from /registration to /reps but auto-getting a session for that root task<br>
> etc. I guess the way to do this is to simulate getting a session and make<br>
> the redirect  to /reps_s=...<br>
><br>
> Any ideas?<br>
<br>
</span>Maybe you can take some ideas from WARestfulComponentFilter >><br>
#startSessionWithRoot: you can use #rootComponent: switch the root<br>
component.<br>
<br></blockquote><div><br></div></span><div>Hi Philippe,</div><div><br></div><div>Thanks, that did work nicely. The only thing that took me some time to figure out is HOW to build the methods with the pragmas. There was no subclass of the filter as an example. I had to search lot in mailing lists until I come up with a working method example. I ended doing something like this:</div><div><br></div><div><div>userRegistration</div><div><span style="white-space:pre-wrap">        </span><get></div><div><span style="white-space:pre-wrap">      </span><path: '/registration'></div><div><span style="white-space:pre-wrap">    </span>self startSessionWithRoot: MyComponent new.</div></div><div><br></div></div></div></div></blockquote><div><br></div><div><br></div><div>BTW... how can I allow something like this:</div><div><br></div><div><path: '/companyreport/{ticker}/{reportName}'><br></div><div> </div><div>I then somehow I would like to parse the URL inside the method so that I answer the correct response based on the URL ...</div><div><br></div><div>Any idea?</div><div><br></div><div>Thanks,</div><div><br></div><div><br></div></div>-- <br><div class="gmail_signature">Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br></div>
</div></div>