-
1. Re: Validation in Restful mode
gavin.king May 28, 2007 2:12 PM (in response to blackers)Currently Seam has no validation for page parameters, but I agree that it would be a very-nice-to-have, and easy to implement. So my question really is: exactly what should actually *happen* when page parameter validation fails?? It's not like we can redisplay the form with error messages ;-)
Options:
* set validation.succeeded to false (allowing you to skip the page action) and add the validation messages to the page?
* add the validation messages to the page and then redirect to some view-id defined in pages.xml?
* throw an exception that you can handle in pages.xml?
I can see good arguments for each one...
Please create an issue in JIRA for this, and let's kick off discussion in this thread - I really don't know what is the best option.... -
2. Re: Validation in Restful mode
blackers May 28, 2007 8:48 PM (in response to blackers)The way I would like to use this feature would be option 1. I have a page living on a separate site that would have its form posting to my seam page. If the validation fails it would be nice to add the validation messages to the page where the form can be fixed up and submitted again from within my site. However I can see merits in the other options and it would be interesting to see what others think.