AJAXCFC two .cfc Files?

View: New views
6 Messages — Rating Filter:   Alert me  

AJAXCFC two .cfc Files?

by Benedikt L. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello all,

does somebody know if you can include two .cfc Files with functions in AJAXCFC?

I tried it in many ways, but all fails.

Regards,
Bene

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: http://www.houseoffusion.com/groups/Ajax/message.cfm/messageid:5468
Subscription: http://www.houseoffusion.com/groups/Ajax/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.47

Re: AJAXCFC two .cfc Files?

by Christopher Jordan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I don't understand what you're asking. Can you be more specific? Maybe
include some code or pseudo-code?

Thanks,
Chris

On Mon, Sep 1, 2008 at 6:38 AM, Benedikt L. <info@...> wrote:

> Hello all,
>
> does somebody know if you can include two .cfc Files with functions in
> AJAXCFC?
>
> I tried it in many ways, but all fails.
>
> Regards,
> Bene
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: http://www.houseoffusion.com/groups/Ajax/message.cfm/messageid:5469
Subscription: http://www.houseoffusion.com/groups/Ajax/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.47

Re: AJAXCFC two .cfc Files?

by Benedikt L. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've got one .cfm-File with the code including two .cfc-Files like this:

<script language="javascript">
        _ajaxConfig = { '_cfscriptLocation':'CFC/index.cfc','_jsscriptFolder':'../../ajaxCFC/core/js','debug':false};
ajaxConfig = { '_cfscriptLocation':'CFC/index.cfc','_jsscriptFolder':'../../ajaxCFC/core/js','debug':false};
</script>

>I don't understand what you're asking. Can you be more specific? Maybe
>include some code or pseudo-code?
>
>Thanks,
>Chris
>
>
>
>>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: http://www.houseoffusion.com/groups/Ajax/message.cfm/messageid:5470
Subscription: http://www.houseoffusion.com/groups/Ajax/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.47

Re: AJAXCFC two .cfc Files?

by Benedikt L. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Chris,

i want to include two .cfc-Files in one .cfm-File to run Queries with AJAX(Javascript)

Something like this:

<script language="javascript">
        _ajaxConfig = { '_cfscriptLocation':'CFC/index.cfc',
                                                                        '_jsscriptFolder':'../../ajaxCFC/core/js',
                                                                        'debug':false};
        _ajaxConfig2 = {'_cfscriptLocation':'CFC/index2.cfc',
                                                                        '_jsscriptFolder':'../../ajaxCFC/core/js',
                                                                        'debug':false};

 DWREngine._execute( _ajaxConfig._cfscriptLocation,
                                                                                        null,
                                                                                        'load',
                                                                                        g_iProjectError_ID,
                                                                                        loadCallback);
</script>



Now I want to run Functions in both files. But when I include the second .cfc file like this, it doesn't work. I can't run scripts which are written in the second included File. How can i do this?

>I don't understand what you're asking. Can you be more specific? Maybe
>include some code or pseudo-code?
>
>Thanks,
>Chris
>
>
>
>>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: http://www.houseoffusion.com/groups/Ajax/message.cfm/messageid:5471
Subscription: http://www.houseoffusion.com/groups/Ajax/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.47

Re: AJAXCFC two .cfc Files?

by Benedikt L. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sorry... i sent this post before i was finished xD

        DWREngine._execute( _ajaxConfig._cfscriptLocation,
                                null,
                                'load',
                                g_iProjectError_ID,
                                loadCallback);

And the load function is written in the Second-File.. So AJAX can't find the function because it doesn't know this function/file.

The way above to include a second .cfc-File which I can use with AJAX doesn't work.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: http://www.houseoffusion.com/groups/Ajax/message.cfm/messageid:5472
Subscription: http://www.houseoffusion.com/groups/Ajax/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.47

Re: AJAXCFC two .cfc Files?

by Christopher Jordan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Oh! I see... you're using the version of AjaxCFC that uses the DWREngine...
I'm afraid I'm not very familiar with that one. I dropped it as soon as Rob
ported it to use jQuery.

In the jQuery version of AjaxCFC what you're trying to do is much, much,
much simpiler. Mainly, the reason is because you don't include any specific
CFC file. You just include the main ajaxcfc file, and then you make your
ajax call you tell it which cfc you want to use and which method in that cfc
you want to use.

Beyond that I'm thinking that the answer would be something like writing a
facade cfm file (not even sure I'm using that term right) that you include
which would then call your individual cfc files. I realise that's probably
not too much help.

If you're not married to using the DWREngine stuff, and want further
explaination of how to get things up and running with jQuery, and the jQuery
version of AjaxCFC (which is SUPER-DUPER simple) lemme know. I can help lots
more.

Chris


On Tue, Sep 2, 2008 at 1:26 AM, Benedikt L. <info@...> wrote:

> Sorry... i sent this post before i was finished xD
>
>        DWREngine._execute(     _ajaxConfig._cfscriptLocation,
>                                null,
>                                'load',
>                                g_iProjectError_ID,
>                                loadCallback);
>
> And the load function is written in the Second-File.. So AJAX can't find
> the function because it doesn't know this function/file.
>
> The way above to include a second .cfc-File which I can use with AJAX
> doesn't work.
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: http://www.houseoffusion.com/groups/Ajax/message.cfm/messageid:5473
Subscription: http://www.houseoffusion.com/groups/Ajax/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.47