czw., 14 mar 2019 o 21:38 Prasanth napisał(a):
>
> Sorry if I caused any confusion. This thread was meant to discuss String
> keys. I do have forms where I am using numeric keys and they work fine.
>
> I think I found a solution to my problem. Struts seems to expect single
> quotes for the keys
Sorry if I caused any confusion. This thread was meant to discuss String keys.
I do have forms where I am using numeric keys and they work fine.
I think I found a solution to my problem. Struts seems to expect single quotes
for the keys when the key is string. Updated code is shown below. Also
czw., 14 mar 2019 o 20:11 Prasanth napisał(a):
> If there a setting for struts that need to be changed to allow non numeric
> keys?
Nothing like that, but I suggest to start over because you first
reported that you want to have a numeric key and now you say you
don't. So maybe start a new topic
>>> key 2432-123 is not further Long. It's String.
>>>
>>> Regards.
>>>
>>>> -Original Message-
>>>> From: Lukasz Lenart
>>>> Sent: Tuesday, March 12, 2019 10:52 AM
>>>> To: Struts Users Mailing List
>
;>
>>> -Original Message-
>>> From: Lukasz Lenart
>>> Sent: Tuesday, March 12, 2019 10:52 AM
>>> To: Struts Users Mailing List
>>> Subject: Re: HashMap with String as key
>>>
>>> pon., 11 mar 2019 o 18:41 Prasanth napisał(a
Message-
>> From: Lukasz Lenart
>> Sent: Tuesday, March 12, 2019 10:52 AM
>> To: Struts Users Mailing List
>> Subject: Re: HashMap with String as key
>>
>> pon., 11 mar 2019 o 18:41 Prasanth napisał(a):
>>> When you have a HashMap backed form and String
(regarding your previous emails background) Please also consider that the key
2432-123 is not further Long. It's String.
Regards.
>-Original Message-
>From: Lukasz Lenart
>Sent: Tuesday, March 12, 2019 10:52 AM
>To: Struts Users Mailing List
>Subject: Re: HashMa
pon., 11 mar 2019 o 18:41 Prasanth napisał(a):
> When you have a HashMap backed form and String as key, are there any
> restrictions on the characters allowed?
>
> I have keys like "2432-123" as I have to incorporate two ids in the key. When
> I have these keys the HashMap is not getting populat
Hi,
When you have a HashMap backed form and String as key, are there any
restrictions on the characters allowed?
I have keys like "2432-123" as I have to incorporate two ids in the key. When I
have these keys the HashMap is not getting populated. If I change it, so that
there is only one id (n
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
Sure, I prefer to use JSTL rather than Struts taglib, but
should be replaced too by JSTL or Struts tags.
using this way is best case for me, I have added a Map to the action form to
get it works.
Thanks Mark for your help.
On 3/26/06, Mark Lowe <[EMAIL PROTECTED]> wrote:
>
> On 3/26/06, Ah
On 3/26/06, Ahmed Hashim <[EMAIL PROTECTED]> wrote:
> Thanks Mark,
> I tried it and it is working fine with Valid XHTML output, It is the best
> solution I have till now.
> But I hope that I can make it using Struts Tags if anyone know.
I dont think there is, the handy thing with jstl is the way t
Thanks Mark,
I tried it and it is working fine with Valid XHTML output, It is the best
solution I have till now.
But I hope that I can make it using Struts Tags if anyone know.
Thanks.
On 3/26/06, Mark Lowe <[EMAIL PROTECTED]> wrote:
>
> On 3/26/06, Ahmed Hashim <[EMAIL PROTECTED]> wrote:
> > De
On 3/26/06, Ahmed Hashim <[EMAIL PROTECTED]> wrote:
> Dear All,
>
> <%
> java.util.HashMap rawSourceMap=new java.util.HashMap();
> rawSourceMap.put("id", "123");
> rawSourceMap.put("name", "ahmed");
> pageContext.setAttribute("ourrefLink",rawSourceMap);
> %>
>
>
>
>
>
> I want to
Dear All,
<%
java.util.HashMap rawSourceMap=new java.util.HashMap();
rawSourceMap.put("id", "123");
rawSourceMap.put("name", "ahmed");
pageContext.setAttribute("ourrefLink",rawSourceMap);
%>
I want to replace the scriptlet with a tag but I don't know
how will i add the values
26 matches
Mail list logo