mg2 to 3 and event.forward

4 views
Skip to first unread message

Andy

unread,
Jun 22, 2010, 5:47:34 AM6/22/10
to model-glue
I'm looking at the upgrade documentation at
http://docs.model-glue.com/wiki/UpgradingModelGlue/UpgradingFromModelGlue2#UpgradingFromModel-Glue2
and step 4 appears to be at odds with the code.

"4. The forward() method in EventContext.cfc preserves the state by
default in Model-Glue 3. The default in Model-Glue 2 was for forwards
to not preserve the event state. To have a forward not preserve the
event state in Model-Glue 3, set the third argument to false. If you
are not already passing a second argument, you can set it to "" (the
default)."

In the code for ModelGlue/unity/eventrequest/EventContext.cfc in the
forward function:

<cfargument name="stateful" type="boolean" required="false"
default="true" hint="A list of state values to append to the URL.">

In the code for ModelGlue/gesture/eventrequest/EventContext.cfc in the
forward function:

<cfargument name="preserveState" type="boolean" required="false"
default="false" hint="Preserve state across the redirect?" />

So it looks like MG3 doesn't preserve state by default, but MG2 did.
It's not what the upgrade documentation specifies. Can some please
confirm (or refute!) that the documentation is wrong.

Cheers,
Andy

Dennis Clark

unread,
Jun 22, 2010, 1:25:06 PM6/22/10
to model...@googlegroups.com
Andy, it looks like you're correct. I added that comment to the wiki because I got burned with the switch when I upgraded an application from MG2 to MG3. I guess was so frazzled by it at the time that I didn't notice that I was actually documenting it bass ackwards!

Thanks for the catch. I've corrected the wiki page.

-- Dennis
Reply all
Reply to author
Forward
0 new messages