gwt-pushstate icon indicating copy to clipboard operation
gwt-pushstate copied to clipboard

Check/Ensure compatibility with GWT 2.7

Open jbarop opened this issue 11 years ago • 1 comments

Related to https://issues.jboss.org/browse/ERRAI-805

jbarop avatar Oct 07 '14 18:10 jbarop

If compatibility with both GWT 2.6- and 2.7+ is desired the following approach is an option.

  1. Remove the HistoryImpl base class from HistoryImplPushSate
  2. Move the required and previously inherited methods to HistoryImplPushState
  3. Remove the rebind rules in PushState.gwt.xml
  4. Provide an alternative History utility class (i.e. PushStateHistory) with static methods (i.e. newItem) that dispatch to an HistoryImplPushState instance
  5. Users will then have to use this new utility class instead of com.google.gwt.user.client.History

Not ideal, but this is what I've done in Errai for now to support both GWT 2.7 and 2.6-. Here's the commit: https://github.com/errai/errai/commit/c79bf90e825575d15c30938dd624e875f8b07b82

While this make sense from our perspective (it fixes the compatibility problem and retains the functionality), I am not sure it's the best solution for your lib.

csadilek avatar Oct 27 '14 21:10 csadilek