|
|
Subject: Re: Singleton & Non-Singleton in one app? - msg#00205
List: jakarta.velocity.user
Yes. The singleton is just using another separate non-singleton
instance.
On Monday, November 25, 2002, at 05:34 PM, plynchnlm@xxxxxxxxxxxx wrote:
Is it safe to have one part of an application use the singleton
Velocity engine, while another part uses the non-singleton
(VelocityEngine) model?
--
Paul Lynch
Aquilent, Inc.
National Library of Medicine
__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now!
http://channels.netscape.com/ns/browsers/download.jsp
Get your own FREE, personal Netscape Mail account today at
http://webmail.netscape.com/
--
To unsubscribe, e-mail:
< mailto:velocity-user-unsubscribe@xxxxxxxxxxxxxxxxxx>
For additional commands, e-mail:
< mailto:velocity-user-help@xxxxxxxxxxxxxxxxxx>
--
Geir Magnusson Jr 203-355-2219(w)
Adeptra, Inc. 203-247-1713(m)
geirm@xxxxxxxxxxx
Was this page helpful?
Thread at a glance:
Previous Message by Date:
click to view message preview
Need someone to do xdocs/DVSL work
I have a need for someone to do some DVSL/xdocs work related to styling
into PDF using whatever open source toolkit works. This will be paid
work, and I will do what I can to contribute the output back as open
source, making it available in the DVSL package or as an add-on.
If interested, please drop me a private email.
--
Geir Magnusson Jr 203-355-2219(w)
Adeptra, Inc. 203-247-1713(m)
geirm@xxxxxxxxxxx
Next Message by Date:
click to view message preview
Re: Setting Variables
On Tuesday, November 26, 2002, at 07:13 PM, Peter Harrison wrote:
Have a interesting problem:
If I do something like :
#set( $foo = $bar / 52 )
$foo
where $bar is some Float set in the context (say 52), then I get
$foo - ie it isn't replaced.
However, if I do this:
#set( $foo = 0 )
#set( $foo = $bar /52 )
$foo
Then the result is:
1
Which is correct. Question is why do I need to set $foo to zero before
doing
the second set for it to work?
First, right now the vel you are using doesn't support floats. It will
soon on a test basis :)
I'm actually surprised that you get a value of 1, rather than 0 in the
output. Are you sure?
--
Geir Magnusson Jr 203-355-2219(w)
Adeptra, Inc. 203-247-1713(m)
geirm@xxxxxxxxxxx
Previous Message by Thread:
click to view message preview
Singleton & Non-Singleton in one app?
Is it safe to have one part of an application use the singleton
Velocity engine, while another part uses the non-singleton
(VelocityEngine) model?
--
Paul Lynch
Aquilent, Inc.
National Library of Medicine
__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now!
http://channels.netscape.com/ns/browsers/download.jsp
Get your own FREE, personal Netscape Mail account today at
http://webmail.netscape.com/
Next Message by Thread:
click to view message preview
#foreach help needed ...
Hi everyone,
I wonder if the following thing is possible, and if it is, how to make Velocity
do it...(i simplify the real situation & use different classes, but the problem
is the same):
I have one class, say class Person with following fields: String name,
ArrayList addresses
Then I have another class, Address, with fields String street, String city -
you can guess, the ArrayList addresses in Person is filled with instances of
the class Address.
And I have a wrapper ArrayList People.
Now I want to print all the information I have
so I do
#foreach($person in $people)
$person.name
#foreach($address in $person.addresses)
$address.street
$address.city
#end
#end
However, I do not get the address data ... anyone any idea why? I do not have
any problems with accessing simple stuf like String inside an ArrayList. I also
do not have any problems with getting the whole Address object (which is, of
course, gibberish when printed as it is). What I cannot achieve is to acces the
fields of the Address object from the ArrayList ....
Thanks!!!
Jan
|
|