-
1. Re: Block page access
phantasmo Aug 1, 2009 8:39 PM (in response to murilobr)If I understood you correctly, your problem isn't really Seam related.
Anyway, you can ensure the email field isn't empty with a simple validator.
If you need more info on validators, check out this link. -
2. Re: Block page access
murilobr Aug 3, 2009 1:55 PM (in response to murilobr)It can't solve my problem because I want to prevent that users access directly the page.
For example, if the user put on the browser the http://localhost:8080/MyApp/register.seam, I need to redirect him to http://localhost:8080/MyApp/home.seam, if the email attribute of a bean wasn't filled.Can anyone help me???
-
3. Re: Block page access
phantasmo Aug 3, 2009 2:09 PM (in response to murilobr)Sorry then, I didn't get you right the first time.
I guess you can create a page action for that page and make it check for the presence of email and redirect if needed.
There could be a more elegant solution though... Hopefully someone will add something... -
4. Re: Block page access
cash1981 Aug 3, 2009 2:11 PM (in response to murilobr)Well I guess you could execute an action on the home.page.xml where you check if the email is entered, and if it is not, then you can throw an exception, and in pages.xml you declare a catch on that exception and redirect to back to login for instance.
You can also check out this blog. It is very useful, and is a little similar to your usecase.
-
5. Re: Block page access
murilobr Aug 3, 2009 3:26 PM (in response to murilobr)It's solved!! I did exactly Shervin Asgari said me.
Thanks Shervin Asgari and Bojan Tomic.