-
1. Re: Best Practices in New User Registration
danielc.roth Apr 16, 2008 3:01 PM (in response to vk101)You could try to validate the fields you'd like on every single page (s:validate per input rather than s:validateAll on form). Then, after the last page, persist the user. Propagate the conversation over the pages in the registration process.
-
2. Re: Best Practices in New User Registration
vk101 Apr 16, 2008 3:16 PM (in response to vk101)Oh, I think I may have misinterpreted how validation works.
The documentation says it
validates a JSF input field against the bound property using Hibernate Validator
- but when does this happen?Does validation occur everytime a submit occurs on that form field, or only when the entity is persisted?
Also, if I understand correctly - defining validator annotations on the entity's properties alone does nothing - ONLY when s:validate or s:validateAll is associated with an input that's associated with that property does validation occur?
-
3. Re: Best Practices in New User Registration
andygibson.contact.andygibson.net Apr 16, 2008 6:30 PM (in response to vk101)I think you should be OK since the validation occurs on a per page basis, so if you have fields 1-5 on one page and fields 6-10 on another page, the only validation that will take place on the first page is fields 1-5 so you don't have to worry about fields 6-10 being blank until you try submitting the second page.
Just make sure that you have the flush mode set to manual so it doesn't try to persist the user when you go from page 1 to page 2 since that will raise errors if the not null constraints are also present in the database.
Cheers,
Andy