Re: [Wicket-user] multiple rendering at same time

2007-02-15 Thread Eelco Hillenius
On 2/14/07, Scott Lusebrink [EMAIL PROTECTED] wrote:
 Would a WebResource not lock the rest of the application?

Not if it is defined as a shared resource. If it is component bound -
like Images use resources - it is.

 Ajax is not a
 possibility due to security requirements.  This page is already inside its
 own frame, I pretty much need a unsynchronized page.  Can you provide an
 example of how to use a webResource to display a table

My earlier example:


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);
 }
}

here, 'bar' would be the string with the complete markup (like a
table) as you want it to stream to your (internal) frame.

-
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.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] multiple rendering at same time

2007-02-14 Thread Ryan Holmes
It sounds like Scott just wants to allow the user to cancel the  
slow-loading page by navigating to another page. If his database  
request happened in a LoadableDetachableModel rather than a page  
constructor, would that allow a new page to be rendered while the old  
one is still trying to load data?

-Ryan

On Feb 13, 2007, at 11:19 PM, Johan Compagner wrote:

 But what does that lock matter for you page if that page takes a  
 long time?
 You 'loose' the database connections for all other things anyway.
 Or does that session have different windows and is displaying more  
 then 1 page at the same time in tabs/frames or browser windows?

 johan


 On 2/13/07, Scott Lusebrink [EMAIL PROTECTED] wrote: I've  
 realized that wicket will only render one page at a time, at least  
 it will not run the constructor and onAttach methods of 2 pages at  
 the same time.  This is a major bottle neck on applications with  
 large user bases.  My app is experiencing problems because database  
 calls are being run in these constructors and onAttach methods.   
 While there maybe a more appropriate place for database calls to be  
 run, and I'd like to hear where these should be, running only 1  
 page constructor at a time doesn't seem to be efficient.  I've  
 found the code that does this. RequestCycle.874
 processEventsAndRespond(){
 // Use any synchronization lock provided by the target 874 Object  
 lock = getRequestTarget().getLock( this); 875 if (lock != null)
 876 { 877 synchronized (lock) 878 { 879 doProcessEventsAndRespond 
 (processor); 880 } 881 }

 can someone explain if this behavior is intentional, is there a way  
 to stop it?  As a result of this behavior while a page is loading,  
 no other page will load until the first has finish.
 I am  using wicket 1.2

 Scott

 -- 
 ---
 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=lnkkid=120709bid=263057dat=121642
 ___
 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.phpp=sourceforgeCID=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.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] multiple rendering at same time

2007-02-14 Thread Eelco Hillenius
On 2/14/07, Ryan Holmes [EMAIL PROTECTED] wrote:
 It sounds like Scott just wants to allow the user to cancel the
 slow-loading page by navigating to another page.

Or at least don't show a blank page that'll provoke the user to hit
refresh ten times in a row.

 If his database
 request happened in a LoadableDetachableModel rather than a page
 constructor, would that allow a new page to be rendered while the old
 one is still trying to load data?

No, that doesn't make a difference. Detachable models can be used to
limit the amount of data that is cached as 'component state' between
requests, and to ensure that new requests are done with fresh data.
The rendering of pages stands apart from that. If you want to break up
a request in multiple parts - which is what you want to do here, as
you first want to show the page without the data, possibly with some
kind of place holder for the data or e.g. a progress indicator - you
can best use Ajax or, second best, use (i)frames and resources. If you
use Ajax, it's best to do the processing in a separate thread and let
Ajax do polling as that won't block the session.

Which reminds me of something I wanted to investigate concerning
stateless behaviors (for ajax). But I'll start another thread about
that.

Eelco

-
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.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] multiple rendering at same time

2007-02-14 Thread Nino Wael
Ahh, I think we discussed this earlier. The best solution are to utilize a 
worker thread (I think) and make the client reload until the thread are done..

I think it's essential for wicket in order to handle session state to use a 
singleton pattern for request cycles. 

EG if page A have long loading time page b,c,d will just have to wait. So if 
you utilize a worker thread then you will be able to cancel the thread and go 
to the other page if you want to.


Regards Nino

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ryan Holmes
Sent: 14. februar 2007 10:32
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] multiple rendering at same time

