• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Validation

 
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I want to validate certain fields for required format and as Required.

I am using org.apache.struts.validator.DynaValidatorActionForm as the type for the deliveryForm in struts config.xml.

My field is a group of checkbox and I iterate this. My JSP code is




Delivery is defined as

<form-property name="delivery" type="com.company.user.dto.DeliveryPreferences"/> in struts config and possibleOptions is an array of LabelValueBean.


I have set up all the validations correctly in the validation.xml.

When I go to this page , the form gets displayed properly, but when I submit the form( to see if it validates the field), the form displays partially and thows an exception




but in the JSp when I write the Javacode to extract the values,





I get all the values printed properly......I want to know where am wrong..... Thx in advance

[ August 16, 2005: Message edited by: Mary Cole ]

[ August 16, 2005: Message edited by: Mary Cole ]
[ August 16, 2005: Message edited by: Mary Cole ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic