Handler with URL var

4 views
Skip to first unread message

DFGrumpy

unread,
Mar 5, 2011, 12:35:24 PM3/5/11
to cfb-extensions-dev
I am trying to do this but apparently builder doesn't like it that
much. I am building extensions with a bunch of menu options. I don't
want to have to create a cfm handler file for each item. Adding a url
var to the hander would allow me to have only a single cfm file. The
ideeventinfo doesn't give any info as to what menu item was selected.
Anyone know of another way to do this?



<handler id="insHeader" type="cfm" filename="insCode.cfm?test=1" />



Thanks,

--Dave

Raymond Camden

unread,
Mar 7, 2011, 10:33:55 AM3/7/11
to cfb-exten...@googlegroups.com
I do not believe it is possible. What you could possibly do is using
something like this:

<handler id="a" type="cfm" filename="a.cfm" />
<handler id="b" type="cfm" filename="b.cfm" />

And in both files simply have them do a include to core.cfm. core.cfm
could look at cgi.sciprt_name to tell how it was run.

OR - if you can assume CF8, I believe you can use onMissingFile in
App.cfc and simply run core.cfm and sniff what was originally
requested.

I haven't tested this - but now I'm tempted too. :)

--
===========================================================================
Raymond Camden, ColdFusion Jedi Master

Email    : r...@camdenfamily.com
Blog      : www.coldfusionjedi.com
AOL IM : cfjedimaster

Keep up to date with Android news: http://www.androidgator.com

Dave Ferguson

unread,
Mar 7, 2011, 10:46:52 AM3/7/11
to cfb-exten...@googlegroups.com
Thanks for the response. I am looking into a bunch of things to make
this easier. I do like the onMissingFile idea. The extension I am
building currently has over 20 cfm files that are all identical except
for a single line. At this rate it will have over 50 by the time I am
done. This is driving me nuts.

There has got to be a better way to do this.


====================
= Dave Ferguson
====================
= http://blog.dkferguson.com
= http://www.cfhour.com
= http://twitter.com/dfgrumpy
= Adobe Community Professional
====================

Raymond Camden

unread,
Mar 7, 2011, 10:56:20 AM3/7/11
to cfb-exten...@googlegroups.com
The more I think about it, the more I think onMissingFIle would be
perfect. I'm going to do a proof of concept and blog it later today -
but with Mardi Gras season it may be delayed. ;) If you get it working
quicker, do you mind me blogging it anyway? :)

Dave Ferguson

unread,
Mar 7, 2011, 11:04:41 AM3/7/11
to cfb-exten...@googlegroups.com
No go right ahead... I am going to try it later myself. It does seem
like a viable alternative.

====================
= Dave Ferguson
====================
= http://blog.dkferguson.com
= http://www.cfhour.com
= http://twitter.com/dfgrumpy
= Adobe Community Professional
====================

Raymond Camden

unread,
Mar 7, 2011, 4:03:56 PM3/7/11
to cfb-exten...@googlegroups.com
Tested - worked great - gonna blog before I leave for my first parade. ;)

Raymond Camden

unread,
Mar 7, 2011, 4:17:00 PM3/7/11
to cfb-extensions-dev
http://www.coldfusionjedi.com/index.cfm/2011/3/7/ColdFusion-Builder-extensions--Assigning-multiple-handlers-to-one-file

On Mar 7, 3:03 pm, Raymond Camden <rcam...@gmail.com> wrote:
> Tested - worked great - gonna blog before I leave for my first parade. ;)
>
>
>
> On Mon, Mar 7, 2011 at 10:04 AM, Dave Ferguson <dav...@dkferguson.com> wrote:
> > No go right ahead...  I am going to try it later myself.  It does seem
> > like a viable alternative.
>
> > ====================
> > = Dave Ferguson
> > ====================
> > =http://blog.dkferguson.com
> > =http://www.cfhour.com
> > =http://twitter.com/dfgrumpy
> > = Adobe Community Professional
> > ====================
>
> > On Mon, Mar 7, 2011 at 7:56 AM, Raymond Camden <rcam...@gmail.com> wrote:
> >> The more I think about it, the more I think onMissingFIle would be
> >> perfect. I'm going to do a proof of concept and blog it later today -
> >> but with Mardi Gras season it may be delayed. ;) If you get it working
> >> quicker, do you mind me blogging it anyway? :)
>
> >> On Mon, Mar 7, 2011 at 9:46 AM, Dave Ferguson <dav...@dkferguson.com> wrote:
> >>> Thanks for the response.  I am looking into a bunch of things to make
> >>> this easier.  I do like the onMissingFile idea.  The extension I am
> >>> building currently has over 20 cfm files that are all identical except
> >>> for a single line.  At this rate it will have over 50 by the time I am
> >>> done.  This is driving me nuts.
>
> >>> There has got to be a better way to do this.
>
> >>> ====================
> >>> = Dave Ferguson
> >>> ====================
> >>> =http://blog.dkferguson.com
> >>> =http://www.cfhour.com
> >>> =http://twitter.com/dfgrumpy
> >>> = Adobe Community Professional
> >>> ====================
>

Dave Ferguson

unread,
Mar 12, 2011, 10:56:10 AM3/12/11
to cfb-extensions-dev
I used Ray's suggestion to build this extension http://jqmobilehelper.riaforge.org/

Take a look at the source to see it implemented.

--Dave

Reply all
Reply to author
Forward
0 new messages