• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Dynavalidation, and problems with.

 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy all.

I'm curious as to exactly how dynavalidation works. I've read the chapters on the web (three different books), but they all discuss syntax.

In a program I'm working on, seemingly my server-side validation should work. I have the configuration set in validation.xml, I have struts-config set up correctly, and I'm not using any client side validation.

I know it should work, because I'm using the exact same layout as I did on another page which does work.

Hence, I have a few questions:

1) Can a subtle error somewhere in the code effect the validator somewhere else? Or is each validation unique and individual?

2) Is there anyway I can see, during run-time, exactly what my program is checking during validation?

3) At one time, earlier, I had to use dyna.validatate to force a validation. But now, that's still coming up empty (even though there are obvious errors, like required fields not being present). What could cause this?

4) I'm using validation 1.1, instead of 1.2. Were there any known bugs in 1.1 along these lines?

Edit: I should mention that all my variables in the form-beans are either Strings or ArrayLists. Is there any problems with having the latter?

Any thoughts or suggestions are, of course, more then welcome.
[ July 19, 2004: Message edited by: Karl Beowulph ]
 
Karl Beowulph
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Alright, my error has just taken a turn to the odder.

I found out why it's not validating one of my modules, that module keeps trying to use a validation.xml file that's not assigned to it.

An example:

Let's say I've got module's A, B, and C. Each module has it's own struts-config file (struts-config-A.xml etc.) and it's own validation (validation-A.xml etc.).

The problem is this. Module B is trying to use validation-C.xml. It's clearly configured in struts-config-B.xml to use validation-B.xml though.

Is this a known bug in struts? Anyone know a workaround?
 
Karl Beowulph
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Alright, I'm pretty sure that Struts will (as of this time) only allow you to configure one validation-rules.xml and validation.xml, each successive configuration simply over-riding the previous.

In essence, that means I'm going to have to have either one massive validation.xml file, or try and assign it to different classes.
 
They gave me pumpkin ice cream. It was not pumpkin pie ice cream. Wiping my tongue on this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic