Error Place In GWTP For Dummies
Error place is to display the appropriate error message, when the client is trying to access the page that doesn't exists.
You have to override revealErrorPlace(String invalidHistoryToken) in ClientPlaceManager which extends PlaceManagerImpl and redirect the request to error page using PlaceRequest as mentioned below.
@Override
public void revealErrorPlace(String invalidHistoryToken){
PlaceRequest placeRequest = new PlaceRequest(NameTokens.error);
revealPlace(placeRequest);
}
Enter : http://localhost:7070/sample/#notexist any place name which doesn't exist.
you will see, http://localhost:7070/sample/#error
No comments:
Post a Comment