Jesse recently fixed

https://issues.apache.org/jira/browse/TAPESTRY-1245

Did you get a chance to try the dirty form checker again?


[EMAIL PROTECTED] wrote:
Ok, now I got it right, almost ;).

Somehow tapestry tapestry.form.onFormSubmit  is not called, when you use
tapestry.form.submit to submit the form, as @LinkSubmit does.
So I ended up with two connections for the defuser:

dojo.event.connect("before", tapestry.form ,"onFormSubmit", tapestry.dirtyFormWarning, "defuse"); dojo.event.connect("around", tapestry.form,"submit", tapestry.dirtyFormWarning,
"defuseAround");

Now, this works fine for FF out of the box. However there's an issue with (surprise, surprise) IE, which fires onbeforeunload twice under certain circumstances, the first time being before one has a chance to defuse the warning component. Afaik, this
occurs only with the <a href="javascript:someFunc()"> idiom as
it is used in @LinkSubmit. I have therefore in our app replaced
@LinkSubmit with an equivalent component whiche renders
   <a href="#" onclick="tapestry.form.submit(...)" >...
instead of
   <a href="javascript:tapestry.form.submit(...)" >  ...

So, for this component to be useful for Tacos, tapestry's LinkSubmit would have to be changed accordingly.
Andy has already submitted a jira for this, I see:

https://issues.apache.org/jira/browse/TAPESTRY-1245

regards,
Marcus


Ok, I tried
  dojo.event.connect( tapestry.form
,"onFormSubmit",tapestry.dirtyFormWarning, "defuse"); now, same result: works for @Submit, doesn't work for @LinkSubmit ...
-----Original Message-----
From: Jesse Kuhnert [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 09, 2007 5:52 PM
To: Tapestry users
Subject: Re: dirty form checking ...

I think you can connect to tapestry.form.onFormSubmit as per:

http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry
-framework/src/js/tapestry/form.js?view=markup


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