When we discussed this issue in regards to 2.2.3 (and then pulled it
because of the significant number of changes) it seemed like option 2
not only solved this issue but other template inheritance issues as
well.
With the emphasis that is being put on templating, from multiple AJAX
templates to separating the tags/ui into their own projects, option 2
certainly feels like the right solution.
If you've ever created a custom template with the goal of extending an
existing template and just modifying a handful of template files
you've probably run into the issue that is covered by option 1. In my
opinion its a huge pain in the ass to copy the other template files
just to keep everything working. That level of redundancy sucks and
IMHO SAF2 should neither be a pain in the ass or suck.
My 2 cents :)
Cheers,
Eric
On 6/25/06, Rainer Hermanns (JIRA) <[EMAIL PROTECTED]> wrote:
[ http://issues.apache.org/struts/browse/WW-1328?page=comments#action_37603
]
Rainer Hermanns commented on WW-1328:
-------------------------------------
Nope, it is not that trivial...
I tried it locally, but there is a problem with the parse directive, trying to
embed unavailable files within the different themes.
#parse does use the ${parameters.templateDir} but does not know what to use, if
the requested file is not available.
If we want to address this problem these might be pssoble solutions:
o every theme has to include all template files so that the above parameter
works as expected.
If a template is inherited, just use it as a wrapper for a parse call to the
correct ('super') theme template file.
o rewrite or implement an "intelligent" parse macro, that takes the
$parameters.templateDir as a default and tries to lookup
the theme inheritence hierarchy until the named file is found
What do you think?
Rainer
> xhtml theme is hardcoded to use xhtml/controlfooter for all templates
> ---------------------------------------------------------------------
>
> Key: WW-1328
> URL: http://issues.apache.org/struts/browse/WW-1328
> Project: Struts Action 2
> Type: Bug
> Components: Views
> Versions: WW 2.2.2
> Reporter: Nick Hill
> Assignee: Don Brown
> Fix For: 2.0.0
>
> If you look at one of the xhtml themes, for example, text.ftl, it is hard
coded to use the xhtml controlfooter. This poses a problem for overridding the
theme.
> Example xhtml/text.ftl:
> <#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl"
/>
> <#include "/${parameters.templateDir}/simple/text.ftl" />
> <#include "/${parameters.templateDir}/xhtml/controlfooter.ftl" />
> Notice the controlfooter does not use ${parameters.theme} but rather is hard
coded to xhtml.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]