So I create my RemoteService.cfc in the application root directory and
Extend the ModelGlue.gesture.remoting.AbstractRemotingService
component and that's pretty much all I have to do right?
When I execute a call to it via URL at say mydomain.com/
RemotingService.cfc?method=executeEvent&eventname=goal.metertest I get
the following error:
Variable TEMPLATE is undefined.
The error occurred in D:\www\xyz\classes\frameworks\ModelGlue_3\gesture
\remoting\AbstractRemotingService.cfc: line 11
9 : <cfset request._modelglue.bootstrap.blockEvent = 1 />
10 :
11 : <cfmodule template="#template#" />
And following the call from the AbstractRemotingService executeEvent()
method it calls getModelGlue() - which looks for some 'template'
variable which I have no idea where that would come from.
Any help?
I'd love to try this out before I scamper back to using CS to expose
things.
Thanks
<cfset template = "../../../../../application/index.cfm">
Since the ModelGlue Directory is located in a subdirectory maybe it's
getting confused - or do you have to explicitly set it?
Directory Structure is:
trunk
application (where index.cfm and RemotingService.cfc live)
classes
frameworks
modelGlue_3
gesture
remoting (where AbstractRemotingService.cfc lives)
The Model-Glue application template includes a RemotingService.cfc
file that you can drop into your application, and there is a line in
this file which sets the "template" variable that you are missing. In
case you don't happen to have the application template handy, I've
pasted a copy of RemotingService.cfc here:
http://modelglue.pastebin.com/m5b2a310d
Note that you will need to change line 6:
<cfset template = "/modelglueapplicationtemplate/index.cfm" />
This path needs to resolve to your application's index.cfm file, so
for example, if you are hitting the app at
http://localhost/myapp/index.cfm, then this line should be:
<cfset template = "/myapp/index.cfm" />
That should get you up and running, but be sure to report back if you
encounter further problems.
--
Ezra Parker
> --
> 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 model...@googlegroups.com
> To unsubscribe from this group, send email to
> model-glue+...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/model-glue?hl=en
>
Yes we have a mapping as the entire app works -
So it sounds like what I did in my RemotingService.cfc is the norm
then.
I checked for that file in the repo we have and didn't find it - but
I'll certainly check out the link above -
This is the file as it ended up being:
<cfcomponent displayname="Remoting Service"
extends="ModelGlue.gesture.remoting.AbstractRemotingService"
output="false" hint="generic remoting service to extend mg abstract
remoting service">
<cfset template = "../../../../../application/index.cfm">
</cfcomponent>
Excellent thanks!
It ensures that CF debugging is suppressed to prevent it from breaking
remoting calls, and actually includes the executeEvent() method (which
just turns around and calls super.executeEvent()) in order to work
around a bug with <cfajaxproxy>.
--
Ezra Parker
On Feb 3, 9:21 pm, Ezra Parker <e...@cfgrok.com> wrote:
> There are also a couple of other wrinkles to the RemotingService file
> in addition to setting the template variable, so you may want to go
> ahead and grab a copy of application template version if either of
> these issues matters to you:
>
> It ensures that CF debugging is suppressed to prevent it from breaking
> remoting calls, and actually includes the executeEvent() method (which
> just turns around and calls super.executeEvent()) in order to work
> around a bug with <cfajaxproxy>.
>
> --
> Ezra Parker
>