File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Struts Type Convertors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Type Convertors" Watch "Struts Type Convertors" New topic

Struts Type Convertors

Anu Bagga

Joined: Jun 12, 2008
Posts: 3
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 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.
I agree. Here's the link:
subject: Struts Type Convertors
It's not a secret anymore!