• 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

DefaultTypeConverter Problem

 
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Don't mess with me you fool! I'm cooking with gas! Here, read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic