I fear, I can't help a lot with your concrete problems. Nevertheless, two
hints:

- Maybe the Tap 4.1 docs on the subject helps:
http://tapestry.apache.org/tapestry4.1/javascript/index.html

- Did you consider updating to T 4.1.2? It's really an
"almost-drop-in-replacement" for 4.0.x. And it's main topic was to pull over
the best from Tacos and make all the Ajax stuff integrate smoothly with the
synchronous-request-oriented parts. Unfortunately, the Tacos version
for 4.1is not yet final, but we found the snapshot quite workable.

2007/7/23, RachelS <[EMAIL PROTECTED]>:


Hi there

(I'm using Tapestry 4.0.2 and Tacos 4.0.1)

I have a situation where I have a Form and a separate AjaxForm on a page.

What I find is that the Form works perfectly when the AjaxForm is not also
on the page. As soon as the AjaxForm is added, most of the Form's
validation
fails with errors like "Tapestry.validate_currency is not a method" or
"Tapestry.validate_number is not a method."

I see that Tapestry.validate_number is a method that is added by
Tapestry's
form.js when you have "translator="translator:number" on a TextField. To
try
and force this to work when both forms are on the page, I'm taking out the
translator and creating a custom validator that I attach to the TextField
with a bean which seems like a bit of overkill to duplicate the translator
functionality.

So I have done some reading and I see that the AjaxForm supplies it's own
copy of Form.js to the page and that this is why most of the methods fail
to
work once the AjaxForm is added to the page.

I also see that there is mention of having a form profile and using
dojo.validate.check(form, profile) to see if the form passed validation.
(Once you have setup up the profile of course)

I'd like to know if adding a profile to the form is the 'correct' way to
accomplish validation in this case.

Also, I'd like to know what the 'correct' way is to do this. Is the best
pattern to simply add javascript to the page and add the check into the
form's submit handler? I just don't know what to do with the result from
dojo.validate.check.

Are there any detailed examples of this available?

Many thanks,
Rachel
--
View this message in context:
http://www.nabble.com/Mixing-AjaxForm-and-Form-tf4128054.html#a11739250
Sent from the Tapestry - User mailing list archive at Nabble.com.


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




--
Marcus Schulte
http://marcus-schulte.blogspot.com

Reply via email to