File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Problem with setting values in hashmap in struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem with setting values in hashmap in struts" Watch "Problem with setting values in hashmap in struts" New topic
Author

Problem with setting values in hashmap in struts

Hd Desai
Ranch Hand

Joined: Aug 04, 2003
Posts: 65
Hi,

My project is on Struts 1.2.

I am having an arraylist say List and that list has litst of Objects say obj.

Now Obj has one filed as hashmap.

When I try to poupalte these hashmap values in different textboxes in JSP it is working fine. But when I hit Submit values this hashmap is not getting populated.

Here is code snippet...

<c:forEach items="${List[1].TermAmtMap}" var="th2Obj">

<html:text property="${th2Obj.key}" value="${th2Obj.value}" size="7"/>%

(<cut value="${th2Obj.key}" /> Y)

</c:forEach>

Please let me know how this can be handled.

Thanks in advance
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8925
    
    9

Have a look at Indexed Properties.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Hd Desai
Ranch Hand

Joined: Aug 04, 2003
Posts: 65
Hi Joe,

Thank you for the suggestion, I will take a look at that.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with setting values in hashmap in struts