how about below would this allow me to call any method from common.cfc using 
the user service bean.

<beans>
        <bean id="coldboxFactory" class="coldbox.system.extras.ColdboxFactory" 
/>
        <bean id="ConfigBean" factory-bean="ColdboxFactory" 
factory-method="getConfigBean" />
        <bean id="dsnBean" factory-bean="ColdboxFactory" 
factory-method="getDatasource">
                <constructor-arg name="alias">
                <value>DBDetails</value>
                </constructor-arg>
        </bean>
    

<bean id="userGateway" class="model.Common">
        <property name="dsnBean">
                <ref bean="dsnBean" />
        </property>
</bean>

        <bean id="UserService" class="model.UserService" />
</beans>





userservice.cfc

<cfcomponent name="User Service">
        
        <cffunction name="init" access="public" returntype="any" 
hint="Constructor.">
                <cfreturn this />
        </cffunction>
        
    
    
<cffunction name="setUserGateway" access="public" returntype="void" 
output="false" hint="Set the UserGateway.">                       <cfargument 
name="userGateway" type="any" required="true" hint="UserGateway" />             
   
 <cfset variables.instance['userGateway'] = arguments.userGateway />
</cffunction> 

<cffunction name="getUserGateway" access="public" returntype="any" 
output="false" hint="Return the UserGateway.">
                <cfreturn variables.instance['userGateway'] />
</cffunction> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324910
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