David,

I was a little puzzled by the line, in the override of def homePage,
of loginReferer.remove(). This actually resets the homePage to "/".
Removing the line has the intended result. But, then I need a way
to reset the loginReferer session variable.

Better still, it would be nice to be able to create additional
stateful
parameter maps, something like Seam's conversation state, which
would make creation of wizards a breeze.

This brings up another point. The only way I trust to trace the code
to determine what's going on is the old-fashioned way, of putting in
a bunch of println statements in my code. With lift's flow back-and-
forth
between templates, which are really client-side, and snippets, which
are on the server, normal java debugging tools just doesn't work.

This makes developing a slow process and can even offset the gains
lift brings to coding efficiency.

What do you, and other's use for debugging that might help.

Thanks in advance for your assistance.

Glenn...


On May 15, 3:35 pm, David Pollak <feeder.of.the.be...@gmail.com>
wrote:
> In your User object, do the following:
>
> object loginReferer extends SessionVar("/")
>
> override def homePage = {
>   var ret = loginReferer
>   loginReferer.remove()
>   ret
>
> }
>
> override def login = {
>   for (r <- S.referer if loginReferer.is == "/") loginReferer.set(r)
>   super.login
>
> }
>
> So, we're setting up a session variable the keeps track of the referer to
> the login page.
>
> We define the homePage method to return this page, but reset after use.
>
> And we override the login method to record the referer.
>
>
>
> On Fri, May 15, 2009 at 3:11 PM, glenn <gl...@exmbly.com> wrote:
>
> > I'm using ProtoUser. But even so, I thought that I might have to
> > create a
> > bunch of separate login pages, each using the loginXhtml form so that
> > action={S.uri} would generate the links to match with the cases. In
> > that
> > way I could do the redirection. But that seems convoluted, to me.
>
> > This goes back to using EarlyAccess on a menu item, redirecting to the
> > appropriate
> > login page, and then once the user logs in, he is immediately taken to
> > a new page
> > rather than back to "/index". Really, what I'm trying to do is create
> > a wizard widget
> > or sorts, to perform a sequence of tasks with a finish button on the
> > last page.
>
> > Glenn...
>
> > On May 15, 2:43 pm, David Pollak <feeder.of.the.be...@gmail.com>
> > wrote:
> > > On your login page, you can capture the referer and then redirect to the
> > > refering page on successful login.
>
> > > Are you using ProtoUser or are you rolling your own login page?
>
> > > On Fri, May 15, 2009 at 1:27 PM, glenn <gl...@exmbly.com> wrote:
>
> > > > If I wanted to redirect the user to a different page, depending on
> > > > what page they were on when they initiated a login,
> > > > does anyone know of a good solution?
>
> > > > I'm thinking I need to use a DispatchLocSnippets and define different
> > > > dispatch case functions. But I'm not clear how best to go about it?
> > > > Would I need different login pages for each case, or is there a
> > > > cleaner way in which I can use a single login page for job?
>
> > > > Glenn...
>
> > > --
> > > Lift, the simply functional web frameworkhttp://liftweb.net
> > > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > > Follow me:http://twitter.com/dpp
> > > Git some:http://github.com/dpp
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Beginning Scalahttp://www.apress.com/book/view/1430219890
> Follow me:http://twitter.com/dpp
> Git some:http://github.com/dpp

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to