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)" <de...@tapestry.apache.org> on 2008/08/06 00:22:44 UTC

[jira] Closed: (TAPESTRY-2539) FormInjector (and some other ajax) breaks on subpages

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

Howard M. Lewis Ship closed TAPESTRY-2539.
------------------------------------------

    Resolution: Duplicate
      Assignee: Howard M. Lewis Ship

Kudos for finding/analyzing it first.  Fixed as TAPESTRY-2429.

> 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.12, 5.0.13
>            Reporter: Ben Segall
>            Assignee: Howard M. Lewis Ship
>
> 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