Cavan Vannice
05/26/2022, 6:25 PMNeither the method getDocumentCustomer was found in component models.reports.sales nor was there any default method with this name present in any of the implementing interface.
bdw429s
05/26/2022, 6:25 PMCavan Vannice
05/26/2022, 6:30 PMcoldfusion.runtime.TemplateProxy$InvalidMethodNameException( Neither the method getDocumentCustomer was found in component models.reports.sales nor was there any default method with this name present in any of the implementing interface.
at coldfusion.runtime.TemplateProxy.throwInvalidMethodNameException(TemplateProxy.java:1277)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:962)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:696)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:503)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4254)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4217)
at cfsales2ecfc759538788$funcUTILITIES.runFunction(/app/handlers/sales.cfc:700)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:623)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:516)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:463)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:438)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:681)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:980)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:762)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4165)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4129)
at coldfusion.runtime.CFPage.invoke(CFPage.java:16847)
at cfController2ecfc102072789$funcINVOKER.runFunction(/app/coldbox/system/web/Controller.cfc:1200)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:623)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:516)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:463)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:438)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:681)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:4909)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:4890)
at cfController2ecfc102072789$func_RUNEVENT.runFunction(/app/coldbox/system/web/Controller.cfc:954)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:623)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:516)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:463)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:438)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:681)
bdw429s
05/26/2022, 6:31 PMmodels.reports.sales
?Cavan Vannice
05/26/2022, 6:31 PMbdw429s
05/26/2022, 6:31 PMCavan Vannice
05/26/2022, 6:31 PMbdw429s
05/26/2022, 6:31 PMbdw429s
05/26/2022, 6:32 PMCorrect, salesCFC should be models.salesOk, so the error message is basically irrelevant then, right? If the wrong CFC is getting injected, let's back up and troubleshoot that, not a downstream error that comes from having the wrong CFC.
bdw429s
05/26/2022, 6:32 PMCavan Vannice
05/26/2022, 6:33 PMCavan Vannice
05/26/2022, 6:33 PMproperty name="salesCFC" inject="sales";
This should pull in models.salesbdw429s
05/26/2022, 6:33 PMbdw429s
05/26/2022, 6:34 PMCavan Vannice
05/26/2022, 6:34 PMbdw429s
05/26/2022, 6:34 PMbdw429s
05/26/2022, 6:34 PMbdw429s
05/26/2022, 6:34 PMCavan Vannice
05/26/2022, 6:34 PMbdw429s
05/26/2022, 6:34 PMsales
files you wantbdw429s
05/26/2022, 6:35 PMbdw429s
05/26/2022, 6:35 PMbdw429s
05/26/2022, 6:36 PMCavan Vannice
05/26/2022, 6:36 PMbdw429s
05/26/2022, 6:36 PMCavan Vannice
05/26/2022, 6:38 PMbdw429s
05/26/2022, 6:39 PMmapDirectory( 'models' )
So a full list of all files is pulled and mapPath()
is called on each one of them. mapPath() uses the CFC name as the name of the mappingbdw429s
05/26/2022, 6:40 PMmodels/foo/bar/baz.cfc
creates a wirebox maping of baz
Cavan Vannice
05/26/2022, 6:40 PMbdw429s
05/26/2022, 6:40 PMmodels/baz.cfc
models/foo/baz.cfc
and
models/brad/wood/baz.cfc
bdw429s
05/26/2022, 6:42 PMCavan Vannice
05/26/2022, 6:43 PMCavan Vannice
05/26/2022, 6:43 PMbdw429s
05/26/2022, 6:43 PMCavan Vannice
05/26/2022, 6:44 PMbdw429s
05/26/2022, 6:46 PMconfigure()
method
map( 'myCustomSalesThingy' ).to( 'models.reports.whatever.sales' );
then you can inject
property name="salesCFC" inject="myCustomSalesThingy";
and you get the specific CFC you've asked for.Cavan Vannice
05/26/2022, 6:46 PMbdw429s
05/26/2022, 6:47 PMcomponent alias="myCustomSalesAlias" {
}
And then you inject
property name="salesCFC" inject="myCustomSalesAlias";
bdw429s
05/26/2022, 6:47 PMCavan Vannice
05/26/2022, 6:47 PMCavan Vannice
05/26/2022, 6:49 PMsales.reports
?Cavan Vannice
05/26/2022, 6:49 PMreports.sales
bdw429s
05/26/2022, 6:53 PMbdw429s
05/26/2022, 6:54 PMbdw429s
05/26/2022, 6:55 PMlogbox:logger:foo
and then WireBox goes and figures out what that points to. Most mappings just point to a CFC and most mapping names are the same as the CFC name by convention so the differentiation is sort of invisible at first.bdw429s
05/26/2022, 6:56 PMbdw429s
05/26/2022, 6:57 PMwirebox.getBinder().getMappings().keyArray()
and you see all the mapping names wirebox currently knows about (it can create new mappings on the fly too FWIW)Cavan Vannice
05/26/2022, 6:58 PMCavan Vannice
05/26/2022, 7:08 PMalias="sales"
to models\sales.cfc does not work. It is still trying to go to models\reports\sales.cfc. I'm going to try the wirebox config nextbdw429s
05/26/2022, 7:10 PMbdw429s
05/26/2022, 7:10 PMbdw429s
05/26/2022, 7:11 PMbdw429s
05/26/2022, 7:11 PMCavan Vannice
05/26/2022, 7:11 PMCavan Vannice
05/26/2022, 7:12 PM