Re: Teething troubles
Daniel Dekany <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.devel |
|---|---|
| Message-ID | <[email protected]> |
Friday, March 9, 2012, 2:34:41 PM, Tim Pizey wrote:
> On 9 March 2012 13:13, Daniel Dekany wrote:
>> Friday, March 9, 2012, 11:14:27 AM, Tim Pizey wrote:
>> [snip]
>>>> Don't do that... BeansWrapper uses standrad JavaBeans rules. Changing
>>>> that would be rather annoying for anyone who wants to work with the
>>>> templates later.
>>>
>>> Sure, I do not intend to replace, but to extend into my own
>>> VelocityBeanWrapper. (though I think there may be others who would
>>> like to be able to use both Sun and Velocity method notation)
>>
>> Maybe I'm missing something here. Do you actually have
>> ${table.TableInfo.Category.Name} with all those capital letters in the
>> Velocity templates?
> Yes
>> That would be incredibly... strange.
>
> Err, no, this is standard Velocity and WebMacro usage.
So, WebMacro just removed "get" from the method names but leave them
capital, if I understand it well. I didn't remember that. And yes, I
find it strange, but, well, probably it was one guy's lonely decision,
back then in the Java stone-age... things like that happen (like
FreeMarker has some funny pieces of heritage too... a lot, actually).
(That Velocity does this too doesn't mean much, as they in many
respects just quickly copied WebMacro when they couldn't find an
agreement with its author, and they needed something like WebMacro
quickly.)
> I have read java.beans.Introspector, and don't like it,
That just implements the JavaBeans "standard", which is an integral
part of the Java software ecosystem. The whole stack is full of beans.
> I much prefer the Velocity way.
Why?
> I am surprised at your surprise, and that you have not had people with this
> problem before.
Beats me. Sometimes people doesn't report more fundamental things for
years.
>> Also, you can possibly just extend BeansWrapper with subclassing (as
>> opposed to modifying the source code).
>
> Yes.
>
>> If you indeed have some naming
>> convention mismatches, and you are sure that you don't want to fix
>> those in the templates instead, note the
>> BeansWrapper.finetuneMethodAppearance method.
>
> Thanks.
>
> I have also looked at tools/vel2ftl
> This has an eclipse project name of cavalry, and would probably build
> if an old version of
> freemarker.jar were placed in its lib directory.
> As it is it does not compile.
I can imagine... Like I have seen UsCavalry has outputted loooong ago
deprecated (but still working) stuff like <#call dddddd>. That should
be <@dddddd /> for ages.
> thanks for all your help
>
> Tim
>
--
Best regards,
Daniel Dekany
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/