Announcement Announcement Module
No announcement yet.
noob: How to wire property with underlying Vector Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • noob: How to wire property with underlying Vector

    Pretty new to this... Using XML bean configuration and wiring a property that expect a Vector input. I have tried the list, but it seems the default implementation class is ArrayList. Is there anyway to indicate the implementation class; such as the class attribute that the bean element supports?

  • #2
    Hey dcook,

    Using the Spring 2.0 XML Schema-based configuration:

    <util:list id="myList" list-class="java.util.Vector">
    Otherwise, see the ListFactoryBean.setTargetListClass method (which can be set via injection, of course).

    -Arthur Loder


    • #3
      Thanks Arthur,

      I am limit here to production level software. Any info available on when 2.0 will graduate from RC status?



      • #4
        Duh, never mind. countdown is on home page


        • #5
          Still works in 1.2

          Hi Dennis,

          Even if you are restricted to Spring 1.2, you can use the targetListClass property of the ListFactoryBean class to set the actual List implementation you desire. The 2.0 XML schema-based approach is just a more succinct way of expressing the same concept.

          -Arthur Loder
          Last edited by Arthur Loder; Oct 2nd, 2006, 05:30 PM.


          • #6
            But wouldn't use of the ListFactoryBean.targetListClass approach change the implemenation class for all use of list element, where the 2.0 approach can be instance specific?

            I think I can wait for the 2.0 release