I am having some issues related to the following bug:

http://www.stripesframework.org/jira/browse/STS-541


I am using BeanFirstPopulationStrategy with the OneToManyTypeConverter. 
  A form takes a comma separated list of values from a single text 
field, then converts and stores them in a Collection<String>.

The problem is that when displaying the field again, e.g. if a 
validation error occurs elsewhere in the form, only the first value is 
displayed.

This is due to the <stripes:text> tag calling getSingleOverrideValue() 
which basically just returns the first value in the collection, before 
attempting to format the value using the relevant formatter.

I have a custom CollectionFormatter that should format the collection 
into a comma separated string, but this is never called because by this 
stage the first value in the Collection is the value that needs to be 
formatted not the whole collection.

I want the text field to output the formatted collection, not just the 
first value.  I cant really think of a clean way to do this, or am I 
missing something?

Shouldn't Stripes try the formatters first to get a single String value, 
instead of taking it upon itself to just grab the first value out of the 
Collection/Array.  If not, at the very least some logging/doc should be 
put in to clearly indicate that values have been dropped.


M


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to