This may help you:
http://wiki.apache.org/struts/StrutsCatalogLazyList
http://www.developer.com/java/ejb/article.php/3321521
http://www.developer.com/java/ejb/article.php/2233591

- Glenn




"Scott Purcell" <[EMAIL PROTECTED]> 
07/06/2005 09:19 AM
Please respond to
"Struts Users Mailing List" <user@struts.apache.org>


To
<user@struts.apache.org>
cc

Subject
Validation Help On Large Dynamic List






Hello,

I am using the struts framework for a project, and I am seeking advice on 
the following situation. To preface where I am, we have used server side 
validation (validation.xml) throughout the full project and all is good. I 
understand simple field validation and the attributes of the 
validation.xml file.

But as with any project, here is my problem: I have a database query that 
returns hundreds of records. The way this works, is we display the user 
list of keys, and defualt values, and they can change the values to their 
liking. 

eg:
Field1 (then in a textfield they get something like [field 1 default 
value]
Field2 [field2 default value]
and so on and so on.

Here is how the actual code looks on the page.
Now what my original page builder did, was take the value and also placed 
it in a hidden field for some type of database update later on. Hope this 
makes sense .

Agricultural Implements  <input type="text" name="gprID751464" 
value="Agricultural Implements">
<input type="hidden" name="origGprID751464" value="Agricultural 
Implements">

Agricultural Tractors <input type="text" name="gprID751499" 
value="Agricultural Tractors">
<input type="hidden" name="origGprID751499" value="Agricultural Tractors


But what is occuring is sometimes they remove the value and then there is 
no value. And I would like to validate this.
So my question is as follows:
If I have a database query with a lot of records that have rows like so:
key1 val1
key2 val2
key3 val3

How can I validate this for "required" on each value?

I have been reading about indexed validation but do not seem to have a 
handle on it.

Can anyone give some assistance, or ideas? I did not want to do this in 
simple javascript, as the rest of the site is all server side with 
Messages.


Thanks
Scott

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



Reply via email to