Re: html:errors for indexed properties

2004-08-31 Thread dhay

Do you want to supply a patch?!


|-+>
| |   Milind Rao   |
| |   <[EMAIL PROTECTED]|
| |   m>   |
| ||
| |   08/31/2004 09:40 |
| |   AM   |
| |   Please respond to|
| |   "Struts Users|
| |   Mailing List"|
| ||
|-+>
  
>|
  |
|
  |   To:   Struts Users Mailing List <[EMAIL PROTECTED]>  
   |
  |   cc:  
        |
  |       Subject:  Re: html:errors for indexed properties 
|
  
>|




Worked well.  Thanks.

Used html:errors instead of the message for brevity.  It would have
been nice if html:errors could have been set with indexed="true".
Would have prevented the scriplet and been more consistent.

Regards
Milind

-
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]



Re: html:errors for indexed properties

2004-08-31 Thread Lynn Stevens
instead of the scriptlet, I think you could use html-el and do the 
following:


The el notation forces the ndx to evaluate
From: Bill Siggelkow <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: html:errors for indexed properties
Date: Tue, 31 Aug 2004 08:01:15 -0400
You have to use the html:messages tag in a loop to generate the property 
values in a loop.
Here's an example --

 
  id="orders" indexId="ndx">


 

 		  		  



 

 		  		  





Enjoy!
Bill Siggelkow
Milind Rao wrote:
I have googled and searched the mailing list, but couldn't find an
answer to this.
I have a DynaValidatorForm containing a collection of objects
presented using the logic:iterate tag in the JSP.  The validation of
the objects in the collection is done in the validation.xml file using
something like

   indexedListProperty= "regularTimingList"
   depends="integer, intRange">


resource="false"/>

resource="false"/>
   
min0
   
max24
 

This creates an Action error for the property
regularTiming[i].closeHour.  'i' being the index  of the collection
that fails validation.
What do I use for the "property" element of the "html:errors" tag?  I
hardcoded a property of "regularTimingList[1].closeHour" to see if the 
error shows up on the page if the close hour of the 2nd item in
the collection  is invalid.  It does.  But obviously, I don't want to
do this for every record in the collection.  What I need is an
equivalent of "logic:iterate" tag for errors.   Any pointers to doing
this would be appreciated.


-
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]


Re: html:errors for indexed properties

2004-08-31 Thread Milind Rao
Worked well.  Thanks.  

Used html:errors instead of the message for brevity.  It would have
been nice if html:errors could have been set with indexed="true". 
Would have prevented the scriplet and been more consistent.

Regards
Milind

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:errors for indexed properties

2004-08-31 Thread Bill Siggelkow
You have to use the html:messages tag in a loop to generate the property 
values in a loop.
Here's an example --

 
  id="orders" indexId="ndx">


 

 		  		  



 

 		  		  





Enjoy!
Bill Siggelkow
Milind Rao wrote:
I have googled and searched the mailing list, but couldn't find an
answer to this.
I have a DynaValidatorForm containing a collection of objects
presented using the logic:iterate tag in the JSP.  The validation of
the objects in the collection is done in the validation.xml file using
something like

   indexedListProperty= "regularTimingList"
   depends="integer, intRange">


resource="false"/>

resource="false"/>
   
min0
   
max24
 

This creates an Action error for the property
regularTiming[i].closeHour.  'i' being the index  of the collection
that fails validation.
What do I use for the "property" element of the "html:errors" tag?  I
hardcoded a property of "regularTimingList[1].closeHour" to see if 
the error shows up on the page if the close hour of the 2nd item in
the collection  is invalid.  It does.  But obviously, I don't want to
do this for every record in the collection.  What I need is an
equivalent of "logic:iterate" tag for errors.   Any pointers to doing
this would be appreciated.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]