velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "KNOX, Liam, FM" <Liam.K...@rbos.com>
Subject RE: Bug?
Date Fri, 06 Sep 2002 08:38:33 GMT
What is the reasoning on not being able to assign a
variable to null?

-----Original Message-----
From: Cliff Dunn [mailto:c.dunn5@verizon.net]
Sent: 05 September 2002 17:35
To: Velocity Users List
Subject: Re: Bug?


Liam,

This is not a bug,  after $s has been set it cannot be set back to null. Try
giving it an invalid value and test if the value has changed in each
itteration of the loop.

see velocity user's guide - Directives section.
http://jakarta.apache.org/velocity/user-guide.html#Directives

Cliff

----- Original Message -----
From: "KNOX, Liam, FM" <Liam.Knox@rbos.com>
To: <velocity-user@jakarta.apache.org>
Sent: Thursday, September 05, 2002 9:12 AM
Subject: Bug?


> I am currently displaying a partially populated list and encountering a
few
> problems
> eg
> public void simpleTest() {
>     List l = new ArrayList();
>     for (int i = 0; i < 10 ;++i) {
>       if (i==5) {
>         l.add(String.valueOf(i));
>       }
>       else {
>         l.add(null);
>       }
>     }
> // set in velocity context
>   }
>
> when I display using velocity
> i.e
> <table>
>
>  <!-- #foreach ($s in $strings) -->
>   <tr><td>value = $!s</td></tr>
> <!-- #end -->
> </table>
>
> I get the following
>
> value =
> value =
> value =
> value =
> value =
> value = 5
> value = 5
> value = 5
> value = 5
> value = 5
>
> is this a bug??
> cheers
> Liam
>
>
>
> ***********************************************************************
>       Visit our Internet site at http://www.rbsmarkets.com
>
> This e-mail is intended only for the addressee named above.
> As this e-mail may contain confidential or privileged information,
> if you are not the named addressee, you are not authorised to
> retain, read, copy or disseminate this message or any part of it.
> The Royal Bank of Scotland is registered in Scotland No 90312
> Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB
> Regulated by the Financial Services Authority
> ***********************************************************************
>
> --
> 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>


********************************************************************
      Visit our Internet site at http://www.rbsmarkets.com

This e-mail is intended only for the addressee named above.
As this e-mail may contain confidential or privileged information,
if you are not the named addressee, you are not authorised to
retain, read, copy or disseminate this message or any part of it.
The Royal Bank of Scotland is registered in Scotland No 90312
Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB
Regulated by the Financial Services Authority
********************************************************************

--
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