On Monday 10 Mar 2008, Roland Mai wrote:
> Hi,
>
> I have a SimpleConfig bean in config/Coldspring.xml
>
>   <bean id="RoutingCodesForLeterTypes" class="
> ModelGlue.Bean.CommonBeans.SimpleConfig">
>     <property name="Config">
>       <map>
>         <entry key="a"><value>b</value></entry>
>       </map>
>     </property>
>   </bean>
>
>
> and I would like to access this from within a gateway which I am
> auto-wiring in controllers using:
>   <bean id="lettersGateway" factory-bean="ormService"
> factory-method="createGateway">
>     <constructor-arg name="objectAlias">
>         <value>LetterReport</value>
>         </constructor-arg>
>   </bean>
>
>
> I don't seem to know how to access the config bean from this gateway. I
> tried adding setRoutingCodesForLeterTypes in the gateway, but as expected
> didn't work.

It should have done, I think, with a 'autowire="byName"' in the bean def.

If not, how about adding it as an explictly property:
  <bean id="lettersGateway" factory-bean="ormService"
factory-method="createGateway">
    <constructor-arg name="objectAlias">
        <value>LetterReport</value>
        </constructor-arg>
    <property name="code"><ref bean="RoutingCodesForLetterTypes"/></property>
  </bean>
?
-- 
Tom Chiverton
Helping to heterogeneously incentivize ubiquitous methodologies
on: http://thefalken.livejournal.com

****************************************************

This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office. Any reference 
to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  
Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 2500.

For more information about Halliwells LLP visit www.halliwells.com.


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[EMAIL PROTECTED]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to