So, right now I'm using Brian Kotek's Transfer Decorator Bean Injector
Observer from the following blog entry:

http://www.briankotek.com/blog/index.cfm/2008/1/14/My-Transfer-Decorator-Bean-Injector-Observer-Is-Now-Available#comments

I was originally on the newest version but I thought that was causing
my issue, but now I think not.  Anyway, I'm on the earlier version but
the same thing seems to happen in either.

Anyway.  I have the following code in my ColdSpring config:

<bean id="ormAdapter"
class="ModelGlue.unity.orm.transfer.TransferAdapter">
                <constructor-arg name="framework"><ref bean="ModelGlue" /></
constructor-arg>
        </bean>

        <bean id="transferFactory" class="transfer.transferFactory">
                <constructor-arg name="datasourcePath"><value>/config/transfer/
datasource.xml</value></constructor-arg>
                <constructor-arg name="configPath"><value>/config/transfer/
transfer.xml</value></constructor-arg>
                <constructor-arg name="definitionPath"><value>/model/transfer</
value></constructor-arg>
         </bean>

        <bean id="transfer" factory-bean="TransferFactory" factory-
method="getTransfer" />

        <bean id="TDOBeanInjectorObserver"
class="transfer.resources.TDOBeanInjectorObserver" lazy-init="true">
                <constructor-arg name="transfer"><ref bean="transfer" /></
constructor-arg>
        </bean>

        <bean id="DataSource" factory-bean="TransferFactory" factory-
method="getDatasource" />
        <bean id="ErrorCollection" class="utils.ErrorCollection" />

My goal is to utilize a custom Validate method in the decorator object
to place errors into my custom ErrorCollection which is injected into
the decorator.  The code to get this to work is in my generic
decorator cfc that all decorators extend:

<cfcomponent displayname="decorator"
extends="transfer.com.TransferDecorator">
        <cffunction name="setErrorCollection" access="public"
returnType="void" output="false">
                <cfargument name="ErrorCollection"
type="com.midwestrescue.utils.ErrorCollection" required="true">
                <cfset variables._ErrorCollection = arguments.ErrorCollection />
        </cffunction>

        <cffunction name="getErrorCollection" access="public"
returnType="com.midwestrescue.utils.ErrorCollection" output="false">
                <cfreturn variables._ErrorCollection />
        </cffunction>
</cfcomponent>

At this point each transfer object should have it's own error
collection that I can work with on forms and such.  The problem I'm
having is that it seems as if the ErrorCollection is not being created
or injected as a non-singleton.  If I submit a form I will get all my
errors back.  If I then hit a blank form in another window I see all
the original errors.  At this point I'm leaning toward the conclusion
that the ErrorCollection is not being injected as a non-singleton but
I guess it could be that my transfer object is being reused of cached
with the "singleton" ErrorCollection.  I'm not sure but I can't seem
to get this working the way I intend it to.

Has anyone done something similar or seen this issue?

Thanks for any ideas or directions you can help point me in!

John
--~--~---------~--~----~------------~-------~--~----~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
"transfer-dev" group.
To post to this group, send email to transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to