While Sean mentions the *right* way to build an app, if
model.util.VerityController was coded that way and I couldn't change
it, my cs xml file would look like:

<bean id="Verity" class="model.util.VerityController" singleton="true">
         <constructor-arg name="collection">
                 <value>${verityCollection}</value>
         </constructor-arg>
</bean>
<bean id="Constants" class="model.util.Collection" singleton="true">
         <constructor-arg name="values">
                 <map>
                         <entry key="verityCollection">
                                 <value>${verityCollection}</value>
                         </entry>
                 </map>
         </constructor-arg>
 </bean>

There's no reason to have your application constants hard-coded into
your xml file (but if you insist on doing it than you might as well do
it twice).

-Dave


On 4/21/06, Sean Corfield <[EMAIL PROTECTED]> wrote:
> Why not just inject the Constants bean into the Verity controller bean
> and let it call get("verityCollection") ?

Reply via email to