[
https://issues.apache.org/struts/browse/WW-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_41006
]
Jeromy Evans commented on WW-1766:
----------------------------------
This change works for the <s:div href=...> case however a similar change may be
required to Anchor and Submit when loading a result that includes scripts.
A page that uses:
<s:a theme="ajax" href="PersonByAge_input.action" executeScripts="true"
targets="div1 />link</s:a>
<s:div id="div1" ....></s:div>
Has all scripts stripped out of the result irrespective of the attributes of
the target div.
It appears the scriptSeparation="false" attribute is required on the anchor,
however when I patched a.ftl directly to try this it seemed to have no effect.
My work-arounds are to:
- use a <s:div ... scriptSeparation="false" href='..."> to load a default
result with the scripts included (assuming the sames scripts are reused for
every result); or
- include the appropriate scripts explicitly outside the result
(Tested on 2.0.6 with patches applied only to the Div, DigTag and div.ftl as
per revision #511300)
> s:div tag needs the scriptSeparation attribute
> ----------------------------------------------
>
> Key: WW-1766
> URL: https://issues.apache.org/struts/browse/WW-1766
> Project: Struts 2
> Issue Type: Improvement
> Components: Views
> Affects Versions: 2.0.6
> Environment: All
> Reporter: Clifford Adams
> Assigned To: Musachy Barroso
> Priority: Minor
> Fix For: 2.0.7
>
>
> The s:div tag has most of the attributes of the dojo ContentPane widget. But
> not the scriptSeparation attribute. This causes an issue with included forms
> and client-side javascript validation. For example:
> A page with an included form and results div like this will not work:
> <s:div theme="ajax" href="PersonByAge_input.action" executeScripts="true" />
> <s:div id="resultBox" theme="ajax" />
> if the form attempts to use [theme="css_xhtml" validate="true"] because the
> generated validation javascript gets stripped out before being included in
> the s:div
> If the page is changed to:
> <div dojoType="ContentPane" href="<s:url action="PersonByAge_input"/>"
> scriptSeparation="false" executeScripts="true" ></div>
> <s:div id="resultBox" theme="ajax" />
> then it works just fine.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.