I've been trying, unsuccessfully, to integrate calls to stored procedures
and views into my Model-Glue components. One of the things that I think
I'm falling short on is the Coldspring integration.
I added a method to the component VialMappingGateway named getFromView().
Now, of course, the component itself has an init() method with requires
the transfer.com.Transfer object passed in as an argument.
When I attempt to execute this code in my controller:
var x = createObject("component","charm.model.Vial.VialMappingGateway");
I'm immediately yelled at with:
When using named parameters to a function, every parameter must have a
name.<p>The CFML compiler was processing:<ul><li>an expression beginning
with "variables.transfer.get", on line 92, column 41.This message is
usually caused by a problem in the expressions structure.<li>a cfset tag
beginning on line 92, column 26.<li>a cfset tag beginning on line 92,
column 26.<li>a cfset tag beginning on line 92, column 26.</ul>
Even though I'm simply instantiating the VialMappingGateway component, I
obviously still need to pass in the Transfer object via the init() method.
So I tried this:
var x =
createObject("component","charm.model.Vial.VialMappingGateway").init(getModelGlue().getORMService().getTransfer());
It didn't like that either. So now I'm trying to figure out how I can use
ColdSpring to directly inject the Transfer object as a parameter when I
create a VialMappingGateway component.
<bean id="VialMappingGateway" class="charm.model.Vial.VialMappingGateway">
<constructor-arg name="transfer">
<bean id="transfer" factory-bean="transfer"
factory-method="getTransfer" />
</constructor-arg>
</bean>
Restarting my server, and still get the same result. So how can I call my
components and pass in the transfer object, mimicing the process that
Model Glue does automatically?
Thanks for any info or advice
Steve Brownlee
http://www.fusioncube.net/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Enterprise web applications, build robust, secure
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:289670
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4