There's and indexedListProperty attribute in validator for the purpose of which you speak, and it works although not for the javascript generation.
The array of form elements aren't generated in the javascript, but the js itself does handle indexed properties.. for example if you hard code myobj[0].myproperty in validator it works. So the only piece of the validator puzzle thats missing is generating the js array of indexed form elements .. If i'm not making any sense, have a before and after look at the javascript.
I think fixing the validator to generate indexed elements would be the fastest way of dealing with this, or add this to bugzilla. A hack could be to just layer some most js onto the page.
If you using the html:errors stuff and cant get it to spit them out, you could try bean:messages and spit out the errors like that, they are there (the errors) they're just hiding.
<logic:messagesPresent> <pre> <html:messages id="error"> <bean:write name="error"/> </html:messages> <pre> </logic:messagesPresent>
rather than
<pre> <html:errors /> </pre>
Cheers Mark
Hello, I'm using struts 1.1. I thought this would be relatively simple, but I can't figure it out. I've checked my book "Programming Jakarta Struts" and searched the archives. All got from the archives is a bunch of people asking this same question, but NO responses. Please help if you've got the secret.
Basically I have a form bean which has some properties that are collections (Vectors) of other form beans (indexed properties of collections). These nested form beans also need to be validated. The page displays fine, and upon submission, all the data is populated correctly in the form (nested props and all). However, the validator just totally ignores the nested beans. What do I need to do in my validations.xml to get it to validate nested form beans? I've tried the following (totally made it up)...
<field property="my_collection_property" indexedListProperty="form_bean_name">
.. and that "form_bean_name" is the name of another form entry in my validation.xml.
Anybody know where I'm going wrong? Thank you!
__________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com
--------------------------------------------------------------------- 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]