i suspect i'm on to something, but you'll have to try it out to see...
The main docs for IPCE are on the IPE page:
http://wiki.github.com/madrobby/scriptaculous/ajax-inplaceeditor
And while there's a listing for onComplete and onFailure in the
options, look further down and see the ajaxOptions option. Focus on
this. You can feed any of the ajaxOptions callbacks you want,
including onSuccess and onException, which could possibly handle your
forced retry.
{
other options...,
ajaxOptions:{
onSuccess:someVarAsssignedSuccessFunc,
onFailure:someVarAssignedFailFunc,
onException:someVarAssignedExceptionFunc
}
}
Send onFailure (more likely, as it handles transport issues) or
onException (or both) callbacks that perform the retry. You'll have to
capture your form data, because regardless of success/fail, the
onComplete callback's job is to kill the form and its data. When the IP
(C)E is initialized, if you pass an onComplete callback (either from
the main or the ajaxOptions subset), your callback is performed AFTER
IPE.leaveEditMode() is executed. Good bye form & data. You need to
create the copy of your data before that can happen.
-joe t.
On Jan 14, 10:12 pm, kauberry <[email protected]> wrote:
> Hi all,
>
> First, a bit of background... I've got a series of
> InPlaceCollectionEditor elements on a page, all of which are sending
> their POST requests to a web site that is using Kerberos single sign-
> on for authentication. This causes almost every request to generate a
> 401 response, and a subsequent re-send of the POST data. FF3.5 and
> even IE8 handle this correctly, by sending the post body along with
> the re-sent POST, but Safari 4 drops the post body content
> sporadically (often enough to be annoying, but not consistently).
>
> After getting fed up with this behavior, I finally settled on
> resubmitting failed xhr requests (up to a max number of attempts)
> until they succeed. With a normal Ajax.Request, I can do this just
> fine by re-calling the same function that I'm already in, but I can't
> find the right way to force IPCE to do the same thing. I've tried
> saving a reference to the generated IPCE control in a global variable,
> then calling the "._boundSubmitHandler" and "handleFormSubmission"
> methods, but I lose all of the information about what I'm actually
> sending somewhere along the way.
>
> If this makes sense to anyone, I'd appreciate a hand up. =)
>
> Thanks!
--
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.