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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> wrote:
> > I personally think gmail presentation is simple and user friendly
> >
> > On 1/28/07, Ivo van Dongen <[EMAIL PROTECTED]> 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
> > > Wicket-user@lists.sourceforge.net
> > >
> 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
> > Wicket-user@lists.sourceforge.net
> > 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
> Wicket-user@lists.sourceforge.net
> 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
Wicket-user@lists.sourceforge.net
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
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to