forked from hlship/tapx
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'tapx-prototype-fix-zonemanager' of https://github.com/j…
…ochenberger/tapx into jochenberger-tapx-prototype-fix-zonemanager Conflicts: tapx-prototype/src/main/java/com/howardlewisship/tapx/prototype/PrototypeModule.java
- Loading branch information
Showing
2 changed files
with
53 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
tapx-prototype/src/main/resources/com/howardlewisship/tapx/prototype/tapestry-js-fixes.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Tapestry.ZoneManager.addMethods({ | ||
processReply : function(reply) { | ||
Tapestry.loadScriptsInReply(reply, function() { | ||
/* | ||
* In a multi-zone update, the reply.content may be missing, in which | ||
* case, leave the curent content in place. TAP5-1177 | ||
*/ | ||
reply.content != undefined && this.show(reply.content); | ||
|
||
/* | ||
* zones is an object of zone ids and zone content that will be present in | ||
* a multi-zone update response. | ||
*/ | ||
reply.zones && Object.keys(reply.zones).each(function(zoneId) { | ||
var manager = Tapestry.findZoneManagerForZone(zoneId); | ||
|
||
if (manager) { | ||
var zoneContent = reply.zones[zoneId]; | ||
manager.show(zoneContent); | ||
} | ||
}); | ||
}.bind(this)); | ||
} | ||
}); |