[seam-issues] [JBoss JIRA] (JBSEAM-5136) EntityConverter should allow empty String

Marek Novotny (JIRA) issues at jboss.org
Fri Feb 28 16:45:47 EST 2014


Marek Novotny created JBSEAM-5136:
-------------------------------------

             Summary: EntityConverter should allow empty String
                 Key: JBSEAM-5136
                 URL: https://issues.jboss.org/browse/JBSEAM-5136
             Project: Seam 2
          Issue Type: Bug
          Components: JSF Integration
    Affects Versions: 2.2.1.CR2
         Environment: seam 2.2.1CR2, PrimeFaces
            Reporter: Cody Lerum
            Assignee: Marek Novotny
             Fix For: 2.2.1.CR3


When using the <s:convertEntity /> tag along with a component such as primefaces autocomplete the EntityConverter will throw a NumberFormatException when it is passed an empty string as JSF is prone to do.

<pf:autoComplete 
       id="fromUserAC" 
       value="#{emailTemplateData.fromUser}"
       widgetVar="fromUserAC" 
       forceSelection="true" 
       completeMethod="#{userLists.searchUsers}" 
       var="_user" 
       itemValue="#{_user}" 
       itemLabel="#{_user.name}" 
       selectListener="#{emailTemplateDataAddUtil.selectFromUser}" 
       onSelectUpdate="fromUser" 
       required="true">
   <s:convertEntity />
</pf:autoComplete>

The solution is to add a .isEmpty() check to the converter.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the seam-issues mailing list