Hi, I have a bean definition file that has a bean that takes a list of items, so for example:
What happens is that I have a property (which is accessible to this bean file) that gets set, and if that property is true, I'd like to add the OptionalBean to the list, and if that property is false, I do not want to add that bean to the list. Is it possible to do something like this?Code:<bean id="MyBean" class="my.Class"> <constructor-arg index="0"> <list> <ref bean="RequiredBean"/> <ref bean="OptionalBean"/> </list> </constructor-arg> </bean>
Thanks,
Jeff


Reply With Quote