This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes DefaultTypeConverter Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "DefaultTypeConverter Problem" Watch "DefaultTypeConverter Problem" New topic
Author

DefaultTypeConverter Problem

shukla raghav
Ranch Hand

Joined: Aug 03, 2008
Posts: 200
1. Here is a small Test App where a user enters two sets of coordinates in following formats (x1,y1) and (x2,y2).
2. I have created a converter of Type DefaultTypeConverter that extracts the value of x and y coordinate from the request parameters and convert the coordinates into an Object of Type Point and return the Point Objects that are mapped with the action class Properties.

Problem : The parameters are not mapped to the properties and rather the struts sends back the input page with invalid field value error messages.

Struts.xml



ApplicationFormDetails.jsp



PointConverter.java



Point.java


Origin.java (enum)


ApplicationFormAction.java


ApplicationFormAction-conversion.properties


ApplicationFormSubmit.jsp
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: DefaultTypeConverter Problem
 
Similar Threads
Wanted: How to use Strategy Pattern with Shapes?
JTextField/JPanel with round edged corners
TypeCasting or TypeConversion
TypeConversion with Struts 2
Need help writing a code involving bar charts!