[
https://issues.apache.org/struts/browse/WW-1822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40669
]
Musachy Barroso commented on WW-1822:
-------------------------------------
Ok, as this is fixed for 2.1, I will close it as "won't fix".
> Allow conditional exclusion of dojo scripts in simple/head.ftl
> --------------------------------------------------------------
>
> Key: WW-1822
> URL: https://issues.apache.org/struts/browse/WW-1822
> Project: Struts 2
> Issue Type: Improvement
> Components: Views
> Affects Versions: 2.0.6
> Reporter: Jasper Rosenberg
> Assigned To: Musachy Barroso
> Fix For: 2.0.8
>
>
> I am extending the xhtml theme, but I am not using any of the Dojo features
> (no tooltips, optiontransferselect, etc.) It would be great if there was a
> parameter I could therefore pass to the "head" tag to have it exclude the
> dojo scripts, something like the following "if" around the entire contents of
> head.ftl:
> <#if parameters.excludeDojo!false>
> ...
> </#if>
> Obviously, I have a workaround right now which is just to override head.ftl
> in my custom theme to be empty, but I think it would be reasonable to provide
> an easy way for users to avoid including a11,000 line javascript file (250k)
> when it isn't needed :)
> If I might also rant for a moment, overall my experience porting from WW2 to
> Struts2 has been positive, but the number one change that I think is a huge
> mistake is pushing the dependency on Dojo all the way into the simple theme
> rather than keeping it isolated to the AJAX theme. I certainly understand
> the desire to be able to leverage Dojo in a few convenient places (like
> tooltips), but by forcing Dojo on anyone using a standard theme, you have
> basically rejected anyone using Struts2 for a project with low bandwidth
> users (without doing a bunch of custom work) and I think that is unfortunate
> and a step in the wrong direction. If anything, it seems like the goal
> should be to make the Struts2/Dojo connection as isolated as possible to
> allow other javascript frameworks to be plugged in in the future. End rant.
> :)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.