It sounds like Scott just wants to allow the user to cancel the  
slow-loading page by navigating to another page. If his database  
request happened in a LoadableDetachableModel rather than a page  
constructor, would that allow a new page to be rendered while the old  
one is still trying to load data?

-Ryan

On Feb 13, 2007, at 11:19 PM, Johan Compagner wrote:

 But what does that lock matter for you page if that page takes a  
 long time?
 You 'loose' the database connections for all other things anyway.
 Or does that session have different windows and is displaying more  
 then 1 page at the same time in tabs/frames or browser windows?

 johan


 On 2/13/07, Scott Lusebrink [EMAIL PROTECTED] wrote: I've  
 realized that wicket will only render one page at a time, at least  
 it will not run the constructor and onAttach methods of 2 pages at  
 the same time.  This is a major bottle neck on applications with  
 large user bases.  My app is experiencing problems because database  
 calls are being run in these constructors and onAttach methods.   
 While there maybe a more appropriate place for database calls to be  
 run, and I'd like to hear where these should be, running only 1  
 page constructor at a time doesn't seem to be efficient.  I've  
 found the code that does this. RequestCycle.874
 processEventsAndRespond(){
 // Use any synchronization lock provided by the target 874 Object  
 lock = getRequestTarget().getLock( this); 875 if (lock != null)
 876 { 877 synchronized (lock) 878 { 879 doProcessEventsAndRespond 
 (processor); 880 } 881 }

 can someone explain if this behavior is intentional, is there a way  
 to stop it?  As a result of this behavior while a page is loading,  
 no other page will load until the first has finish.
 I am  using wicket 1.2

 Scott

 -- 
 ---
 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=lnkkid=120709bid=263057dat=121642
 ___
 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.phpp=sourceforgeCID=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.phpp=sourceforgeCID=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.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] multiple rendering at same time

2007-02-14 Thread Eelco Hillenius
 EG if page A have long loading time page b,c,d will just have to wait. So if 
 you utilize a worker thread then you will be able to cancel the thread and go 
 to the other page if you want to.

Not all requests are synced on the session though. Notably requests to
shared resources aren't, while you can easily trick shared resources
to actually handle client specific requests. The only thing you'd miss
there is the markup handling/ rendering you would have with normal
page requests.

Also: see my email about stateless behaviors (and the question whether
we synchronize stateless pages on the session - which we shouldn't imo
- to the dev list).

Eelco

-
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.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] multiple rendering at same time

2007-02-14 Thread Eelco Hillenius
 Im not on the dev list, I guess I can look it up on nabble?

Yep: http://www.nabble.com/stateless-behaviors-tf3226344.html

Or subscribe to it! See http://incubator.apache.org/wicket/incubator.html

Eelco

-
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.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] multiple rendering at same time

2007-02-14 Thread Ryan Holmes
Thanks, that really clears it up.

At first glance, synchronizing pages on the session seems a little  
overly restrictive (Scott's issue being a case in point), but of  
course *not* synchronizing on the session is an infamous source of  
frustrating bugs, even in frameworks with much simpler state handling  
than Wicket.

Very cool, I would much rather have to intentionally enable  
multithreaded operations on a case-by-case basis than have to  
constantly worry about subtle multithreading issues.

-Ryan

On Feb 14, 2007, at 1:54 AM, Eelco Hillenius wrote:

 On 2/14/07, Ryan Holmes [EMAIL PROTECTED] wrote:
 It sounds like Scott just wants to allow the user to cancel the
 slow-loading page by navigating to another page.

 Or at least don't show a blank page that'll provoke the user to hit
 refresh ten times in a row.

 If his database
 request happened in a LoadableDetachableModel rather than a page
 constructor, would that allow a new page to be rendered while the old
 one is still trying to load data?

 No, that doesn't make a difference. Detachable models can be used to
 limit the amount of data that is cached as 'component state' between
 requests, and to ensure that new requests are done with fresh data.
 The rendering of pages stands apart from that. If you want to break up
 a request in multiple parts - which is what you want to do here, as
 you first want to show the page without the data, possibly with some
 kind of place holder for the data or e.g. a progress indicator - you
 can best use Ajax or, second best, use (i)frames and resources. If you
 use Ajax, it's best to do the processing in a separate thread and let
 Ajax do polling as that won't block the session.

 Which reminds me of something I wanted to investigate concerning
 stateless behaviors (for ajax). But I'll start another thread about
 that.

 Eelco

 -- 
 ---
 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.phpp=sourceforgeCID=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.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] multiple rendering at same time

