We're updating the issue view to help you get more done. 

options-collection doesn't use in label the item if empty

Description

In an option collection, you can specify the value and the label, which will be used to create the <option value="value">label</option>.

So if you want to use a field of each item, is good, but if you try to let the item be used as label and value, by not specifying it:

<stripes:options-collection collection="${actionBean.seasons}"/>
In my case will output:
<select name="event.season">
<option value="2011 - Verano">org.lmb97.data.Seasons@468c4a4f</option>
</select>

Which is nearly correct, value is set using the custom formatter for Seasons class. But the value and the label should be the same.

Neither if you specify value, and let the other use the Class formatter:

<stripes:options-collection collection="${actionBean.seasons}" value="id" />
Which outputs:
<select name="event.season">
<option selected="selected" value="1">org.lmb97.data.Seasons@36088e42</option>
</select>

The label isn't what it should be, as label should be using the Formatter and not toString().

Environment

None

Status

Assignee

Rick G

Reporter

Tester

None

Components

Fix versions

Affects versions

Release 1.5.6

Priority

Major