Simple example: A reset password form. If a matching email address is found
it redirects, via a result, to an event which displays a confirmation
message. If a matching email address is not found, it redisplays the form,
also via a result.  When that form is redisplayed, it seems to me that the
simplest logic to use to determine whether to display an error message to
the user would be to check whether the result that caused the form to be
redisplayed was added to the event.  But it doesn't seem like that info is
available. If I check event.getResults() I get an empty array, so I'm
assuming that the results are being cleared prior to displaying the form.

I know I have other options, such as:
1. Set a value into the event to indicate that no matching email address was
found.
2. Just check for the existence of the EmailAddress value in the event, as
it will only be present if the form was already submitted.

My feeling is that by adding a result to the event, I'm already providing
the metadata that I need to make the determination, so why should I have to
do #1, and I feel like #2 is indirect.

I am fully prepared to be proven absolutely wrong about this, as is often
the case when it comes to me and Model-Glue.

Cheers,
Bob

-- 
Bob Silverberg
www.silverwareconsulting.com

-- 
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog

You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en

Reply via email to