Announcement Announcement Module
Collapse
No announcement yet.
Binding empty strings to map elements in a command object Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Binding empty strings to map elements in a command object

    Hi,

    I am using the Spring 2.0 form tag library to output a grid of input text boxes. Each box is bound to a Map key in the command object. The page is rendered with input tags like the following:

    <input id="sppMap['baleag'].f['juv']" name="sppMap['baleag'].f['juv']" type="text" value=""/>

    Is there any way to prevent these empty strings from being placed into the hashmap in the command object? Can I somehow tell the data binder to ignore PropertyValues with empty strings? I've registered the StringTrimmerPropertyEditor but the setAsText() doens't seem to be called unless the string is not empty!

    Thanks
Working...
X