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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.2.0
    • Fix Version/s: 5.2.1
    • Component/s: tapestry-core
    • Labels:
      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).

        Activity

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Howard M. Lewis Ship
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development