Further investigation shows that tapestry page enhancement includes:

<script type="text/javascript" src="/tair/app?digest=b4909c59529064c46eb8843b65911500&amp;path=%2Forg%2Fapache%2Ftapestry%2Fform%2FForm.js&amp;service=asset"></script>

and at the foot of the page:

<script language="JavaScript" type="text/javascript"><!--
Tapestry.register_form('form');
Tapestry.onsubmit('form', function(event) { Tapestry.require_field(event, 'holidayDay', 'You must enter a value for Holiday Day.'); }); Tapestry.onsubmit('form', function(event) { Tapestry.require_field(event, 'holidayMonth', 'You must enter a value for Holiday Month.'); });
Tapestry.set_focus('holidayDay');

// --></script>

relevant to scripting. I presumabe someone has got client side validation working. All the relevant enhancements to the page to enable javascript validation to work appear to be there but nothing happens. No javascript errors are thrown when the form is submitted. Any ideas?

Paul


seloha . <[EMAIL PROTECTED]> write:

I am using tap 4 beta 6 and have a form with client side javascript enabled:

<form jwcid="[EMAIL PROTECTED]" listener="ognl:listeners.formSubmit" delegate="ognl:beans.delegate" clientValidationEnabled="true">

also in the form is a field for validation:

<span jwcid="@PropertySelection" model="ognl:someModel" value="ognl:someValue" displayName="Some Value" validators="validators:required"/>

and to submit the form:

<input type="submit" jwcid="@Submit" value="Something" selected="ognl:whichButton" tag="literal:add" onclick="return window.confirm('Are you sure?');"/>

The client-side validation is never fired but the server-side validation works fine, using:

IValidationDelegate validationDelegate = (IValidationDelegate) getBeans().getBean("delegate");
if (validationDelegate.getHasErrors()) {
  return;
}

I know I have not put all the detail but hopefully enough. Any ideas?

Also what is the way on running using the client-side validation scripting within your own javascripts before doing your own further javascript validation.

Thanks inadvance,

Paul

p.s. the browser is Firefox (Mozilla). I have tried on os x and windows platforms with no success. The above code is an example and may not be exactly correct. I think my problem is that I am missing something fundamental. I have had similar code working correctly in tap 3.0.3.



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

Reply via email to