Thanks for the response Javier. I have specified the type converter. Conversion is done correctly from String->Collection. The problem is when the form is redisplayed, only the first value of the collection is displayed. This is down to the <stripes:text> tag getting first value and handing that off to the formatters to format, when what I think it should do is hand off the whole collection to the formatters where my custom CollectionFormatter would format appropriately into a single String.
M On 05/11/12 11:49 AM, Javier Domingo wrote: > You can specify which format type converter is meant to be used. That in > the action bean declaration. > > Hope that helps a little, > > Javier Domingo > > > 2012/5/10 Martin Walsh <martin.wa...@oracle.com > <mailto:martin.wa...@oracle.com>> > > 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 > <mailto:Stripes-users@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/stripes-users > > > > > ------------------------------------------------------------------------------ > 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 ------------------------------------------------------------------------------ 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