Hi Ray, It sounds like you have all your events in a single event-handlers block with a defaulttype set, but you don't want that defaulttype to be applied to one event.. is that about right?
In which case just specify an empty type attribute or move it to a second event-handlers block that doesn't specify the defaultype. There's a good example of this on the wiki - http://docs.model-glue.com/wiki/HowTos/HowToUseTypedEvents scroll down to the last code sample. Chris On 9 September 2010 17:10, Raymond Camden <[email protected]> wrote: > As a workaround, in my onRequestStart of my main controller, I sniff > for the event and if it is my index, I set the requestformat. Still > feels like a hack though. > > > On Thu, Sep 9, 2010 at 10:36 AM, Raymond Camden <[email protected]> wrote: > > My site uses frames, which means that every single event _except_ the > > home page event needs to use a template. I'm using an event type that > > handles security and templating. > > > > <event-type name="main"> > > <before> > > <broadcasts> > > <message name="requireMainAuth" /> > > <message name="requireDisclaimer" /> > > </broadcasts> > > <results> > > <result name="Bad" do="main.notauthorized" > redirect="true" /> > > <result name="Disclaimer" > do="main.disclaimer" redirect="true" /> > > <result do="template.main"/> > > </results> > > </before> > > </event-type> > > > > I could have used 2 result blocks here - one for the normal > > requestformat and one for a custom one called plain. However, I'd have > > to repeat the 2 lines (Bad, Disclaimer), so instead I simply modified > > my template type: > > > > > > <event-handler name="template.main" access="private" > > > <views format="html"> > > <include name="main" template="templates/main.cfm" > /> > > </views> > > </event-handler> > > > > So far so good. If I hit my site with the requestformat in the url it > works: > > > > http://mainline.dev/index.cfm?event=fq.index&requestformat=plain > > > > However, I don't want to have to provide the requestformat in the URL. > > So I went into the view, the same view that outputs the frames, and > > did: > > > > <cfset root = event.getValue("myself")> > > <cfset event.setValue("requestFormat", "plain")> > > > > But Model-Glue isn't noticing this. I'm assuming because it's already > > decided which views are going to be run. > > > > So any suggestions? fq.index runs after a login. Is there some other > > way I can tell MG to use a non-default requestFormat for this event > > w/o having to broadcast some event just to run the event.setValue in a > > controller? > > > > -- > > > =========================================================================== > > Raymond Camden, ColdFusion Jedi Master > > > > Email : [email protected] > > Blog : www.coldfusionjedi.com > > AOL IM : cfjedimaster > > > > Keep up to date with the community: http://www.coldfusionbloggers.org > > > > > > -- > =========================================================================== > Raymond Camden, ColdFusion Jedi Master > > Email : [email protected] > Blog : www.coldfusionjedi.com > AOL IM : cfjedimaster > > Keep up to date with the community: http://www.coldfusionbloggers.org > > -- > 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]<model-glue%[email protected]> > For more options, visit this group at > http://groups.google.com/group/model-glue?hl=en > -- 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
