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 02-10-2008, 06:54 AM
Member
 
Join Date: Dec 2007
Posts: 38
rameshraj is on a distinguished road
validating selection list in struts!
Hello all,how can i validate the selection list in struts using validation.xml file.

I have the list populated in the following manner:
{code}<html:select property=...>
<htmlption value="">Select your gender</htmlption>
<htmlptions collection property=.....>
</html:select>{code}

If the user submits the page without selecting any options the default:"Select your gender" without any value will be posted and the validation should validate this and generate some error message on the same page.

Last edited by rameshraj : 02-10-2008 at 07:12 AM. Reason: code reason
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 02-13-2008, 12:47 PM
Member
 
Join Date: Nov 2007
Posts: 15
Poonam is on a distinguished road
Hi, U can validate property <html:select property=...>

check length or not null for this property.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 02-13-2008, 02:21 PM
Member
 
Join Date: Dec 2007
Posts: 38
rameshraj is on a distinguished road
Actually I wanted the jsp page where the selection list is printed as the input page in the struts-config.xml file.I think u understand. I need to validate using the struts validate=true property from the struts-config.xml file and not directly comparing the value what was posted after selecting and submitting the page.
I have already implemented the logic u said. Any way thank u very much for your kind response.
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
Validating ASCII character set JavaForums Java Blogs 2 09-15-2008 09:44 PM
radiobutton selection newtojava7 New To Java 1 03-17-2008 03:58 AM
Validating email address! rameshraj Advanced Java 1 02-18-2008 10:39 AM
Validating email address ravian New To Java 2 12-21-2007 09:42 AM
validating a string for numbers and letters? lockmac New To Java 1 08-09-2007 10:17 AM


All times are GMT +3. The time now is 03:03 AM.


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