You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org> on 2010/09/20 23:33:34 UTC

[jira] Assigned: (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

     [ https://issues.apache.org/jira/browse/TAP5-1177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship reassigned TAP5-1177:
------------------------------------------

    Assignee: Howard M. Lewis Ship

> 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
> -------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1177
>                 URL: https://issues.apache.org/jira/browse/TAP5-1177
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.2.0
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>
> 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).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.