Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Struts
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Struts
Using HashMap in ActionForm class
ram gaurav
Ranch Hand
Posts: 208
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi
In my page i like to write like this:
<html:form action="/hashmaptest">
<html:text property= "setValue(firstName)" />
<html:submit property="submit"/>
</html:form>
means i want to make a HashMap in ActionForm class.
Please tell me that how to code for ActionForm Class.
Thanks
Regards
Gaurav
Merrill Higginson
Ranch Hand
Posts: 4864
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
See the heading "Mapped Properties" in
this link
for an explanation of how to use mapped properties.
In your example, the following would work:
<html:text property="myMap(firstName)" />
provided you have a HashMap in your ActionForm bean and getMyMap(
String
key) and setMyMap(String key, String value) methods.
Merrill
Consultant,
Sima Solutions
And when my army is complete, I will rule the world! But, for now, I'm going to be happy with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
LookupDispatchAction - Missing message
Struts with ValueObject in HashMap
add collection values
Hashmap calling (Collection not found error)
ActionForm access Via DynaActionForm?
More...