Can you do what you want with CSS? That would be my suggestion, since it appears this has more to do with presentation than content.

If not, I'd put all the HTML in one file. Create a "style" variable in the Visit object or in your base page class and do something like

<span jwcid="@base:If" condition="ognl:visit.style == 'aaa'">

<!--- aaa code --->

</span>
<span jwcid="@base:If" condition="ognl:visit.style == 'bbb'">

<!--- bbb code --->

</span>

I would strongly prefer the first option if possible. The second reeks of duplicated code and general problems with maintenance.

Todd

On Aug 6, 2005, at 8:49 PM, Jone.hwk wrote:

Hi,
In my project,I'd like to provide my customers choices to select their favorite page templates set on the fly.For example,there are a seires of templates as
following:
[context]
        templtes
                aaa
                   login.html
                   view.html
                   go.html
                   .....
                bbb
                   login.html
                   view.html
                   go.html
                   .....
                ccc
                   login.html
                   view.html
                   go.html
                   .....
The visitors can store their selction in "visit",and in class
TemplateSourceImpl I rewrited the "loadTemplate()" to load selected favorite tempate such as "aaa" or "bbb".There is no problem when first loading,but how to apply the selected template on the fly is a big problem.I'v look into source code,the getTemplate() method invoked only once when loading component.

Is there a way to go?
thanks in advance
Jone.hwk



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to