Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-1177

In a partial page update request, if the server returns an empty string for the content, the client-side is left as is, rather than cleared

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.2.0
    • 5.2.1
    • tapestry-core
    • None

    Description

      Workaround: place an empty comment inside the content.

      The issue is here:

      processReply : function(reply) {
      Tapestry.loadScriptsInReply(reply, function() {
      /*

      • In a multi-zone update, the reply.content may be blank or
      • missing.
        */

      reply.content && this.show(reply.content);

      In this situation the reply looks like:

      {
      "content": ""
      }

      And the empty string is falsey; it short circuits the && operator.

      A check for undefined is more appropriate (this may be the case in a multi-zone update).

      Attachments

        Activity

          People

            hlship Howard Lewis Ship
            hlship Howard Lewis Ship
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: