|
From: Ivo v. D. <ivo...@gm...> - 2007-01-29 15:30:28
|
Another suggestion from the wicket mailinglist. Shall I add this also?
---------- Forwarded message ----------
From: Marc-Andre Houle <mh...@gm...>
Date: Jan 29, 2007 3:41 PM
Subject: Re: [Wicket-user] in-progress indicator
To: wic...@li...
I don't know if it can help, but for us, we added this code in our base page
to make the cursor change when there is an ajax call in progress :
<script language="Javascript" type="text/javascript">
Wicket.Ajax.registerPreCallHandler(function() {
document.getElementById("main").style.cursor='progress'; });
Wicket.Ajax.registerPostCallHandler(function() {
document.getElementById ("main").style.cursor='auto'; });
Wicket.Ajax.registerFailureHandler(function() {
document.getElementById("main").style.cursor='auto'; });
</script>
On 1/28/07, Frank Bille <fra...@gm...> wrote:
>
> You are welcome to add it to the wiki :)
>
> Frank
>
> On 1/28/07, Ivo van Dongen <ivo...@gm...> wrote:
> >
> > Thanks, works like a charm! I didn't find a tabbed panel variant that
> > uses the indicating links by the way. I've added it below, perhaps someone
> > finds it usefull.
> >
> > package org.webical.web.components.ajax.tabs ;
> >
> > import java.util.List;
> >
> > import wicket.ajax.AjaxRequestTarget;
> > import wicket.extensions.ajax.markup.html.IndicatingAjaxLink;
> > import wicket.extensions.ajax.markup.html.tabs.AjaxTabbedPanel;
> > import wicket.markup.html.WebMarkupContainer ;
> >
> > /**
> > * Adds indicating behavior to the tabbed panel
> > * @author ivo
> > *
> > */
> > public class IndicatingAjaxTabbedPanel extends AjaxTabbedPanel {
> > private static final long serialVersionUID = 1L;
> >
> > /**
> > * @param id the components id
> > * @param tabs the tabs to show
> > */
> > public IndicatingAjaxTabbedPanel(String id, List tabs) {
> > super(id, tabs);
> > }
> >
> > /**
> > * Adds an IndicatingAjaxLink
> > * @see
> > wicket.extensions.ajax.markup.html.tabs.AjaxTabbedPanel#newLink(
> > java.lang.String, int)
> > */
> > @Override
> > protected WebMarkupContainer newLink(String linkId, final int index)
> > {
> >
> > return new IndicatingAjaxLink(linkId) {
> > private static final long serialVersionUID = 1L;
> >
> > /**
> > * Copied from <code>
> > wicket.extensions.ajax.markup.html.tabs.AjaxTabbedPanel </code>
> > * @see wicket.ajax.markup.html.AjaxLink#onClick(
> > wicket.ajax.AjaxRequestTarget)
> > */
> > @Override
> > public void onClick(AjaxRequestTarget target) {
> > setSelectedTab(index);
> >
> > if(target != null) {
> > target.addComponent(IndicatingAjaxTabbedPanel.this);
> > }
> >
> > onAjaxUpdate(target);
> > }
> >
> > };
> >
> > }
> > }
> >
> > On 1/28/07, Martijn Dashorst < mar...@gm...> wrote:
> > >
> > > We have an AjaxIndicatingLink (or something similarly named) component
> > >
> > > that displays an indicator next to the link. I believe it is in the
> > > extensions project. You can take that and use it directly or use it to
> > > add the desired functionality to your own components.
> > >
> > > Martijn
> > >
> > > On 1/28/07, Ivo van Dongen <ivo...@gm...> wrote:
> > > > I agree, but what I meant to ask is how to go about this? I thought
> > > of using
> > > > an AjaxCallDecorator, but that would mean that it must be added to
> > > each
> > > > component that makes an ajax call. I was wondering if somebody had
> > > an easier
> > > > idea.
> > > >
> > > >
> > > > On 1/28/07, Carfield Yim < car...@gm...> wrote:
> > > > > I personally think gmail presentation is simple and user friendly
> > > > >
> > > > > On 1/28/07, Ivo van Dongen < ivo...@gm...> wrote:
> > > > > > Hi,
> > > > > >
> > > > > > We're adding some Ajax support to our pages and some of the
> > > components
> > > > can
> > > > > > take a long time to load. To the user it is not clear if
> > > anything is
> > > > > > happening so we want to add a sign that a request is in
> > > progress,
> > > > something
> > > > > > like an animated gif. This should pop-up on each XMLhttpRequest
> > > and
> > > > > > disappear when the call is completed. What would be a good way
> > > to
> > > > accomplish
> > > > > > this?
> > > > > >
> > > > > > Thanks in advance,
> > > > > > Ivo van Dongen
> > > > > >
> > > > > >
> > > >
> > > -------------------------------------------------------------------------
> > > > > > Take Surveys. Earn Cash. Influence the Future of IT
> > > > > > Join SourceForge.net's Techsay panel and you'll get the chance
> > > to share
> > > > your
> > > > > > opinions on IT & business topics through brief surveys - and
> > > earn cash
> > > > > >
> > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > >
> > > > > >
> > > > > > _______________________________________________
> > > > > > Wicket-user mailing list
> > > > > > Wic...@li...
> > > > > >
> > > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > -------------------------------------------------------------------------
> > > > > Take Surveys. Earn Cash. Influence the Future of IT
> > > > > Join SourceForge.net's Techsay panel and you'll get the chance to
> > > share
> > > > your
> > > > > opinions on IT & business topics through brief surveys - and earn
> > > cash
> > > > >
> > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > >
> > > > > _______________________________________________
> > > > > Wicket-user mailing list
> > > > > Wic...@li...
> > > > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > > >
> > > >
> > > >
> > > >
> > > -------------------------------------------------------------------------
> > > > Take Surveys. Earn Cash. Influence the Future of IT
> > > > Join SourceForge.net's Techsay panel and you'll get the chance to
> > > share your
> > > > opinions on IT & business topics through brief surveys - and earn
> > > cash
> > > >
> > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > >
> > > > _______________________________________________
> > > > Wicket-user mailing list
> > > > Wic...@li...
> > > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > Vote for Wicket at the
> > > http://www.thebeststuffintheworld.com/vote_for/wicket
> > > Wicket 1.2.4 is as easy as 1-2-4. Download Wicket now!
> > > http://wicketframework.org
> > >
> > >
> > > -------------------------------------------------------------------------
> > > Take Surveys. Earn Cash. Influence the Future of IT
> > > Join SourceForge.net's Techsay panel and you'll get the chance to
> > > share your
> > > opinions on IT & business topics through brief surveys - and earn cash
> > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > >
> > > _______________________________________________
> > > Wicket-user mailing list
> > > Wic...@li...
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> >
> >
> >
> > -------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share
> > your
> > opinions on IT & business topics through brief surveys - and earn cash
> >
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> >
> > _______________________________________________
> > Wicket-user mailing list
> > Wic...@li...
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
> >
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> _______________________________________________
> Wicket-user mailing list
> Wic...@li...
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wic...@li...
https://lists.sourceforge.net/lists/listinfo/wicket-user
|
|
From: Zoran K. <z.k...@fu...> - 2007-01-29 15:36:14
|
> Another suggestion from the wicket mailinglist. Shall I add this also?
I hope you already have ;)
> ---------- Forwarded message ----------
> From: Marc-Andre Houle <mh...@gm...>
> Date: Jan 29, 2007 3:41 PM
> Subject: Re: [Wicket-user] in-progress indicator
> To: wic...@li...
>
> I don't know if it can help, but for us, we added this code in our base
> page
> to make the cursor change when there is an ajax call in progress :
> <script language="Javascript" type="text/javascript">
> Wicket.Ajax.registerPreCallHandler(function() {
> document.getElementById("main").style.cursor='progress'; });
> Wicket.Ajax.registerPostCallHandler(function() {
> document.getElementById ("main").style.cursor='auto'; });
> Wicket.Ajax.registerFailureHandler(function() {
> document.getElementById("main").style.cursor='auto'; });
> </script>
|