neo09 / gwt-platform

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

Using forceReveal in a ProxyEvent as explained in GettingStarted doesn't work as expected on Places. #147

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
  @ProxyEvent
  @Override
  public void onSetMemberCommentList(final SetMemberCommentListEvent event) {
    forceReveal();

    placeManager.revealRelativePlace(new PlaceRequest(NameTokens.commentListPage));
  }

on any presenter that are places.

The problem is that the tail of history isn't updated. Since the new relative 
place mechanisme, forceReveal has been deprecated to use for that very reason.

What is the expected output? What do you see instead?
History should be updated accordingly or Getting started should explain the 
right way of doing this.

Work around :
  @ProxyEvent
  @Override
  public void onSetMemberCommentList(final SetMemberCommentListEvent event) {
    getMemberComments(event.getComments());

    placeManager.revealRelativePlace(new PlaceRequest(NameTokens.commentListPage));
  }

Note that my event is handled correctly and that the presenter is loaded 
lazily. Everything works in that matters. The only issue is that we should 
document this a little more in Getting started.

Original issue reported on code.google.com by goudreau...@gmail.com on 22 Jul 2010 at 8:04

GoogleCodeExporter commented 9 years ago
Uh sorry

@ProxyEvent
  @Override
  public void onSetMemberCommentList(final SetMemberCommentListEvent event) {
    forceReveal();

    placeManager.revealRelativePlace(new PlaceRequest(NameTokens.commentListPage));
  }

Should have been

@ProxyEvent
  @Override
  public void onSetMemberCommentList(final SetMemberCommentListEvent event) {
    forceReveal();

    getMemberComments(event.getComments());
  }

Original comment by goudreau...@gmail.com on 22 Jul 2010 at 8:05

GoogleCodeExporter commented 9 years ago
You are right, this is only meant to be used for non-place presenters. Place 
presenters should reveal themselves via the PlaceManager.

I updated the doc, can we close this issue?

Original comment by philippe.beaudoin on 22 Jul 2010 at 8:21

GoogleCodeExporter commented 9 years ago
Yup :D

Original comment by goudreau...@gmail.com on 22 Jul 2010 at 9:49

GoogleCodeExporter commented 9 years ago

Original comment by goudreau...@gmail.com on 22 Jul 2010 at 9:50