Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-11020

EntityConverter should allow empty String

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • EAP_EWP 5.3.0.GA
    • EAP_EWP 5.3.0.ER1
    • Seam2
    • None
    • seam 2.2.1CR2, PrimeFaces

    • Hide

      create a copy of EntityConverter in your project with the fix and @Install(precedence = DEPLOYMENT)

      Show
      create a copy of EntityConverter in your project with the fix and @Install(precedence = DEPLOYMENT)
    • Not Required
    • NEW

    Description

      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.

      Attachments

        Activity

          People

            mnovotny@redhat.com Marek Novotny
            mnovotny@redhat.com Marek Novotny
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: