I just think it's easy enough given the enhancement that you can use own
extensions without having to sync TemplateLocators with trunk!

2009/4/5 Mario Rabe <mario.r...@googlemail.com>

> Not true, it could be handled as a fallback (see code).
>
> 2009/4/5 Joachim Van der Auwera <joac...@progs.be>
>
> Changing the template extension would render all component libraries (which
>> use templates) unusable. Not that this is impossible to fix, but it a
>> complication.
>>
>> Kind regards,
>> Joachim
>>
>>
>> Mario Rabe wrote:
>>
>>> Why is it so hard to change the default-template extension? I really want
>>> the templates to end with "html"! The I saw the template-extension is
>>> defined as a constant. It is even inlined in classes.
>>> ComponentTemplateSource#baseResourceForModel is private so there is no
>>> override. Beside that ComponentTemplateSource is final. Similar problems
>>> with PageTemplateLocator.
>>>
>>> So to change the extension from "tml" to "html" I have to copy 2 internal
>>> classes, change them slightly and override the internal services.
>>>
>>> Thats not very tapestry in my oppinion. There should be a symbol in the
>>> core
>>> which defines an alternative extension for templates. If a template could
>>> not be found using the default-extension then the alternative extension
>>> is
>>> checked before loading fails. Code could look like:
>>>
>>>        Resource res =
>>>
>>> model.getBaseResource().withExtension(InternalConstants.TEMPLATE_EXTENSION);
>>>        if(res.toURL()!=null){
>>>            return res;
>>>        }
>>>        return model.getBaseResource().withExtension(altenativeExtension);
>>>
>>> Maybe there is a more effective way to provide such a feature using
>>> module-scopes. What do you think about it?
>>>
>>> Mario
>>>
>>>
>>>
>>
>>
>> --
>> Joachim Van der Auwera
>> PROGS bvba, progs.be
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>

Reply via email to