Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Urgent: Error setting list from bean defined in XML config.

  1. #11
    Join Date
    Aug 2004
    Location
    Toronto, Canada
    Posts
    736

    Default

    There's actually no reason Omar's original code sample shouldn't work either though. That's a valid way to define and set a list, with multiple values.
    Colin Sampaleanu
    SpringSource - http://www.springsource.com

  2. #12
    Join Date
    Sep 2004
    Posts
    25

    Default

    Hi

    The list in XML is an ArrayList and needed to be mapped to a Arraylist
    in the setter and getter methods.

    Many thanks,

    Aslam.

  3. #13
    Join Date
    Aug 2004
    Location
    Southampton, UK
    Posts
    826

    Default

    All,

    Just wanted to clarify this post. The code that Omar demonstrated as the first solution will function just fine. When you need a List on one of your beans, then define a property of type List and use the <list> element in the XML configuration. The actual implementation that Spring uses may change so you shouldn't rely on a particular type such as ArrayList.

    Rob

Similar Threads

  1. Order of Bean definitions matters?
    By cfuser in forum Container
    Replies: 2
    Last Post: Oct 21st, 2005, 10:29 AM
  2. Spring container fails with no exception
    By naor in forum Container
    Replies: 9
    Last Post: Oct 1st, 2005, 03:39 PM
  3. EHCaching Hibernate
    By dencamel in forum Data
    Replies: 3
    Last Post: Sep 6th, 2005, 09:03 PM
  4. could not satisfy dependencies
    By springuser in forum Container
    Replies: 4
    Last Post: Apr 26th, 2005, 01:15 PM
  5. Replies: 1
    Last Post: Apr 25th, 2005, 07:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •