Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    detailViewer displaying " " when text field is blank

    SmartClient Pro 9.0 - (2013-10-23)

    I am creating a detailViewer using some data that was provided by users. For this reason, some of the text fields in the detailViewer need to have escapeHTML = true, so that layout is not broken by the occasional inclusion of something that could be interpreted as a tag.

    The situation I'm seeing is that when the data value is blank: "", the field will literally display " " in the field in the viewer.

    It goes away when you set escapeHTML = false, but we need it to escapeHTML.

    I would expect that if the value of the field in the record is blank, then it should display nothing.

    Here's how to duplicate:

    Code:
    var detailData = [
    
    {
            "PayeeName": "Robert",
            "RejectTitle": "Insufficient funds",
            "Description": "Reimbursement"
          },
          {
            "PayeeName": "MEDICAL CENTER",
            "RejectTitle": "Insufficient funds",
            "Description": ""
          },
          {
            "PayeeName": "UNIVERSAL",
            "RejectTitle": "Insufficient funds",
            "Description": "Bad HTML: </table>"
          },
          {
            "PayeeName": "PHYSICAL THERAPY",
            "RejectTitle": "Insufficient funds",
            "Description": ""
          }
    
    ]
    var ON_HOLD_DETAIL_FIELDS =  [
         {
             name: "PayeeName",
             title: "Payee Name",
             type: "text",
             escapeHTML: true,
             width: "*"
         },
         {
             name: "RejectTitle",
             title: "Reason for Pending",
             type: "text",
             width: "*"
         },
         {
             name: "Description",
             title: "Transaction Description",
             type: "text",
             escapeHTML: true,
             width: "*"
         }
     ]
    isc.DetailViewer.create({
         fields: ON_HOLD_DETAIL_FIELDS,
         data: detailData[1],
         width: 400
     });
    (Set it to use detailData[2] and set escapeHTML = false for the "Description" field if you want to understand why we need escapeHTML to be set)

    #2
    We've made a change to address this issue (9.0p and 9.1d branches)
    Please try the next nightly build dated Dec 5 or above

    Regards
    Isomorphic Software

    Comment


      #3
      Thanks!

      We'll apply the update tomorrow morning.

      Comment


        #4
        That fixed it!

        The 12/5/2013 release fixed our problem. Thanks so much for that quick fix!

        Comment

        Working...
        X