One thing that may help you is the ability to create CFCs from an absolute
path.  A UDF to do that would look something like:

function makeCFC(path){
var proxy = createObject("java","coldfusion.runtime.TemplateProxyFactory");
var fileObject = createObject("java","java.io.File");
fileObject.init(arguments.path);
return proxy.resolveFile(getPageContext(), fileObject);
}

Of course, all the usual warnings apply about using undocumented
functionality as far as forwards compatibility (same goes for the code shown
for adding mappings, custom tag paths, etc.).

Also, keep in mind you can use relative paths in CFCs, but they have to be
relative "under" the current directory.  In other words, you can say
<cfcomponent extends="foo/bar"> (and yes, I agree it's a real bummer you
can't use a path like "../foo/bar").  Of course, that does not help you if
you have complex package design, but unfortunately without access to the CF
root and/or access to reliable mappings/custom tag paths, there are
compromises that must be made to get CFCs working reliably.  As someone
pointed out, one solution is to have all CFCs in your system in a single
package (or, at least, keep all CFCs that extend others in the same package
as the extended CFC), allowing you to refer to them by a single name, rather
than a path.






-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of
Lucian COZMA
Sent: Wednesday, May 26, 2004 4:48 AM
To: [EMAIL PROTECTED]
Subject: Re: [CFCDev] component extends object with relative path


Up until now everybody's got into a 'religious' battle over the utility of
CFC's. I don't want to get into that.
I agree that CFC's are a most usefull and cool thing.
I agree that you can use CFC's without the CFADMIN.
I agree with the fact that the Earth is round (well, almost).
But please, do pray-tell how do I work-around the issue of the relative
'extends'. What do I do ?
I just need a solution, a work-around, a solution for the problem. That is
if there is one.
I won't copy-paste again the problem, it's already in the list.

Lucian, still silly
----- Original Message -----
From: Raymond Camden
To: [EMAIL PROTECTED]
Sent: Wednesday, May 26, 2004 2:17 PM
Subject: RE: [CFCDev] component extends object with relative path


This is, without a doubt, one of the silliest things I've heard here. It is
absolutely untrue that Admin access is required to use CFC. Mappings can
greatly help your organization, but they are not required. Shoot, by your
logic, CF is completely useless because you can't use a database w/o having
access to the CF Admin (so as to add a datasource).

=======================================================================
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
Member of Team Macromedia

Email    : [EMAIL PROTECTED]
Blog     : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda





From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Lucian COZMA
Sent: Wednesday, May 26, 2004 1:45 AM
To: [EMAIL PROTECTED]
Subject: Re: [CFCDev] component extends object with relative path


The most annoying issue is that I'm distributing packaged software and I
cannot ask all my customers to register the cfc's paths in the admin.
They're all used to just copying the files in a ww folder on the server or
running a web-installer and that's it.
And besides, most of them don't even know or want to know about the admin.
Others just don't have acces. If you don't have acces to the admin you can't
uses CFC ?
Then they're just useless.

Lucian


cfczone.org

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to