Uploaded image for project: 'Seam 2'
  1. Seam 2
  2. JBSEAM-4713

EntityConverter should allow empty String

    Details

    • Workaround Description:
      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)

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  manaRH Marek Novotny
                  Reporter:
                  clerum Cody Lerum
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: