Issue Details (XML | Word | Printable)

Key: TAPESTRY-811
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Jesse Kuhnert
Reporter: Jesse Kuhnert
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Tapestry

Palette javascript not compatible with ajax requests

Created: 18/Dec/05 10:15 PM   Updated: 02/Dec/06 07:38 PM
Return to search
Component/s: Contrib
Affects Version/s: None
Fix Version/s: 4.1.1

Time Tracking:
Not Specified

Environment: ajax request/response

Resolution Date: 02/Dec/06 07:38 PM


 Description  « Hide
The scoping of variables used by the Palette scripts prevents their resolution when the scope changes because of ajax interactions. A fix would be to specify a clear scope on a couple of the key variables via the use of document.<variable name> = instead of <variable name> = .

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #481612 Sat Dec 02 19:43:06 UTC 2006 jkuhnert Resolves TAPESTRY-1159, TAPESTRY-811.

Refactored PalleteFunctions.js to use tapestry.<namespace> type semantics like the rest of the core tapestry
javascript modules. (also provided backwards compatible deprecated functions for the existing/old functions)

Took "var <foo>" out of generated javascript for tapestry namespaced javascript statements as tapestry
has already been defined by the time anyone has access to it. Now it's just "tapestry.<foo> = ".

Refactored dynamic script package inclusion logic so that simple <include url="http://localhost/script.js"/>
elements are written to the client for package includes instead of trying to embed javascript statements.
(don't know why I was doing that to begin with, brain dead that day I guess)
Files Changed
MODIFY /tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/core.js
MODIFY /tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/util/PageRenderSupportImpl.java
MODIFY /tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/util/TestPageRenderSupport.java
MODIFY /tapestry/tapestry4/trunk/tapestry-contrib/pom.xml
MODIFY /tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/services/impl/DojoAjaxResponseBuilderTest.java
MODIFY /tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/palette/Palette.script
MODIFY /tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/DojoAjaxResponseBuilder.java
MODIFY /tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/html/Rollover.script
MODIFY /tapestry/tapestry4/trunk/tapestry-examples/TimeTracker/pom.xml
MODIFY /tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/palette/Palette.java
MODIFY /tapestry/tapestry4/trunk/tapestry-examples/TimeTracker/src/context/WEB-INF/timetracker.application
MODIFY /tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/palette/PaletteFunctions.js
MODIFY /tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/enhance/TestEnhancementOperation.java