Using Lift, I would like to display a notice to a user after they sign up with something like:
S.notice("Thank you for signing up")
Where would I put this code, or is there another way I should I go about this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should be able to put it anywhere in your code to be output on the current page. However, if your code handles the form submission and then redirects to a separate page – you would probably need something like this:
This will issue the redirect with state. The above executes the function after the redirect – causing the message to be displayed.
In the case of ProtoUser, there are a few places in the API (http://scala-tools.org/mvnsites/liftweb-2.4/#net.liftweb.mapper.MegaProtoUser) that seem like they would work:
or you could try calling (or overriding if you want it permanently) this method: