struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lowe <mark.l...@boxstuff.com>
Subject Re: Array Validation
Date Thu, 29 Apr 2004 13:40:11 GMT
if you've a getRow(int index) method then

indexedListProperty="row"

I got stumpt on the same as you where i was using the getRows() rather 
than getRow(int index).




On 29 Apr 2004, at 14:56, Glenn, Scott wrote:

> I have a form which contains a number of rows of data and am 
> validating each
> row using the indexedListProperty validation shown below:-
>
> 	<form name="RCF">
> 		<field property="newName"
> 			 indexedListProperty="rows"
> 			 depends="required">
> 		       <arg0 key="rename.newName"/>
> 		</field>
> 	</form>
>
> The form bean is basically:-
>
> 	public class RenameForm extends BaseForm
> 	{
> 		private List rows = null;
>
> 		. . .
> 	}
>
> where each row element is an instance of
>
> 	public class RenameFormRow
> 	{
> 		private String oldName = null;
> 		private String newName = null;
> 		. . .
> 	}
>
> Simple stuff...
>
> If I have several rows of data on screen, and I leave ALL the "newName"
> fields blank and submit the form, the Struts validator only seems to 
> report
> that the first "newName" field is blank.  If I enter a value for it and
> re-submit, then it detects that the next "newName" field is blank, and 
> so on
> ....
>
> Normally on form submission all validation would be fully executed, 
> building
> up a list of error messages.  Does indexedProperty validation work
> differently or am I doing something wrong?
>
> Many thanks,
>
> Scott.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message