Hi Matt -

BuildURLToModule() is only available to framework-aware components. A
<call-method> command in a config XML file is almost always a call to
a service layer -- something that is (should be) outside of the
awareness of Mach-II or any other framework. You generally want your
service layer (mangers, DAOs, Gateways, and other service components)
to be framework-independent. As such, you normally wouldn't have any
of the Mach-II framework functions, like BuildURLToModule() in your
service layer.

In generating URLs in my model (for sending an email inside of an
emailService.cfc, for example), I generally just build the URL as
needed myself. You can abstract it by using #CGI.SCRIPT_NAME# instead
of server name, but you would have to match delimeters for modules and
URL parameters, if you're doing URL rewriting.

brian


On Sep 17, 12:06 am, Matt Riley <[email protected]> wrote:
> Hello again,
>
> I'm attempting to use BuildUrlToModule() in a cfc method that
> constructs the text for an email. That text has a URL back to the
> application. The method is called with <call-method>.
> BuildUrlToModule() is not available in the method and CF throws an
> error: Variable BUILDURLTOMODULE is undefined.
>
> I'm certain this issue has been solved already (or I'm missing
> something obvious) but a search of this group hasn't revealed the
> answer.
>
> Is there a way to pass this into my cfc or otherwise make this
> available to the method?
>
> Thanks again,
>
> Matt

-- 
You received this message because you are subscribed to Mach-II for CFML list.
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/mach-ii-for-coldfusion?hl=en

***New URLs as of April 29th, 2010***
SVN: http://svn.mach-ii.com/machii/
Wiki / Documentation / Tickets: http://trac.mach-ii.com/machii/

Reply via email to