Skip to content

Instantly share code, notes, and snippets.

@Elrhino
Created January 4, 2016 16:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Elrhino/86717241d8854cdf6e1f to your computer and use it in GitHub Desktop.
Save Elrhino/86717241d8854cdf6e1f to your computer and use it in GitHub Desktop.
Code snippet from BeeStore
@Override
protected void onBind() {
setInSlot(SLOT_MAIN, shoppingCartPresenter);
addRegisteredHandler(CheckoutContinueEvent.TYPE, this);
}
@Override
public void onCheckoutContinue(CheckoutContinueEvent event) {
if (getChildren(SLOT_MAIN).contains(shoppingCartPresenter)) {
setInSlot(SLOT_MAIN, addressPresenter);
} else if (event.getSource() == addressPresenter) {
addToSlot(SLOT_MAIN, orderPresenter);
} else if (event.getSource() == orderPresenter) {
addToSlot(SLOT_MAIN, paymentPresenter);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment