The AbstractValidator approach is fine, or you can do it the shorter
way the Igor showed.
Either way, when the page that has the username is submitted, you're
going to have to write that record to the database, even if you don't
have all the info. The way you wrote the question, I presume you are
collecting info on multiple pages. First page gets username et al, then
next > as in a wizard page.
When you check the username and it's not in use, write the record.
The table should have audit columns that include record_status and
last_mod_datetime. Initially write the record with status "I" (in process)
and when the user is finished registering, update it with "A" (active).
If the user fills out page 1 and then closes the browser you'll have a
record there with status "I". You'll need a job that fires off periodically
(I do it once a day at 2 or 3am) that finds those records that are more
than, say, 24 hours old, and purges them.
Then, to quote a sith, there is no conflict.
-hth
Thanks for your suggestion. Currently, I only have a single user input
page. But as the application evolves, I may eventually need to have a wizard
and implement the "record_status" check process as you suggested to make
sure that the database is always consistent.
--
View this message in context:
http://www.nabble.com/User-name-validation---how-to-check-database-to-find-if-a-name-has--already-been-taken--tp25614625p25682624.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]