problem in logic:iterate using HashMap

2003-06-25 Thread O_Parthasarathy Kesavaraj
Hi,
 I tried the same mentioned by Rick. But it gives me the following
error.

java.lang.NullPointerException
at java.util.Hashtable.get(Hashtable.java:329)
at
org.apache.jasper.runtime.PageContextImpl.findAttribute(PageContextImpl.java
:308) 

My code goes like this


  




Here "useradmins" is HashMap in a formbean (I haven't specified
name="formbeanName" [because it is Not mandatory]). Surprisingly the error
is for Hashtable!!!

Please help me.

> --
> From: Rick Reumann[SMTP:[EMAIL PROTECTED]
> Reply To: Struts Users Mailing List
> Sent: Tuesday, June 24, 2003 8:28 PM
> To:   Struts Users Mailing List
> Subject:  RE: logic:iterate using HashMap
> 
> On Tue, 2003-06-24 at 10:46, O_Parthasarathy Kesavaraj wrote:
>  
> > > O_Parthasarathy Kesavaraj írta:
> > Thanks Tib.I did look at the docs.But i got struck up.If u have any
> > sample code pls send.
> 
> I admit the docs I think are lame on this area. This should work..
> 
> 
>  - 
> 
> 
> 
> JSTL should be something like...
> 
> 
>-
>   
> 
> 
> -- 
> Rick
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: logic:iterate using HashMap

2003-06-24 Thread O_Parthasarathy Kesavaraj
Thanks rick.I loaded a select box containing id and values like this




Regards
Partha


> --
> From: Rick Reumann[SMTP:[EMAIL PROTECTED]
> Reply To: Struts Users Mailing List
> Sent: Tuesday, June 24, 2003 8:28 PM
> To:   Struts Users Mailing List
> Subject:  RE: logic:iterate using HashMap
> 
> Thanks rick.I loaded a select box containing id and values like this
>name="companies" />
>   
>collection="company" property="key" labelProperty="value"/>
>   
> Regards
> Partha
> On Tue, 2003-06-24 at 10:46, O_Parthasarathy Kesavaraj wrote:
>  
> > > O_Parthasarathy Kesavaraj írta:
> > Thanks Tib.I did look at the docs.But i got struck up.If u have any
> > sample code pls send.
> 
> I admit the docs I think are lame on this area. This should work..
> 
> 
>  - 
> 
> 
> 
> JSTL should be something like...
> 
> 
>-
>   
> 
> 
> -- 
> Rick
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: logic:iterate using HashMap

2003-06-24 Thread Rick Reumann
On Tue, 2003-06-24 at 10:46, O_Parthasarathy Kesavaraj wrote:
 
> > O_Parthasarathy Kesavaraj írta:
>   Thanks Tib.I did look at the docs.But i got struck up.If u have any
> sample code pls send.

I admit the docs I think are lame on this area. This should work..


 - 



JSTL should be something like...


   -
  


-- 
Rick

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: logic:iterate using HashMap

2003-06-24 Thread O_Parthasarathy Kesavaraj


> --
> From: Gemes Tibor[SMTP:[EMAIL PROTECTED]
> Reply To: Struts Users Mailing List
> Sent: Tuesday, June 24, 2003 7:46 PM
> To:   Struts Users Mailing List
> Subject:  Re: logic:iterate using HashMap
> 
> O_Parthasarathy Kesavaraj írta:
Thanks Tib.I did look at the docs.But i got struck up.If u have any
sample code pls send.
Regards
Partha
> >How to iterate thro HashMap using logic:iterate?
> >  
> >
> You did not look into the docs, did you?
> 
> http://jakarta.apache.org/struts/userGuide/struts-logic.html#iterate
> 
> Normally, each object exposed by the iterate tag is an element of the 
> underlying collection you are iterating over. However, if you iterate 
> over a |Map|, the exposed object is of type |Map.Entry| that has two 
> properties:
> 
> * |key| - The key under which this item is stored in the underlying
> Map.
> * |value| - The value that corresponds to this key.
> 
> 
> Tib
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: logic:iterate using HashMap

2003-06-24 Thread Gemes Tibor
O_Parthasarathy Kesavaraj írta:

How to iterate thro HashMap using logic:iterate?
 

You did not look into the docs, did you?

http://jakarta.apache.org/struts/userGuide/struts-logic.html#iterate

Normally, each object exposed by the iterate tag is an element of the 
underlying collection you are iterating over. However, if you iterate 
over a |Map|, the exposed object is of type |Map.Entry| that has two 
properties:

   * |key| - The key under which this item is stored in the underlying Map.
   * |value| - The value that corresponds to this key.
Tib


logic:iterate using HashMap

2003-06-24 Thread O_Parthasarathy Kesavaraj
How to iterate thro HashMap using logic:iterate?
Regards
Partha


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]