Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-27-2007, 09:46 AM
Member
 
Join Date: Jul 2007
Posts: 1
aczuczor is on a distinguished road
Commons validator
Hi.

I am trying to use this framework for a web project, which uses ajax validation for fields triggered by onChange event on client side.

According to this I can post to the server only the formname,fieldname and the value parameters.

I spent a lot of time to find out how should I configure the validator object to the validate a String or an Intiger instead of a bean.

I copied the code base from the example shipped with commons validator source so I think that the most part of code and configuration files are OK.

The example name of the form field is age so I initialized the validator in this way :

Validator validator = new Validator(resources, "ValidateBean", "age");

and use this code to pass the value to validate :

validator.setParameter(Validator.FIELD_PARAM, %String or Integer or whatever% );

Always got the result message that age parameter is required.

I even tried to debug what does it do, and it seemed that validator is works only for beans.

Are there any way to validate simple values (not beans) with commons validator?

Thanks,
Attila
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sql validator Joe2003 Advanced Java 0 02-07-2008 06:23 PM
Using jakarta-commons threadpool (Tomcat) through JNDI zrrbite Advanced Java 0 12-14-2007 01:47 PM
Commons Library Framework 0.8.0 JavaBean Java Announcements 0 10-02-2007 05:13 PM
Struts Validator - JScript version of Validator ´validwhen´ Felissa Web Frameworks 1 07-06-2007 05:39 PM
org.apache.commons.mail.EmailException: Cannot find valid hostname Ed Advanced Java 2 07-02-2007 09:03 PM


All times are GMT +3. The time now is 04:06 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org