RE: tags to deal with hashmaps

2003-02-19 Thread Jacob Hookom
Hello,
The same place you downloaded struts has documentation on how to accomplish
getting values from hashmaps.

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

-Bocaj

| -Original Message-
| From: asatrasala [mailto:[EMAIL PROTECTED]]
| Sent: Wednesday, February 19, 2003 8:24 PM
| To: [EMAIL PROTECTED]
| Subject: tags to deal with hashmaps
| 
| Hello,
| Are there any tags to get the values from hashmaps
| 
| -Aswath
| 
| 
| 
| 
| -
| 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: tags to deal with hashmaps

2003-02-19 Thread asatrasala
Followup question.
How can I do a lookup, instead of interating over the hashmap.

Following is my scriplet code, can anyone help me to convert the 
following code to use
taglibs.  I don't have any problem using iterate tag just for a 
collection.  But, don't know what to do with 'hashmaps'

Thanks
-Aswath


%  Collection colBeans = (Collection)request.getAttribute 
(Constants.REQ_COLLECTION1) ;
   HashMap map = (HashMap)request.getAttribute (Constants.REQ_HASH) ;
   Iterator iter = colBeans.iterator () ;
   ProjectBean projBean ;
   while (iter.hasNext ()) {
   jobBean = (com.transpak.dbbeans.JobBean)iter.next () ;
   projBean = (ProjectBean)map.get(new Long(jobBean.getID())) ; %
   tr
   td%=projBean.getCcustno()%/td
   td%=projBean.getCsono()%
   td%=jobBean.getID()%
   /tr
   %}%


[EMAIL PROTECTED] wrote:

Hello,
The same place you downloaded struts has documentation on how to accomplish
getting values from hashmaps.

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

-Bocaj

| -Original Message-
| From: asatrasala [mailto:[EMAIL PROTECTED]]
| Sent: Wednesday, February 19, 2003 8:24 PM
| To: [EMAIL PROTECTED]
| Subject: tags to deal with hashmaps
| 
| Hello,
| Are there any tags to get the values from hashmaps
| 
| -Aswath
| 
| 
| 
| 
| -
| 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]

 


--
Your favorite stores, helpful shopping tools and great gift ideas. 
Experience the convenience of buying online with Shop@Netscape! 
http://shopnow.netscape.com/



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



RE: tags to deal with hashmaps

2003-02-19 Thread Hookom, Jacob John
You want to look at taglibs -- standard aka JSTL, also follow the links to download 
the user manual that includes a how to.  In addition, the JSTL (standard taglibs) 
download includes a deployable war that includes easy to follow examples of each tags 
usage.  You can easily do what you are doing in a scriplet with JSTL.
 
Happy Reading---

-Original Message- 
From: asatrasala [mailto:[EMAIL PROTECTED]] 
Sent: Wed 2/19/2003 8:51 PM 
To: Struts Users Mailing List 
Cc: 
Subject: Re: tags to deal with hashmaps



Followup question.
How can I do a lookup, instead of interating over the hashmap.

Following is my scriplet code, can anyone help me to convert the
following code to use
taglibs.  I don't have any problem using iterate tag just for a
collection.  But, don't know what to do with 'hashmaps'

Thanks
-Aswath


%  Collection colBeans = (Collection)request.getAttribute
(Constants.REQ_COLLECTION1) ;
HashMap map = (HashMap)request.getAttribute (Constants.REQ_HASH) ;
Iterator iter = colBeans.iterator () ;
ProjectBean projBean ;
while (iter.hasNext ()) {
jobBean = (com.transpak.dbbeans.JobBean)iter.next () ;
projBean = (ProjectBean)map.get(new Long(jobBean.getID())) ; %
tr
td%=projBean.getCcustno()%/td
td%=projBean.getCsono()%
td%=jobBean.getID()%
/tr
%}%


[EMAIL PROTECTED] wrote:

Hello,
The same place you downloaded struts has documentation on how to accomplish
getting values from hashmaps.

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

-Bocaj

| -Original Message-
| From: asatrasala [mailto:[EMAIL PROTECTED]]
| Sent: Wednesday, February 19, 2003 8:24 PM
| To: [EMAIL PROTECTED]
| Subject: tags to deal with hashmaps
|
| Hello,
| Are there any tags to get the values from hashmaps
|
| -Aswath
|
|
|
|
| -
| 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]

 


--
Your favorite stores, helpful shopping tools and great gift ideas.
Experience the convenience of buying online with Shop@Netscape!
http://shopnow.netscape.com/



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