I'm having a little trouble with the "conditionalvisitor" validator in Struts2. The "conditionalvisitor" validator is supposed to redirect the validation to the model, based on a condition. In my case, it is performing both sets of validation. This is causing false validation errors in my form.
My form has two radio buttons like so:
I'm using the ModelDriven approach and I have a single CRUD action (a la the Struts 2 In Action book). Inside that action, I have a "save" method, and my action alias looks like "CrudAction-save-validation.xml"
Here is the snippet from my CrudAction-save-validation.xml.
Normally, I'd never use the "==" to compare two strings, but this is how it is described on the Struts2 site here
I'm running this on a Websphere 6.1 server.
Has anyone encountered this before, and if so, what did you do? Unfortunately, there's not a lot of information about the "conditionalvisitor" validator from Google searches.
And inside of my fortune cookie was this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop