I just learned something that I'd like to make sure I understand. (mg
3.1)

If you use arguments.event.addResult("blah") anywhere in a controller
it appears that execution stops for that controller.  At least that's
the case if redirect="true" is set in the modelglue.xml results entry.

If this is correct I guess I'm wondering why.  My controller is
calling a model cfc that adds a record.  I then check for success.
Regardless of whether I succeed or fail I want to do a couple of other
things prior to return.  These don't fire.  I tested by putting in
cfabort immediately before and then after the addResult.  Before will
halt.  After gets ignored so addResult is definitely returning to
modelglue.xml and ignoring what comes after.

I guess I can just set a var or two with values based on success or
failure and then do addResult at the bottom but seems clumsy.

Am I looking at this the wrong way?

Thank you!

Irv Wilson


PS. I did find an entry several years old using older version of mg
where the poster was showing that entry order was important (set value
prior to set result) for the same reason.  It just seems odd.  Seems
cfreturn would return whatever result messages are set.  Having them
go back prematurely seems like a bug although I'm sure it's
intentional.   thx.



-- 
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