On 2/13/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
> On 2/14/07, Scott Lusebrink <[EMAIL PROTECTED]> wrote:
> > the situation is that I have a page which takes a LONG time to get data for
> > and until that page has complete the back button or navigating to any other
> > page wont work.  is there any way to prevent this
>
> Let the data in the page be aggregated in a background thread which
> you poll using ajax. Then you can show a progress indicator, and
> replace the progress indicator with the new data.

And if you don't want to use Ajax for whatever reason, you can achieve
the same by using a shared resource which you then display in a frame:

public class FooExport extends WebResource {

  public static class Initializer implements IInitializer {

    public void init(Application application) {
      SharedResources res = application.getSharedResources();
      res.add("foodata", new FooExport());
    }
  }

  public FooExport() {
    setCacheable(false);
  }

  @Override
  public IResourceStream getResourceStream() {
    MySession s = (MySession)Session.get();
    String uid = s.getUid();
    CharSequence bar = DataBase.getInstance().getDataForFoo(uid);
    return new StringResourceStream(bar, "text/plain");
  }
}

But ajax would be a lot easier/ more elegant :)

Eelco

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to