2007-02-14 Thread Scott Lusebrink

Would a WebResource not lock the rest of the application?  Ajax is not a
possibility due to security requirements.  This page is already inside its
own frame, I pretty much need a unsynchronized page.  Can you provide an
example of how to use a webResource to display a table

Scott
-
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.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] multiple rendering at same time

2007-02-13 Thread Scott Lusebrink

I've realized that wicket will only render one page at a time, at least it
will not run the constructor and onAttach methods of 2 pages at the same
time.  This is a major bottle neck on applications with large user bases.
My app is experiencing problems because database calls are being run in
these constructors and onAttach methods.  While there maybe a more
appropriate place for database calls to be run, and I'd like to hear where
these should be, running only 1 page constructor at a time doesn't seem to
be efficient.  I've found the code that does this. RequestCycle.874

processEventsAndRespond(){
// Use any synchronization lock provided by the target  874 Object
lock = getRequestTarget().getLock(this);  875   if (lock != null)  876
{  877  synchronized (lock)  878
{  879
doProcessEventsAndRespond(processor);  880  
}  881  }



can someone explain if this behavior is intentional, is there a way to stop
it?  As a result of this behavior while a page is loading, no other page
will load until the first has finish.
I am  using wicket 1.2

Scott
-
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=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] multiple rendering at same time

2007-02-13 Thread Matej Knopp
This is only true for one session. Locking means that only one page of 
each session will be processed at the same time. This way we ensure that 
the session state remains consisted. This is not affecting the number of 
concurrent users.

-Matej

Scott Lusebrink wrote:
 I've realized that wicket will only render one page at a time, at least 
 it will not run the constructor and onAttach methods of 2 pages at the 
 same time.  This is a major bottle neck on applications with large user 
 bases.  My app is experiencing problems because database calls are being 
 run in these constructors and onAttach methods.  While there maybe a 
 more appropriate place for database calls to be run, and I'd like to 
 hear where these should be, running only 1 page constructor at a time 
 doesn't seem to be efficient.  I've found the code that does this. 
 RequestCycle.874
 
 processEventsAndRespond(){
 // Use any synchronization lock provided by the target
   874 Object lock = getRequestTarget().getLock(
 this);
   875 if (lock != null)
   876 {
   877 synchronized (lock)
   878 {
   879 doProcessEventsAndRespond(processor);
   880 }
   881 }
 
 
 
 can someone explain if this behavior is intentional, is there a way to 
 stop it?  As a result of this behavior while a page is loading, no other 
 page will load until the first has finish.
 I am  using wicket 1.2
 
 Scott
 
 
 
 
 -
 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=lnkkid=120709bid=263057dat=121642
 
 
 
 
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
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=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] multiple rendering at same time

2007-02-13 Thread Scott Lusebrink

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

On 2/13/07, Scott Lusebrink [EMAIL PROTECTED] wrote:


I've realized that wicket will only render one page at a time, at least it
will not run the constructor and onAttach methods of 2 pages at the same
time.  This is a major bottle neck on applications with large user bases.
My app is experiencing problems because database calls are being run in
these constructors and onAttach methods.  While there maybe a more
appropriate place for database calls to be run, and I'd like to hear where
these should be, running only 1 page constructor at a time doesn't seem to
be efficient.  I've found the code that does this. RequestCycle.874

processEventsAndRespond(){
// Use any synchronization lock provided by the target  874 Object 
lock = getRequestTarget().getLock(this);  875if (lock != null)  876 
 {  877  synchronized (lock)  878   
 {  879  doProcessEventsAndRespond(processor);  880 
 }  881  }



can someone explain if this behavior is intentional, is there a way to
stop it?  As a result of this behavior while a page is loading, no other
page will load until the first has finish.
I am  using wicket 1.2

Scott

-
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=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] multiple rendering at same time

2007-02-13 Thread Martijn Dashorst
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.

Having your users wait for more than 2-3 seconds is very impolite and
will result in a negative view of your applciation.

