I know this may be slightly OTT, but i try and write my apps such that
changing a setting in the MG config should not break anything. so i do...
<cfset myevent = event.getValue(event.getValue("eventValue"),
"some.default") />
imho, there should probably be a shorthand for this in EventContext.cfc -
getEventValue() perhaps?
Chris
2008/11/13 Scott Stroz <[EMAIL PROTECTED]>
> All form and URL variables are available in the event as 'values'. You can
> access these variables by using arguments.event.getValue(). This method
> accepts 2 arguments 1) the name of the variable you wish to get (required)
> and 2) the value to use if the name specified does nto exist in the event
> (optional). If you call getValue() for a variable that does not exist, it
> returns an empty string.
>
> So you would do the following:
>
> <cfset urlVar = arguments.event.getValue("action") />
>
> or if you want to use a default value:
>
> <cfset urlVar = arguments.event.getValue("action", "go.drugstore") />
>
> On Thu, Nov 13, 2008 at 9:16 AM, Wally Kolcz <[EMAIL PROTECTED]> wrote:
>
>>
>> What is the way to grab the URL variable in the controller. Lets say I
>> have index.cfm?action=go.home and I want to use the 'go.home' in my
>> controller. how can I set that to a local variable? <cfset urlVar
>> = ?? />
>>
>> Thanks.
>>
>>
>>
>
>
> --
> Scott Stroz
>
> If you can't laugh at other people, who can you laugh at?
>
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
For more about Model-Glue, check http://www.model-glue.com .
-~----------~----~----~----~------~----~------~--~---