Announcement Announcement Module
Collapse
No announcement yet.
Question about util:map and util:list Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Question about util:map and util:list

    Is it possible to set the value of a property element in a Spring XML file to a member of a util:list or util:map?

  • #2
    Are you having a problem with this? Is it possible to see what you are doing?

    Comment


    • #3
      Let me know if this blog post helps. I needed a configurable hashmap set via spring config to setup static data.

      Comment


      • #4
        Originally posted by infinity2heaven View Post
        Let me know if this blog post helps. I needed a configurable hashmap set via spring config to setup static data.
        Thanks for the reply, but I don't have a problem configuring a map in XML. My question was whether, in a Spring XML file, another bean can access an element from a XML-configured collection (map, list, etc.). For example, take the following XML-configured map:

        <util:map id="hotkeys">
        <entry key="cardholder" value="CTRL+SHIFT+c" />
        <entry key="caller" value="CTRL+ALT+c" />
        ...
        </util:map>

        Can you then assign one of the entries to the value of a property element in another XML-configured bean?

        Comment


        • #5
          Yes you can, otherwise there wouldn't really be anything you could do with them.

          Comment


          • #6
            Originally posted by karldmoore View Post
            Yes you can, otherwise there wouldn't really be anything you could do with them.
            Thanks for your reply. Would you tell me how to do it or provide a link to where the way to do so is described?

            Comment

            Working...
            X