I did a override def homePage = "/all_users" and that's where I go after I log in.
On Thu, Dec 3, 2009 at 5:44 AM, Neil.Lv <anim...@gmail.com> wrote: > I added this code in the User model, but it doesn't work yet. > > This println method is never executed. > > Maybe some configuration need to be set ? > > ### > object User extends User with MetaMegaProtoUser[User] { > ... > override def loginFirst = If( > loggedIn_? _, > () => { > import net.liftweb.http.{RedirectWithState, RedirectState} > val uri = Full("/all_users") > println(" xxxxxxxxxxx ") > RedirectWithState( > loginPageURL, > RedirectState( ()=>{loginRedirect.set(uri)}) > ) > } > ) > ... > } > ### > > > Cheers, > Neil > > > On Dec 1, 8:15 am, David Pollak <feeder.of.the.be...@gmail.com> wrote: > > On Sun, Nov 29, 2009 at 12:17 AM, Neil.Lv <anim...@gmail.com> wrote: > > > Hi all, > > > > > I want to redirecto to a specify URL like this "/all_users" when > > > logged in successfully via the default link, > > >http://localhost:8080/user_mgt/login > > > > > Is there a help method (i dont't find it) to configure it? > > > > > When i logged in successfully via /user_mgt/login link and redirect > > > to the /all_users link not the /index page. > > > > In your User object (singleton): > > override def loginFirst = If( > > loggedIn_? _, > > () => { > > import net.liftweb.http.{RedirectWithState, RedirectState} > > val uri = "/all_users" > > RedirectWithState( > > loginPageURL, > > RedirectState( ()=>{loginRedirect.set(uri)}) > > ) > > } > > ) > > > > > > > > > > > > > Thanks for any help. > > > > > Cheers, > > > Neil > > > > > -- > > > > > You received this message because you are subscribed to the Google > Groups > > > "Lift" group. > > > To post to this group, send email to lift...@googlegroups.com. > > > To unsubscribe from this group, send email to > > > liftweb+unsubscr...@googlegroups.com<liftweb%2bunsubscr...@googlegroups.com> > <liftweb%2bunsubscr...@googlegroups.com<liftweb%252bunsubscr...@googlegroups.com> > > > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/liftweb?hl=en. > > > > -- > > Lift, the simply functional web frameworkhttp://liftweb.net > > Beginning Scalahttp://www.apress.com/book/view/1430219890 > > Follow me:http://twitter.com/dpp > > Surf the harmonics > > -- > > You received this message because you are subscribed to the Google Groups > "Lift" group. > To post to this group, send email to lift...@googlegroups.com. > To unsubscribe from this group, send email to > liftweb+unsubscr...@googlegroups.com<liftweb%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/liftweb?hl=en. > > > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@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.