Re: nested:iterate Validator problem

2007-09-13 Thread Matthew Schrader
I have my beans inheriting ValidtorActionForm. Is there anything else 
that I need to do to turn on server-side validation?  At this point 
neither server-side or client-side validation is picking up this field.


Paul Benedict wrote:

I don't the client-side validator handles arrays? You should instead allow
server-side validation to take care of complex scenarios.

Paul

On 9/12/07, Matthew Schrader <[EMAIL PROTECTED]> wrote:
  

Users,

I have been googling like crazy to find a workaround, or fix, to the
problem of Validator not working properly with nested:iterate fields.
Below I have included what I am doing for the code incase I have
something wrong.  Please let me know if anyone knows anything.

My field is set up as:




the part of my jsp:




output to browser:




javascript that is put in browser:
function validateWineListForm(form) {
if (bCancel) {
return true;
} else {
var formValidationResult;
formValidationResult = validateRequired(form) &
validateMask(form);
return (formValidationResult == 1);
}
}

function WineListForm_required () {
 this.a0 = new Array("menuDisplayDescription", "Wine List Preamble
is required.", new Function ("varName",
"this.mask=/
^[a-zA-Z0-9\\\'\\,\\.\\-\\[\\]\\{\\}\\:\\;\\?\\/[EMAIL PROTECTED](\\)\\_\\+\\=
]*$/;  return this[varName];"));
}

function WineListForm_mask () {
 this.a0 = new Array("menuDisplayDescription", "Wine List Preamble
is invalid.", new Function ("varName",
"this.mask=/
^[a-zA-Z0-9\\\'\\,\\.\\-\\[\\]\\{\\}\\:\\;\\?\\/[EMAIL PROTECTED](\\)\\_\\+\\=
]*$/;  return this[varName];"));
}

I am expecting the _required() function to also have
menuCategoryDescription 0-2 added to the array.  How would this be
accomplished.

Thank you for any help in advance!


-
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: nested:iterate Validator problem

2007-09-13 Thread Paul Benedict
I don't the client-side validator handles arrays? You should instead allow
server-side validation to take care of complex scenarios.

Paul

On 9/12/07, Matthew Schrader <[EMAIL PROTECTED]> wrote:
>
> Users,
>
> I have been googling like crazy to find a workaround, or fix, to the
> problem of Validator not working properly with nested:iterate fields.
> Below I have included what I am doing for the code incase I have
> something wrong.  Please let me know if anyone knows anything.
>
> My field is set up as:
> indexedListProperty="menuCategories"
>depends="required">
>  key="WineListForm.MenuCategory.menuCategoryDescription"/>
> 
>
> the part of my jsp:
>  type="com.forwardspin.form.dining.MenuCategoryForm"
> indexId="menuCategoryCounter">
> 
> 
>
> output to browser:
> 
> 
> 
>
> javascript that is put in browser:
> function validateWineListForm(form) {
> if (bCancel) {
> return true;
> } else {
> var formValidationResult;
> formValidationResult = validateRequired(form) &
> validateMask(form);
> return (formValidationResult == 1);
> }
> }
>
> function WineListForm_required () {
>  this.a0 = new Array("menuDisplayDescription", "Wine List Preamble
> is required.", new Function ("varName",
> "this.mask=/
> ^[a-zA-Z0-9\\\'\\,\\.\\-\\[\\]\\{\\}\\:\\;\\?\\/[EMAIL PROTECTED](\\)\\_\\+\\=
> ]*$/;  return this[varName];"));
> }
>
> function WineListForm_mask () {
>  this.a0 = new Array("menuDisplayDescription", "Wine List Preamble
> is invalid.", new Function ("varName",
> "this.mask=/
> ^[a-zA-Z0-9\\\'\\,\\.\\-\\[\\]\\{\\}\\:\\;\\?\\/[EMAIL PROTECTED](\\)\\_\\+\\=
> ]*$/;  return this[varName];"));
> }
>
> I am expecting the _required() function to also have
> menuCategoryDescription 0-2 added to the array.  How would this be
> accomplished.
>
> Thank you for any help in advance!
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>