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 strange type converter problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "strange type converter problem" Watch "strange type converter problem" New topic
Author

strange type converter problem

yu naki
Greenhorn

Joined: May 12, 2010
Posts: 2
I have a hashMap<string,Set<postcode>>codeMap in action to receive a group of textfields values. Each map's value mapping with a textfield.

my convertFromString fuction, every is ok.

but when i want to convert the map back to textfield in result.jsp

<s:iterator value="codeMap">
<s:textfield value="%{value}><s:textfield>
</s:iterator>

the convertToString work but the parameter is NULL!!!

if I change the struts tag to:

<s:iterator value="codeMap">
<s:property/>
</s:iterator>

the convertToString function work well and the result page could display what I inputed in textfields

any know why struts can not forward map's value to convertToString? many thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: strange type converter problem
 
Similar Threads
How to validate content in dynamically generated textfields?
hide/show textfields in struts form
Struts 2: mathematical operations on status.index
data lost from JSP back to same Action (struts 2)
Struts 2: how to set response for ajax function call?