Jonathan,
Yes, I would be very interested in learning more about number one on the list (handle nested indexed lists). I'd also like to know if she ever looked into JavaScript validation of indexed properties. That's another item that I've posted here. I did receive a response that it is basically "stubbed out" in the current validation code. If you have indexed properties, no JavaScript validation for them.
Thanks for your response,
TR
[EMAIL PROTECTED] wrote:
Hello,
One of my co-workers was looking into something like this and was not able to find a solution. She ended up modifying commons-validator. Below is a copy and paste from her cvs commit for Field.java
1. handle nested indexed lists
2. continue validating until all errors have been found - instead of stopping after the first error is found
3. handle maps as well as lists?
However our development project has been put on hold, so the modifications don't have a lot of mileage on them. I don't know if she can post here, because she's not on the list, so let me know if you want to find out more.
Jonathan Moran [EMAIL PROTECTED]
Terry Roe <[EMAIL PROTECTED]> wrote on 09/14/2004 12:54:59 PM:
Hubert,
Thank you for your response. At present, I am using the Validator for my first level of indexed properties and custom validation for the second level. I'd really like to use the Validator for everything as it
makes it much easier for maintenance and makes the code clearer when you
don't use two (or more) different techniques for validation.
I'm finding it hard to believe that there aren't other folks trying to do the same thing, however. As I mentioned, I've done a lot of searching for information on this topic and come up empty. All of the examples in books, articles, and web tutorials deal with the nice, clean
first level of indexed properties and nesting. I'd sure like to see some of the "gurus" who are writing these books and articles take the next step and start putting some meat on the examples. I find that there is plenty of information beginners using the technologies separately. Once you start combining the various tools and start doing some real work, however, the effort to try to get things done and/or find information increases exponentially. I was hoping this mailing list might be the port in the storm I was seeking. I'm still hoping and
hopeful...
Thanks again,
TR
Hubert Rabago wrote:
Terry,
I share your concern about OT messages drowning out valid Struts questions. However, in this particular case, it could be a matter of not a whole lot of people having experience with the problem.
For the situation you have, I have to say I just avoided it when I encountered it. At the time, I needed more out of my form than what I wanted to do with Dyna*Form anyway, so I went the traditional ActionForm way and did my validation in the validate() method.
I don't know enough about validator in order to confirm that multi-level indexed property validation is not supported, but if I *had* to guess, I'd say it isn't. If I'm right, then other options you can look at are creating a custom validator, or using the traditional validate() method (on an ActionForm or a DynaActionForm extension).
Hubert
On Tue, 14 Sep 2004 11:28:51 -0600, Terry Roe <[EMAIL PROTECTED]>
wrote:
Greetings,
I find it interesting that most of the recent activity on this mailing
list has to do with items such as .NET, AOP, Flash, Crystal Reports,
and
even Notepad! I don't mind the off topic posts, as they are usually
at
least tangentially related to the topic of this list and are
interesting
in themselves. However, I have posted a couple of Struts questions
dealing with production code I am trying to develop and are directly
related to Struts usage. I received a confirmation that one item
wasn't
currently supported in Struts (indexed property validation with JavaScript), but no suggestions on how I might work around it, and another on which I received no help, described below.
I'd think there'd be at least one or two gurus watching this list that
could at least say "you can't do that" or" here's what you might try."
I've seen the big guns respond to "easier" issues, but no one
addresses
"tough" ones like the one below. Maybe it's too much effort, or maybe
I've breached protocol somehow in the way I've asked for help. It
would
be nice to at least get a response to an issue that is directly
related
to the topic of this mailing list.
I don't mean to be rude, and I hope I'm not coming across that way.
But
I've searched and searched for information on the issue below and have
come up empty. I came to the one place that I thought would be of
some
help and have received no response. Could someone please tell me
where
to go (and, yes, you may say GTH if that is the correct answer) to
find
answers to questions on Struts functionality and usage?
Thanks,
TR
Terry Roe wrote: Re: Validation for Two Levels of Indexed Properties
Can Struts validate more than one level of indexed properties? First
level works great. Love it. I've tried the following (phaseList and
procedureList are two indexed properties) to get more than one level
to
work without success:
<field property="units" indexedListProperty="plan.phaseList.procedureList" depends="required,intRange">
<field property="units" indexedListProperty="plan.phaseList[].procedureList" depends="required,intRange">
<field property="procedureList.units" indexedListProperty="plan.phaseList" depends="required,intRange">
<field property="procedureList[].units" indexedListProperty="plan.phaseList" depends="required,intRange">
Is multi-level, indexed property validation supported? If so, can
someone relate the syntax to use? If not, can someone confirm than
only
one level of indexed property validation is supported?
TR
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]