This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
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).
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.