inplaceSelect calls converter getAsString method for labels
-----------------------------------------------------------

                 Key: RF-6922
                 URL: https://jira.jboss.org/jira/browse/RF-6922
             Project: RichFaces
          Issue Type: Bug
          Components: component
    Affects Versions: 3.3.0
            Reporter: Thomas W


inplaceSelect causes calls to the converter getAsString method for labels. The 
converter expects the to be converted object class and gets the label string, 
which has nothing to do with the mapping.

Converter should never be called in this code path for the label.

The 3 existing references to encodeSuggestion can be changed to pass the 
encoded value as parameter as appropriate instead of attempting to convert it 
within the method.

InplaceSelectBaseRenderer, line 97

        for (SelectItem selectItem : selectItems) {
            String value = getConvertedStringValue(context, inplaceSelect, 
selectItem.getValue());
            String label = selectItem.getLabel().trim();
            labels.add(label);
            encodeSuggestion(context, inplaceSelect, label, 
RICH_INPLACE_SELECT_CLASSES);

InputUtils.getConvertedStringValue(FacesContext, UIComponent, Object) line: 114 
InplaceSelectRenderer(ComboBoxBaseRenderer).getConvertedStringValue(FacesContext,
 UIComponent, Object) line: 131        
InplaceSelectRenderer(ComboBoxBaseRenderer).encodeSuggestion(FacesContext, 
UIComponent, Object, String) line: 138       
InplaceSelectRenderer(InplaceSelectBaseRenderer).encodeItems(FacesContext, 
UIComponent) line: 101       
InplaceSelectRenderer.doEncodeEnd(ResponseWriter, FacesContext, 
UIInplaceSelect, ComponentVariables) line: 612  


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues

Reply via email to