velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <ge...@optonline.net>
Subject Re: List of variables present in the template?
Date Thu, 29 Nov 2001 11:54:57 GMT
On 11/28/01 7:36 PM, "Donnie Hale" <donnie@haleonline.net> wrote:

> Geir,
> 
>>> I've been thinking about that one for a while - formalize the
> contract...<<
> 
> I've thought about this as well. I've wondered about a
> 
> #strict("file.vmx")
> 
> directive that would go at the top of template files. "file.vmx" would be
> where the contract was specified (XML ???). This would cause a runtime
> check. Haven't thought as much about pre-deployment checking.

I think this is the wrong 'direction'.  I think it should be done in code,
not in template...

> 
> FWIW...
> 
> Donnie
> 
> 
> -----Original Message-----
> From: Geir Magnusson Jr. [mailto:geirm@optonline.net]
> Sent: Wednesday, November 28, 2001 11:02 AM
> To: velocity-user@jakarta.apache.org
> Subject: Re: List of variables present in the template?
> 
> 
> On 11/28/01 9:30 AM, "Bill Burton" <billb@progress.com> wrote:
> 
>> Hello,
>> 
>> Something similar that's crossed my mind is to come up with a methodology
>> of documenting what's in the context.  The idea is the developer could
>> attach a short description to each object in the context.  Then the
>> template developer could execute a template to dump out what's available.
>> Maybe this could also include a link to the associated JavaDoc for that
>> object?
>> 
>> It would be interesting to have some discussion on a generic context tool
>> that could be used for this purpose.
> 
> I've been thinking about that one for a while - formalize the contract...
> 
> If you didn¹t see it, I threw a little tool into
> contrib/temporary/templatetool that will dump the reference list for a
> template.  To be used by the developer, not the designer...
> 
>> 
>> -Bill
>> 
>> Dan Bachelder wrote:
>>> 
>>> it think it would be interesting for debugging occasionally.. although I
>>> can't think of an example off the top of my head... another think that
> could
>>> be useful once and a while (maybe) would be the ability to get a hash
> where
>>> the key is the unique $variables and the object is a Collection of values
> it
>>> holds in the template(before or after rendering)... I would use this when
> I
>>> have particularly complex templates and I am trying to debug a specific
>>> problem and don't want to dig through the entire bag of schmoo to see if
>>> something worked... it would make unit tests of template related stuff a
> bit
>>> neater too maybe...
>>> 
>>> ----- Original Message -----
>>> From: "Geir Magnusson Jr." <geirm@optonline.net>
>>> To: <velocity-user@jakarta.apache.org>
>>> Sent: Monday, November 26, 2001 11:11 AM
>>> Subject: Re: List of variables present in the template?
>>> 
>>>> On 11/26/01 11:01 AM, "JD Evora" <jdevora@saadian.com> wrote:
>>>> 
>>>>> 
>>>>> Hi,
>>>>> 
>>>>> Does anyone know if the Velocity API has a method for get all the
>>> variables
>>>>> present in a template?
>>>>> 
>>>> 
>>>> No, but at this rate, I am going to write one.  This is the second
> request
>>>> for this in a week.
>>>> 
>>>> It will be simple and quick to do...
>>>> 
>>>> Why do you want this, if I may ask?
>> 
>> --
>> To unsubscribe, e-mail:
>> <mailto:velocity-user-unsubscribe@jakarta.apache.org>
>> For additional commands, e-mail:
>> <mailto:velocity-user-help@jakarta.apache.org>
>> 
> 
> --
> Geir Magnusson Jr.                                     geirm@optonline.net
> System and Software Consulting
> "He who throws mud only loses ground." - Fat Albert
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:velocity-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:velocity-user-help@jakarta.apache.org>
> 
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:velocity-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:velocity-user-help@jakarta.apache.org>
> 

-- 
Geir Magnusson Jr.                                     geirm@optonline.net
System and Software Consulting
Be a giant.  Take giant steps.  Do giant things...


--
To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>


Mime
View raw message