• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Apache Commons Validation Framework

Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am implementing a validation framework based on the Apache Commons Validation Framework. I am using this framework in conjunction with JSF. The program flow is the following. Data is populated in a Web form and the user clicks the submit button. The fields of the form are bound to a managed bean. An action method linked to the submit button executes and passes the managed bean to the Apache validator. The issue that I'm running into is that the validator requires that the data in the managed bean that's being passed in be a String. I would like to store data in the managed bean not as strings, but as integers, longs, floats, etc. The question is, if the managed bean stores data other than String type, how do I get the Apache validator to validate it. Note that I have the code for the Apache validator so if I knew how to modify the code I can.

I don't have the option of using the JSF validation framework (which allows the bean to have data other than string).

Posts: 14691
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't help you as I'm not using that library, but I think that you might be misunderstanding the usage of that library. There are a bunch of validators which accepts many different kind of types, not only Strings.
    Bookmark Topic Watch Topic
  • New Topic