On Feb 28, 2009, at 4:20 PM, Michal Charemza wrote:

Sorry about my stream of consciousness posting...

On 28 Feb 2009, at 12:36, Michal Charemza wrote:
So now I am stuck on how to get the data from the user that has
failed validation, so I can store it in the user object, so I can
show it again on the next request.

After reading various changelogs, it looks like there has been various
work into forbidding access to invalid data in action/views.

Yes, indeed. That's the point of validation. We deny access to the raw request data in pretty much all action/view methods for security reasons.

This
makes me think that something has to be done in the validation code to
allow invalid data to persist between requests.

Why? For what reason would you keep data that you know that it's invalid by your own rules?

I almost need data to be 'half validated'. That is, it must cause the
handle***Error action method to be called, but still allow invalid
data to be passed to the view.

Or am I just barking up the wrong tree? All I want is the standard
Post/Redirect/Get pattern...


- Post a form
- Redirect to a GET
- If there has been an error, show the form again, with the errors and
the previously submitted data.

You are barking up the wrong tree.  The proper way to do this is:

- POST a form
- if validation succeeds, process the data in your actions 'executeWrite' and then redirect - if validations fails or another error occured, don't redirect. Display the form with all the error messages.

No need to store the errors in a session or the like.

cheers

felix

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users

Reply via email to