The onSuccess script seem to work on
http://wicketstuff.org/wicket13/ajax/links
example.
However the onFailure doesn't, because now we redirect to
internalErrorPage. Which doesn't work in IE7, which is kinda weird,
will look at it later today.
-Matej
On Dec 21, 2007 5:14 PM, Kirk Israel <[EMAIL PROTECTED]> wrote:
> Unfortunately the approach below seems not to work reliably on IE7;
> for certain kind of changes, the OnSuccess or OnFailure never gets
> called and so the cursor gets stuck in Busy mode. That stinks!
>
>
> On Dec 18, 2007 11:29 AM, Kirk Israel <[EMAIL PROTECTED]> wrote:
> > I guess I prefer the convention of changing the mouse pointer to
> > "busy" rather than putting a little throbber by the link for two
> > reasons:
> > 1. the throbber risks messing with the layout of the page
> > 2. Changing the cursor has a much longer history as a UI convention
> > for computer busyness
> >
> > Now Firefox was already changing the cursor for Ajax operations for
> > some cases, but it was inconsistent,
> > I think this small class deals with that:
> >
> > /**
> > * AjaxFallbackLink that changes mouse pointer to "progress" (i.e.
> > busy) during Ajax operations
> > * for the link itself (in case the pointer is still hovering over it)
> > and the whole document
> > * (if the pointer has been moved)
> > *
> > */
> > public abstract class ProgressPointerAjaxFallbackLink extends
> > AjaxFallbackLink {
> > public ProgressPointerAjaxFallbackLink(final String id) {
> > this(id, null);
> > }
> > public ProgressPointerAjaxFallbackLink(final String id, final IModel
> > model){
> > super(id, model);
> > }
> > @Override
> > protected IAjaxCallDecorator getAjaxCallDecorator() {
> > return new AjaxCallDecorator(){
> > private static final long serialVersionUID = 1L;
> > public CharSequence decorateScript(CharSequence pScript) {
> > return
> > "this.style.cursor='progress';document.body.style.cursor='progress';"+pScript;
> > }
> >
> > public CharSequence decorateOnSuccessScript(CharSequence
> > pScript) {
> > return
> > "this.style.cursor='pointer';document.body.style.cursor='auto';"+pScript;
> > }
> >
> > public CharSequence decorateOnFailureScript(CharSequence
> > pScript) {
> > return
> > "this.style.cursor='pointer';document.body.style.cursor='auto';"+pScript;
> > }
> > };
> > }
> > }
> >
> >
> > "ProgressPointerAjaxFallbackLink" is more concise but probably less
> > readable than my coworker's suggestion "BusyCursorAjaxFallbackLink".
> > Actually I might switch to the latter.
> >
> > Feedback to this approach and/or implementation welcome.
> >
>
> ---------------------------------------------------------------------
> 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]