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

                 Key: STS-876
                 URL: http://www.stripesframework.org/jira/browse/STS-876
             Project: Stripes
          Issue Type: Bug
          Components: Tag Library
    Affects Versions: Release 1.5.6
            Reporter: Javier Domingo


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().

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
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-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to