Spring 2.5 | Quick Singn - In page on the website header.
Joined: Jun 24, 2008
Just need some assistance from you guys with handling login functionality on our eStore. Here's what is required:
1) We already have a sign in module up and running as a separate view. However, we need to provide a ;Sign In' link on the header of the store (available on all pages), clicking on this link will open a small window which will ask of user credentials.
2) I plan on having a hidden <div> block in the header element that contains the signin form. We'll enable this <div> on the 'Sign In' link click.
Here's what I have tried so far:
1) The link for 'Sign In' on the header maps to a page called 'sign-in.ep., that is handled by a controller. In this controller, in the formBackingObject() method, I return the formbean. Something similar to the following:
The Mapping File:
2) I've created a separate file that renders the Sign In form for now. Here's teh controller definition:
3) Now, the problem here is that I need to access the formbean returned from the controller in the header and NOT in the file 'quickSignIn'. Wondering if there is a way I can achieve this getting the formbean in teh header element so that the Login form can be seen across all pages (via the header)?
Also, your login is in a different view as of now. Why not take that <form> that is in the other view and just paste it in your website header? It should be the same functionality. Or am I missing something?
Thanks for your repky Mark. Yes, I am using spring security.
I tried copy pasting my form tags in the header, which is included in every page.
Now, what happens is that when I open the home page, the signin controller hanot been called yet and my header element
expects a valid form bean to bind values to., which apparently is not there.
Moreover, i was wondering what should be defined as the 'nextview'
in my signin controller since I want the user to stay on the same page on the signin link click
and open the signin form in the hidden div tags insde my header element.