Highlighted

cfobject en Application.cfc

New Here ,
May 04, 2020

Copy link to clipboard

Copied

necesita declarar cfobject en Application.cfc, pero me da el siguiente error:

apereirn_0-1588629714189.png

en Application.cfc defino de la siguiente forma:

<cfobject component="geti_des.proc.dominioAD" name="dominioAD">

Adobe Community Professional
Correct answer by BKBK | Adobe Community Professional

You should in fact move from Application.cfm to Application.cfc. In any case, that has nothing to do with the error.

 

Is the component path /geti_des/proc.dominioAD.cfc valid? Try the following:

 

<cfif fileExists(expandPath("/geti_des/proc/dominioAD.cfc"))>
    <cfinvoke component="geti_des.proc.dominioAD" method="consDominioAD" returnvariable="qDominioAD">
<cfelse>
Componente no encontrado en esta ruta.
</cfif>

 

Views

1.3K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

cfobject en Application.cfc

New Here ,
May 04, 2020

Copy link to clipboard

Copied

necesita declarar cfobject en Application.cfc, pero me da el siguiente error:

apereirn_0-1588629714189.png

en Application.cfc defino de la siguiente forma:

<cfobject component="geti_des.proc.dominioAD" name="dominioAD">

Adobe Community Professional
Correct answer by BKBK | Adobe Community Professional

You should in fact move from Application.cfm to Application.cfc. In any case, that has nothing to do with the error.

 

Is the component path /geti_des/proc.dominioAD.cfc valid? Try the following:

 

<cfif fileExists(expandPath("/geti_des/proc/dominioAD.cfc"))>
    <cfinvoke component="geti_des.proc.dominioAD" method="consDominioAD" returnvariable="qDominioAD">
<cfelse>
Componente no encontrado en esta ruta.
</cfif>

 

Views

1.3K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
May 04, 2020 0
LEGEND ,
May 05, 2020

Copy link to clipboard

Copied

I'm not allowed to delete this.  I keep coming up with questions, but then re-read your post and they get answered.

 

If the code you provided from within your application.cfc is as it currently exists, you're missing equal signs.  If not, I'm not sure what to do.

 

V/r,

 

^ _ ^

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 05, 2020 0
Adobe Community Professional ,
May 05, 2020

Copy link to clipboard

Copied

Apparently, you want the object dominioAD to be available throughout the application. Hence, across every request and every session and irrespective of the component path.

If so, then use:

 

<!--- In Application.cfc --->
<cfobject component="geti_des.proc.dominioAD" name="application.dominioAD">

<!--- On the CFM page --->
<cfinvoke component="#application.dominioAD#" method="consDominioAD" returnvariable="qDominioAD">

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 05, 2020 0
New Here ,
May 05, 2020

Copy link to clipboard

Copied

Gracias, hice la prueba de esa forma pero sigue dando el mismo error;
Si ese mismo código lo utilizo en un Application.cfm si me funciona

<cfobject component="geti_des.proc.dominioAD" name="dominioAD">

Y el llamado lo realizó de esta forma:

<cfinvoke component="#dominioAD#" method="consDominioAD" returnvariable="qDominioAD">

Pero lo que quiero es pasar todo a un Application.cfc

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 05, 2020 0
Adobe Community Professional ,
May 05, 2020

Copy link to clipboard

Copied

You should in fact move from Application.cfm to Application.cfc. In any case, that has nothing to do with the error.

 

Is the component path /geti_des/proc.dominioAD.cfc valid? Try the following:

 

<cfif fileExists(expandPath("/geti_des/proc/dominioAD.cfc"))>
    <cfinvoke component="geti_des.proc.dominioAD" method="consDominioAD" returnvariable="qDominioAD">
<cfelse>
Componente no encontrado en esta ruta.
</cfif>

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 05, 2020 0
apereirn LATEST
New Here ,
May 05, 2020

Copy link to clipboard

Copied

Según la validación, la ruta del componente si es válida 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 05, 2020 0