I would like to require an initial set of request parameters that get passed into a pageflow. Depending on whether those parameters are valid, I'd like to redirect to an error page. Ideally, I'd like to map those parameters to a model and use annotations to define the validation rules. Does anyone have any advice on the cleanest way of doing this?
The three biggest questions in my head are:
1) how do I map the initial set of parameters to a model because I can't use the h:inputText at this point?
2) if I were to get it in a model how could I manually run the validation rules on the model within a decision node?
3) is it even possible to start a flow with a decision? All of the examples I have seen begin with a start-page.
These questions admittedly imply a very specific approach to the problem. I am open to any other suggestions that would provide the same result.
Thanks in advance,
1) Use Seam page parameters
2) Try using Validators.instance().....
3) No, but you can do the validation in a Seam page action, and if the validation succeeds, begin the pageflow
Note that I have never tried to do this, but I believe that the above will work.