Example code:
On 9/21/07, Dave Newton <[EMAIL PROTECTED]> wrote:
>
> --- j alex <[EMAIL PROTECTE
--- j alex <[EMAIL PROTECTED]> wrote:
>
The entire expresion is OGNL, not just the "key" value
from the stack.
d.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
> > > > > > wrote:
> > > > > >
> > > > > > > If I remember correctly, to use the s:iterator
> > > > > tag,
> > > > > > > you have to use an
> > > > > > > object that has an 'iterator
t; > you have to use an
> > > > > > object that has an 'iterator()' method. HashMap
> > > > does
> > > > > > not implement
> > > > > > java.util.List...
> > > > > >
> > > > > > To iterate over
--- Josh Vickery <[EMAIL PROTECTED]> wrote:
> I'm a little curious about the inclusion of the
> double parentheses at the end of "entrySet" -- OGNL,
> as far as I am concerned, is a bit of strange beast.
It's a method call -- not property access.
d.
that has an 'iterator()' method. HashMap
> > > does
> > > > > not implement
> > > > > java.util.List...
> > > > >
> > > > > To iterate over a Hashmap, get the keyset
> > > > > [tempMap.ketSet()]
erate over a Hashmap, get the keyset
> > > > [tempMap.ketSet()] from it.
> > > > The keyset is a List and you can get an iterator
> > > > from there.
> > > >
> > > > -Wes
> > > >
> > > > -Original Message-
>
; [tempMap.ketSet()] from it.
> > > The keyset is a List and you can get an iterator
> > > from there.
> > >
> > > -Wes
> > >
> > > -Original Message-
> > > From: Cory D. Wiles [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesda
hmap, get the keyset
> > [tempMap.ketSet()] from it.
> > The keyset is a List and you can get an iterator
> > from there.
> >
> > -Wes
> >
> > -Original Message-
> > From: Cory D. Wiles [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, September
mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 12, 2007 2:28 PM
> To: user@struts.apache.org
> Subject: Iterate Hashmap with s:iterate
>
> I have an action that returns a hash map that I need
> to output both the
> key and value, but I can't figure out how to access
&
re.
-Wes
-Original Message-
From: Cory D. Wiles [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 12, 2007 2:28 PM
To: user@struts.apache.org
Subject: Iterate Hashmap with s:iterate
I have an action that returns a hash map that I need to output both the
key and value, but I can't
I have an action that returns a hash map that I need to output both the key
and value, but I can't figure out how to access each property with
s:iterate. Any suggestions would help.
The HashMap is being set in my action and returned populated (verified with
).
// Action snippet
Iterator category
12 matches
Mail list logo