Ticket #298 (new defect)

Opened 19 years ago

Last modified 14 years ago

preserveState="false" doesn't work for implicit results

Reported by: RichardDavies Owned by: somebody
Priority: normal Milestone: 2.0.x-next-patch
Version: 2.0.304 Severity: normal
Keywords: Cc:

Description

Using the preserveState="false" attribute in an implicit result tag doesn't clear the viewstate. For example:

<result do="someEvent" redirect="true" preserveState="false" />

If the result element has a name attribute, then it will correctly clear the viewstate when it redirects to the new event handler. But the viewstate isn't cleared for implicit results with no name attribute.

The problem is in modelglue/unity/framework/modelglue.cfc line 391:

<cfset eventContext.forward(mapping[j].event, mapping[j].append) />

eventContext.forward() isn't passing the optional stateful argument so it's defaulting to true, irregardless of the result's preserveState attribute.

If this is not a bug, then the documentation needs updated to reflect the fact that preserveState doesn't work for implicit results. But I don't see why this would actually be a "feature" and not a bug...

Change History

Changed 16 years ago by DanWilson

  • version set to 2.0
  • milestone set to 2.0.x-next-patch

Changed 16 years ago by RichardDavies

Wow! I submitted a simple bug and even included a patch to fix it and it only took two years to get it acknowledged... ;-) I'm glad someone is finally on the ball. Thanks Dan!

Note: See TracTickets for help on using tickets.