[seam-issues] [JBoss JIRA] Commented: (JBSEAM-4713) EntityConverter should allow empty String

Cody Lerum (JIRA) jira-events at lists.jboss.org
Tue Sep 28 10:49:28 EDT 2010


    [ https://jira.jboss.org/browse/JBSEAM-4713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12553702#action_12553702 ] 

Cody Lerum commented on JBSEAM-4713:
------------------------------------

I've attached a patch.

> EntityConverter should allow empty String
> -----------------------------------------
>
>                 Key: JBSEAM-4713
>                 URL: https://jira.jboss.org/browse/JBSEAM-4713
>             Project: Seam
>          Issue Type: Bug
>          Components: JSF Integration
>    Affects Versions: 2.2.1.CR2
>         Environment: seam 2.2.1CR2, PrimeFaces
>            Reporter: Cody Lerum
>             Fix For: 2.2.1.CR3
>
>         Attachments: JBSEAM-4713-P1
>
>
> 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 contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the seam-issues mailing list