Announcement Announcement Module
Collapse
No announcement yet.
Adding Integers etc to lists Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Adding Integers etc to lists

    Is there any better way of creating a list of integers than:

    Code:
    <list>
        <bean class="java.lang.Integer" constructor-arg="1" />
        <bean class="java.lang.Integer" constructor-arg="2" />
    </list>
    That's not too bad (and better than some of the other ways I thought of) but I thought I'd just check if there was a shortcut somewhere, such as:

    Code:
    <list>
        <value type="int">1</value>
    </list>

  • #2
    Code:
    <list>
        <value type="int">1</value>
    </list>
    Haven't tried it. But if the above one does not work, you my try this:

    Code:
    <list>
        <value type="java.lang.Integer">1</value>
    </list>
    The default CustomPropertyEditors should be able to cope with this.

    Regards,
    Andreas

    Comment


    • #3
      Wow!

      Good grief! I guess I should have tried my "preferred" syntax to start with - it seems to work just fine! Thanks for the encouragement to try it

      Is this documented anywhere? I spent a good half hour looking through the docs last night without finding it... I suspect I'm not the only one who would find it useful.

      Jon

      Comment

      Working...
      X