• 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

validators an typeconvertors

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All

Hope you all are in good spirits....
I am using struts2 for the first time and have got stuck with Typeconvertors.I have made a type convertor which is working fine as of now with fewissue.
1.I am unable to do a mandatory check from the type convertors...is it not possible.
2.To use an alternative i used the struts 2 validation framework for the required check and all other checks via type convertor.But this creates a problem.Whenever the field is blank the validator displays the message ,but when the field is not blank and has a single character entry(valid entry is atleast 3 characters...his check is done in the typeconvertor)the typeconvertor message is displayed as expected ,but at the same time the validation framework mesage is also displayed because once the typeconvertor is called ,a null value is returned to the action class,which inturn is picked by the validation framework.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic