-
Nov 27th, 2008, 12:38 PM
#1
Login form on multiple pages
Hi,
I'd like to have a login form available on every page on the web site. I'm having troubles when configuring the SimpleFormController because formview & successview are not constant (I think so).
The first issue was a Exception raised when the form was displayed because the 'command' object was no initialized by the formBackingObject method and the form binding fails.
I resigned for direct data binding using a standard HTML form but when I try to dynamically assign the formview/successview in the controller logic, it's not really consistant and I get some errors.
I can't figure how achieve this facility and I feel it's a quite common subject that many site offer.
Any idea ?
-
Nov 28th, 2008, 09:20 AM
#2
[solved]
Hi,
I finally sorted this out by setting the sessionForm attribute to false to force to go by the formBackingObject method where I initialize the formview to the current page.
-
Dec 2nd, 2008, 02:20 AM
#3
Hi sylbal
Just a question because I will be in a similar situation soon
How did you "include" your login from on every page of your application? Are you using Tiles, JFS, Freemarker, "pure" JSPs, ...?
I imagine I could have a "link" to let's say "login.html" in a "template" that is used on every page and map "/login.html" to my login controller?
Something along these lines?
Rgds
guybrush
-
Dec 8th, 2008, 02:11 PM
#4
Hi there,
The login form is basically included as a jsp fragment in the main navigation bar. I don't know jsf but I assume it's possible. My little experience with Tiles, Freemarker or Velolicy just make me sure it's easy to do with these technologies. As far as I remember , Tiles would be the best choice as there's a 'Layout' approach where you could include your login form and present it on every pages but this technologiy is sometimes overkill for simple sites.
Hope this helps,
-sb
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules