You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Juan Dellarroquelle <ra...@usa.net> on 2002/08/13 17:07:34 UTC

get method of an unmodifiableList

Hello,

I noticed that when I call get(int) method of a java.util.List, it returns
the right object stored in it,
but when the get(int) method is called on a java.util.List returned by
Collections.unmodifiableList(java.util.List)
it returns nothing.
When I say "I call get(int)" I mean $myUnmodifiableList.get(0) inside a
Velocity Template file.

Is this the spected behavior?

Thanks,
Juan.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: get method of an unmodifiableList

Posted by Juan Dellarroquelle <ra...@usa.net>.
It shows all the Objects inside the list.

Thanks,
Juan.

----- Original Message -----
From: "Geir Magnusson Jr." <ge...@adeptra.com>
To: <ve...@jakarta.apache.org>
Sent: Tuesday, August 13, 2002 9:37 PM
Subject: Re: get method of an unmodifiableList


> On 8/13/02 2:56 PM, "Juan Dellarroquelle" <ra...@usa.net> wrote:
>
> > I mean if I have this: $myRegularList.get(0) on a not unmodifiableList
and
> > in that position I have
> > a String object, Velocity renders the right String value.
> > But if I have the same on an unmodifiableList, it will render
> > "$myUnmodifiableList.get(0)",
> > and if I have $!myUnmodifiableList.get(0), it will render out nothing.
> >
>
> What happens with
>
>    $myUnmodifiableList
>
>
> By itself in the template?
>
> > Juan.
> >
> > ----- Original Message -----
> > From: "Geir Magnusson Jr." <ge...@adeptra.com>
> > To: <ve...@jakarta.apache.org>
> > Sent: Tuesday, August 13, 2002 3:24 PM
> > Subject: Re: get method of an unmodifiableList
> >
> >
> >> On 8/13/02 11:07 AM, "Juan Dellarroquelle" <ra...@usa.net> wrote:
> >>
> >>> Hello,
> >>>
> >>> I noticed that when I call get(int) method of a java.util.List, it
> > returns
> >>> the right object stored in it,
> >>> but when the get(int) method is called on a java.util.List returned by
> >>> Collections.unmodifiableList(java.util.List)
> >>> it returns nothing.
> >>> When I say "I call get(int)" I mean $myUnmodifiableList.get(0) inside
a
> >>> Velocity Template file.
> >>>
> >>> Is this the spected behavior?
> >>>
> >>
> >> What do you mean by "returns nothing"?
> >>
> >> Do you see anything in the template or the log?
> >>
> >>
> >>
> >> --
> >> Geir Magnusson Jr.
> >> Research & Development, Adeptra Inc.
> >> geirm@adeptra.com
> >> +1-203-247-1713
> >>
> >>
> >>
> >> --
> >> To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> >> For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >>
> >>
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
>
> --
> Geir Magnusson Jr.
> Research & Development, Adeptra Inc.
> geirm@adeptra.com
> +1-203-247-1713
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: get method of an unmodifiableList

Posted by "Geir Magnusson Jr." <ge...@adeptra.com>.
On 8/13/02 2:56 PM, "Juan Dellarroquelle" <ra...@usa.net> wrote:

> I mean if I have this: $myRegularList.get(0) on a not unmodifiableList and
> in that position I have
> a String object, Velocity renders the right String value.
> But if I have the same on an unmodifiableList, it will render
> "$myUnmodifiableList.get(0)",
> and if I have $!myUnmodifiableList.get(0), it will render out nothing.
> 

What happens with

   $myUnmodifiableList


By itself in the template?

> Juan.
> 
> ----- Original Message -----
> From: "Geir Magnusson Jr." <ge...@adeptra.com>
> To: <ve...@jakarta.apache.org>
> Sent: Tuesday, August 13, 2002 3:24 PM
> Subject: Re: get method of an unmodifiableList
> 
> 
>> On 8/13/02 11:07 AM, "Juan Dellarroquelle" <ra...@usa.net> wrote:
>> 
>>> Hello,
>>> 
>>> I noticed that when I call get(int) method of a java.util.List, it
> returns
>>> the right object stored in it,
>>> but when the get(int) method is called on a java.util.List returned by
>>> Collections.unmodifiableList(java.util.List)
>>> it returns nothing.
>>> When I say "I call get(int)" I mean $myUnmodifiableList.get(0) inside a
>>> Velocity Template file.
>>> 
>>> Is this the spected behavior?
>>> 
>> 
>> What do you mean by "returns nothing"?
>> 
>> Do you see anything in the template or the log?
>> 
>> 
>> 
>> --
>> Geir Magnusson Jr.
>> Research & Development, Adeptra Inc.
>> geirm@adeptra.com
>> +1-203-247-1713
>> 
>> 
>> 
>> --
>> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
>> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>> 
>> 
> 
> 
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 

-- 
Geir Magnusson Jr. 
Research & Development, Adeptra Inc.
geirm@adeptra.com
+1-203-247-1713



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: get method of an unmodifiableList

Posted by Juan Dellarroquelle <ra...@usa.net>.
I mean if I have this: $myRegularList.get(0) on a not unmodifiableList and
in that position I have
a String object, Velocity renders the right String value.
But if I have the same on an unmodifiableList, it will render
"$myUnmodifiableList.get(0)",
and if I have $!myUnmodifiableList.get(0), it will render out nothing.

Thanks,
Juan.

----- Original Message -----
From: "Geir Magnusson Jr." <ge...@adeptra.com>
To: <ve...@jakarta.apache.org>
Sent: Tuesday, August 13, 2002 3:24 PM
Subject: Re: get method of an unmodifiableList


> On 8/13/02 11:07 AM, "Juan Dellarroquelle" <ra...@usa.net> wrote:
>
> > Hello,
> >
> > I noticed that when I call get(int) method of a java.util.List, it
returns
> > the right object stored in it,
> > but when the get(int) method is called on a java.util.List returned by
> > Collections.unmodifiableList(java.util.List)
> > it returns nothing.
> > When I say "I call get(int)" I mean $myUnmodifiableList.get(0) inside a
> > Velocity Template file.
> >
> > Is this the spected behavior?
> >
>
> What do you mean by "returns nothing"?
>
> Do you see anything in the template or the log?
>
>
>
> --
> Geir Magnusson Jr.
> Research & Development, Adeptra Inc.
> geirm@adeptra.com
> +1-203-247-1713
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: get method of an unmodifiableList

Posted by "Geir Magnusson Jr." <ge...@adeptra.com>.
On 8/13/02 11:07 AM, "Juan Dellarroquelle" <ra...@usa.net> wrote:

> Hello,
> 
> I noticed that when I call get(int) method of a java.util.List, it returns
> the right object stored in it,
> but when the get(int) method is called on a java.util.List returned by
> Collections.unmodifiableList(java.util.List)
> it returns nothing.
> When I say "I call get(int)" I mean $myUnmodifiableList.get(0) inside a
> Velocity Template file.
> 
> Is this the spected behavior?
> 

What do you mean by "returns nothing"?

Do you see anything in the template or the log?



-- 
Geir Magnusson Jr. 
Research & Development, Adeptra Inc.
geirm@adeptra.com
+1-203-247-1713



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>