When you say you "get the same result", what does that mean? The named
parameters error? Where is this error being thrown? Does VialMappingGateway
extend another component? Do you have a setter for VialMappingGateway in
your controller that ColdSpring can use to perform the dependency injection?

I think you might be trying to do too many things at once here, because the
problem could be anywhere: in your Model-Glue controller, in your use of
ColdSpring, in your use of Transfer, or in your Gateway. You might consider
creating a simple test case that starts with one thing and works up: i.e.
create a simple test CFC and instantiate it. Then set up an empty Gateway
and instantiate it. Then set up a simple Transfer XML file and make sure it
works and that you can call getTransfer(). Then set up ColdSpring to create
the Gateway and inject the Transfer object into it.  Then set up ColdSpring
to inject your Gateway into the test CFC and try to use it. etc. Hopefully
somewhere in that process you'll figure out what you're doing wrong.


On 9/27/07, Steve Brownlee <[EMAIL PROTECTED]> wrote:
>
> 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/
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade to ColdFusion 8 and integrate with Adobe Flex
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:289681
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to