Ticket #298 (new defect)
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...
![(please configure the [header_logo] section in trac.ini)](/ModelGlue.com/trac.cgi/chrome/site/your_project_logo.png)