tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Segall (JIRA)" <...@tapestry.apache.org>
Subject [jira] Created: (TAPESTRY-2539) FormInjector (and some other ajax) breaks on subpages
Date Sat, 26 Jul 2008 18:20:31 GMT
FormInjector (and some other ajax) breaks on subpages
-----------------------------------------------------

                 Key: TAPESTRY-2539
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2539
             Project: Tapestry
          Issue Type: Bug
          Components: tapestry-core
    Affects Versions: 5.0.13, 5.0.12
            Reporter: Ben Segall


If you have a FormInjector in a subpage, tapestry needs to give t:formid and t:cp parameters
on the javascript URL. However, RenderSupportImpl/DocumentLinkerImpl escape the '&'s in
the URL as '&amp;', which doesn't work. More generally, this is related to TAPESTRY-2429,
as the javascript in the script tag doesn't have the same quoting requirements as normal.
A possible fix that I'm using is to change DocumentLinkerImpl.updateDocument to use raw()
rather than text() to write out the javascript:

Index: tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DocumentLinkerImpl.java
===================================================================
--- tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DocumentLinkerImpl.java
 (revision 680016)
+++ tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DocumentLinkerImpl.java
 (working copy)
@@ -144,7 +144,7 @@
 
             e.text("Tapestry.onDOMLoaded(function() {\n");
 
-            e.text(scriptBlock.toString());
+            e.raw(scriptBlock.toString());
 
             e.text("});\n");
 


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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Mime
View raw message