neo09 / gwt-platform

Automatically exported from code.google.com/p/gwt-platform
0 stars 0 forks source link

Add a two-state process for loading pages pending an rpc request #172

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It's quite frequent that pages need to fetch information on the current user 
via RPC before they can be displayed. In such a case, a typical pattern is to 
display a waiting page (or a progress dialog) until the content is available. 
The resulting two-page loading process could be natively supported by GWTP.

This is discussed in the following threads:
http://groups.google.com/group/gwt-platform/browse_thread/thread/90b02ba8fa5afa8
7

http://groups.google.com/group/gwt-platform/browse_thread/thread/7f13e07e63cfed5
5

Original issue reported on code.google.com by philippe.beaudoin on 19 Aug 2010 at 4:07

GoogleCodeExporter commented 9 years ago
Also see issue 171, is this duplicated ?

Original comment by goudreau...@gmail.com on 19 Aug 2010 at 4:43

GoogleCodeExporter commented 9 years ago
Good question. I don't think they are duplicates although they are clearly 
related.

Issue 171 discusses the idea of a delayedReveal, where page A would stay 
visible until the new page B has finished all its rpc calls. If you start the 
app at page B directly then you're not presented anything while it loads.

Issue 172 tries to find a better solution to the "timer in 
revealUnauthorizedPlace" pattern. Basically, I see this as a mechanism where 
the gatekeeper could answer "I don't know yet" to the question as to whether or 
not the page should be visible.

Original comment by philippe.beaudoin on 19 Aug 2010 at 5:29

GoogleCodeExporter commented 9 years ago

Original comment by philippe.beaudoin on 24 Aug 2010 at 5:29

GoogleCodeExporter commented 9 years ago
Could you maybe give an example of when this could be used?

Original comment by matt2224 on 24 Aug 2010 at 5:31

GoogleCodeExporter commented 9 years ago
Say you want to populate the content of a form, or filling a list of element, 
by fetching the info on the server. You have two choices:
1) Reveal the unfilled form, fetch the data, fill it when the data comes in.
2) Leave the current page on (with "Loading..."), reveal only when the data has 
come.
3) Leave the current page on, display a progress dialog, reveal only when the 
data has come.

(1) can already be done today, this issue is concerned with (2) and (3). The 
more I think about it the more it is actually a duplicate of Issue 171.

Original comment by philippe.beaudoin on 24 Aug 2010 at 5:55

GoogleCodeExporter commented 9 years ago
Issue 171 has been merged into this issue.

Original comment by philippe.beaudoin on 24 Aug 2010 at 5:56

GoogleCodeExporter commented 9 years ago
User Clicks Link
Loading Indicator Appears, but current presenter remains in place.
RPC calls finish, new presenter loads

So I couldn't do that in the current version of GWTP? I was thinking I could do 
it using one of the PresenterImpl methods.

Original comment by matt2224 on 24 Aug 2010 at 6:03

GoogleCodeExporter commented 9 years ago
If the RPC is done by the old presenter you can. If it is done by the newly 
revealed presenter, there is probably a way to hack it (by not revealing the 
view) but it will only work in some situations.

V0.4 will make this a native feature.

Original comment by philippe.beaudoin on 24 Aug 2010 at 6:21

GoogleCodeExporter commented 9 years ago
The main part of this issue is complete what is missing is a mechanism to allow 
gatekeeper to fetch content from the server.

See the wiki (getting started, under manual reveal) for how to use this feature.

Original comment by philippe.beaudoin on 25 Aug 2010 at 6:48

GoogleCodeExporter commented 9 years ago
Issue 176 has been created to address the issue of allowing gatekeepers to 
perform RPC.

Original comment by philippe.beaudoin on 25 Aug 2010 at 7:51

GoogleCodeExporter commented 9 years ago
Is this functionality (described in the wiki page) in the current version or 
one you recent uploaded?

Original comment by matt2224 on 25 Aug 2010 at 1:04

GoogleCodeExporter commented 9 years ago
It is described here:
http://code.google.com/p/gwt-platform/wiki/GettingStarted#Using_manual_reveal

Cheers,

Original comment by goudreau...@gmail.com on 25 Aug 2010 at 1:08

GoogleCodeExporter commented 9 years ago
Sorry, I meant what version of GWTP is this functionality in? The latest 
version on the downloads page is from July. 

Should I use mercurial? 

Original comment by matt2224 on 25 Aug 2010 at 1:30

GoogleCodeExporter commented 9 years ago
I have same question as matt2224.

Original comment by youareh...@gmail.com on 25 Aug 2010 at 1:35

GoogleCodeExporter commented 9 years ago
It's in the trunk, we should publish a new release in around two weeks.

Original comment by goudreau...@gmail.com on 25 Aug 2010 at 1:39

GoogleCodeExporter commented 9 years ago
Any way to get it now?

Original comment by matt2224 on 25 Aug 2010 at 2:00

GoogleCodeExporter commented 9 years ago
Sure, check out the sources with Mercurial :D

I think we have a wiki entry for this, YES right here:
http://code.google.com/p/gwt-platform/wiki/GettingStarted#Linking_your_project_t
o_GWTP

It's for Ecplise btw.

Cheers,

Original comment by goudreau...@gmail.com on 25 Aug 2010 at 2:06

GoogleCodeExporter commented 9 years ago
Thanks alot :D

Original comment by matt2224 on 25 Aug 2010 at 2:09

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
You can get the snapshot jar on our continuous build server:
http://teamcity.codebetter.com/viewType.html;buildTypeId=bt225&tab=buildTypeStat
usDiv

Original comment by philippe.beaudoin on 25 Aug 2010 at 2:54

GoogleCodeExporter commented 9 years ago
God forgot that we have that ! LOL

Original comment by goudreau...@gmail.com on 25 Aug 2010 at 3:04

GoogleCodeExporter commented 9 years ago
Thanks!

I need an event to fire once the presenter is actually revealed. I've tried 
using RevealContentEvent, but it has no getType() method. NavigationEvent fires 
before the presenter is actually shown.

What should I use?

Original comment by matt2224 on 25 Aug 2010 at 4:57