> These are the cases I'm interested in hearing about. Why do you have
> varying object types for a single VTL reference?

Generic templates:
 - Grids;
 - Automatic form generation;
 - Detail views.

The form generation I still only have in WebMacro, but I am going to 
improve it over Velocity. Basically I loop over a list of field 
definitions and field values to generate views over data. This means 
that the value type changes a lot for each item (data field) in the list.

This (of course) is only good for very simple stuff, but +/-80% of my
data entry forms/detail views/listings are so simple that they can be
built from a simple definition.

I found out that using templates/macros simplifies a lot building and 
customizing even this generic stuff, when compared to generating it all
in Java.


Have fun,
Paulo Gaspar


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> Jason van Zyl
> 
> 
> Paulo Gaspar wrote:
> > 
> > Very interesting stuff Jason.
> > 
> > However...
> > 
> > > I am in agreement with Geir that this is the safest, as we discussed
> > > this when changes were made to support varying object types 
> in the context
> > > from one rendering to the next, but I don't believe this is a normal
> > > usage pattern.
> > 
> > Maybe it is not normal, but I have a lot of that in my framework. And
> > I can still thing of many other cases where I would use this.
> 
> These are the cases I'm interested in hearing about. Why do you have
> varying object types for a single VTL reference?
>  
> > However, it shouldn't be very hard to have 2 types of 
> templates, or 2 types
> > of variables (as you mention for XMLC).
> 
> I don't think so either. If users want to be a little more strict then
> they get full-on optimization with compilation, otherwise Velocity could
> easily fall back reflection or maybe we could use a hybrid system. Who
> knows, anything is possible. 
> 
> -- 
> jvz.
> 
> Jason van Zyl
> [EMAIL PROTECTED]

Reply via email to