Announcement Announcement Module
Collapse
No announcement yet.
how to change map entry key type ? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to change map entry key type ?

    Is there way to change a key type from the default String to something else, when defined in:

    <map>
    <entry>
    <key>


    .....

    I need to use Integer wrapper class.

    Any clues ?

  • #2
    Originally posted by matt_koss
    Is there way to change a key type from the default String to something else, when defined in:

    <map>
    <entry>
    <key>
    I need to use Integer wrapper class.

    Any clues ?
    Can you not specify type="java.lang.Integer" on the key element? Not sure, just a guess

    Comment


    • #3
      Originally posted by yatesco
      Can you not specify type="java.lang.Integer" on the key element? Not sure, just a guess
      Do not think so. At least not in 1.2.5. Not sure if version 2.X will support this or what ?

      Comment


      • #4
        No idea then, sorry

        Comment


        • #5
          Spring 1.2.7 (and 1.2.6 I think) allow the type attribute (obviously Spring 2.x has this feature also.

          Comment


          • #6
            Originally posted by costin
            Spring 1.2.7 (and 1.2.6 I think) allow the type attribute (obviously Spring 2.x has this feature also.
            Hold on, are you talking about type of the value, or type of the key ?
            There is a type attrtibute in the value tag, but I am not sure about the key.
            At least dtd does not seem to have it.

            Comment


            • #7
              Hava a look here.

              Since 1.2 that feature exists. As of the DTD: The key element can have an embedded value which in turn can have a type attribute.

              Regards,
              Andreas

              Comment


              • #8
                Originally posted by Andreas Senft
                Hava a look here.

                Since 1.2 that feature exists. As of the DTD: The key element can have an embedded value which in turn can have a type attribute.

                Regards,
                Andreas
                Just what I need ! Thanks.

                Comment

                Working...
                X