I feel confident that we're just doing something wrong, but here's what's going on anyway.
What we're trying to do is this:
http://trac.mach-ii.com/machii/wiki/FAQDynamicallyDisplayViewInFilter
Essentially, if some conditions pass, display a view component, then continue on with the rest of the view (footers, etc). Event handler:
<event-handler event="thresholdRequest.details" access="public">
{some event args}
<notify listener="thresholdRequestListener" method="getRequestInfo" resultArg="qryGetRequestInfo" />
<view-page name="header" />
<view-page name="pageTitle" />
<view-page name="thresholdApprove" />
<filter name="approvalFormFilter">
<parameter name="RMView" value="showApproveRM" />
<parameter name="DFAView" value="showApproveDFA" />
</filter>
<view-page name="pageFooter" />
<view-page name="footer" />
</event-handler>
And here's the text of the filterEvent() method (hints redacted):
<cffunction name="filterEvent" access="public" returntype="boolean" output="true">
<cfargument name="event" type="MachII.framework.Event" required="true" />
<cfargument name="eventContext" type="MachII.framework.EventContext" required="true" />
<cfargument name="paramArgs" type="struct" required="false" default="#structNew()#" />
<cfif {some conditions}>
<cfset arguments.eventContext.displayView(event = arguments.event, viewName = arguments.paramArgs["RMView"]) />
<cfelseif {some other conditions}>
<cfset arguments.eventContext.displayView(event = arguments.event, viewName = arguments.paramArgs["DFAView"]) />
</cfif>
<cfreturn true />
</cffunction>
What I expect to have happen if {some conditions} or {some other conditions} add up to true is that either RMView or DFAView is displayed, and then the pageFooter and Footer views are displayed afterward. If {some conditions} and {some other conditions} return false, then we'd just see pageFooter and Footer. However, what we're observing is that when one of those conditions is true, the optional view component is displayed and then the event stops processing -- pageFooter and Footer are not touched.
Are we doing something wrong here?
Thanks,
Joe