Martijn

  On 2/13/07, Scott Lusebrink [EMAIL PROTECTED] wrote:
  I've realized that wicket will only render one page at a time, at least it
 will not run the constructor and onAttach methods of 2 pages at the same
 time.  This is a major bottle neck on applications with large user bases.
 My app is experiencing problems because database calls are being run in
 these constructors and onAttach methods.  While there maybe a more
 appropriate place for database calls to be run, and I'd like to hear where
 these should be, running only 1 page constructor at a time doesn't seem to
 be efficient.  I've found the code that does this. RequestCycle.874
  processEventsAndRespond(){
  // Use any synchronization lock provided by the target
  874 Object lock = getRequestTarget().getLock(
  this);
  875 if (lock != null)
  876 {
  877 synchronized (lock)
  878 {
  879 doProcessEventsAndRespond(processor);
  880 }
  881 }
 
 
  can someone explain if this behavior is intentional, is there a way to
 stop it?  As a result of this behavior while a page is loading, no other
 page will load until the first has finish.
  I am  using wicket 1.2
 
  Scott
 


 -
 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=lnkkid=120709bid=263057dat=121642
 ___
 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

-
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=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] multiple rendering at same time

2007-02-13 Thread Igor Vaynberg

poller:

http://papernapkin.org/pastebin/view/4610

example usage

http://papernapkin.org/pastebin/view/4611

-igor


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.

Having your users wait for more than 2-3 seconds is very impolite and
will result in a negative view of your applciation.

Martijn

  On 2/13/07, Scott Lusebrink [EMAIL PROTECTED] wrote:
  I've realized that wicket will only render one page at a time, at
least it
 will not run the constructor and onAttach methods of 2 pages at the same
 time.  This is a major bottle neck on applications with large user
bases.
 My app is experiencing problems because database calls are being run in
 these constructors and onAttach methods.  While there maybe a more
 appropriate place for database calls to be run, and I'd like to hear
where
 these should be, running only 1 page constructor at a time doesn't seem
to
 be efficient.  I've found the code that does this. RequestCycle.874
  processEventsAndRespond(){
  // Use any synchronization lock provided by the target
  874 Object lock = getRequestTarget().getLock(
  this);
  875 if (lock != null)
  876 {
  877 synchronized (lock)
  878 {
  879 doProcessEventsAndRespond(processor);
  880 }
  881 }
 
 
  can someone explain if this behavior is intentional, is there a way to
 stop it?  As a result of this behavior while a page is loading, no other
 page will load until the first has finish.
  I am  using wicket 1.2
 
  Scott
 



-
 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=lnkkid=120709bid=263057dat=121642
 ___
 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

-
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=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
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=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] multiple rendering at same time

2007-02-13 Thread Eelco Hillenius
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=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] multiple rendering at same time

2007-02-13 Thread Eelco Hillenius
 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());
 }
   }

And the initializer should be bootstrapped by Wicket, which usually
happens by the initializer of your project/ library, of which the root
initializer is defined in wicket.properties in the root of your class
path. See wicket.properties of wicket-extensions for example.

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=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] multiple rendering at same time

2007-02-13 Thread Johan Compagner

But what does that lock matter for you page if that page takes a long time?
You 'loose' the database connections for all other things anyway.
Or does that session have different windows and is displaying more then 1
page at the same time in tabs/frames or browser windows?

johan


On 2/13/07, Scott Lusebrink [EMAIL PROTECTED] wrote:


I've realized that wicket will only render one page at a time, at least it
will not run the constructor and onAttach methods of 2 pages at the same
time.  This is a major bottle neck on applications with large user bases.
My app is experiencing problems because database calls are being run in
these constructors and onAttach methods.  While there maybe a more
appropriate place for database calls to be run, and I'd like to hear where
these should be, running only 1 page constructor at a time doesn't seem to
be efficient.  I've found the code that does this. RequestCycle.874

processEventsAndRespond(){
// Use any synchronization lock provided by the target  874 Object 
lock = getRequestTarget().getLock(this);  875if (lock != null)  876 
 {  877  synchronized (lock)  878   
 {  879  doProcessEventsAndRespond(processor);  880 
 }  881  }



can someone explain if this behavior is intentional, is there a way to
stop it?  As a result of this behavior while a page is loading, no other
page will load until the first has finish.
I am  using wicket 1.2

Scott

-
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=lnkkid=120709bid=263057dat=121642
___
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.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user