Skip to content

Instantly share code, notes, and snippets.

Renaud Lainé Elrhino

Block or report user

Report or block Elrhino

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Elrhino
Elrhino / ApplicationPresenter.java
Created Jan 5, 2016
Code snippets from BeeStore
View ApplicationPresenter.java
public static final NestedSlot SLOT_MAIN = new NestedSlot();
public static final SingleSlot SLOT_SIDE_PANEL = new SingleSlot();
@Elrhino
Elrhino / SidePanelPresenter.java
Created Jan 4, 2016
Code snippet from BeeStore
View SidePanelPresenter.java
@Override
protected void onBind() {
setInSlot(SLOT_MAIN, shoppingCartPresenter);
addRegisteredHandler(CheckoutContinueEvent.TYPE, this);
}
@Override
public void onCheckoutContinue(CheckoutContinueEvent event) {
if (getChildren(SLOT_MAIN).contains(shoppingCartPresenter)) {
@Elrhino
Elrhino / HomePresenter.java
Last active Jan 5, 2016
Code snippet from BeeStore
View HomePresenter.java
addToSlot(SLOT_MAIN_PRODUCTS, productFactory.create(ProductWidgetType.MAIN_LEFT, shirt));
addToSlot(SLOT_MAIN_PRODUCTS, productFactory.create(ProductWidgetType.MAIN_RIGHT, bag));
@Elrhino
Elrhino / bugfix
Created Oct 26, 2015
GSSS "java.lang.NumberFormatException" bug fix
View bugfix
# add this to vm.options (intelliJ)
-Duser.language=en -Duser.country=US
@Elrhino
Elrhino / ToasterPresenterWidger.java
Last active Oct 27, 2015
Code snippets from toaster launcher part 2
View ToasterPresenterWidger.java
public class ToasterWidgetPresenter extends PresenterWidget<ToasterWidgetPresenter.MyView>
implements ToasterWidgetUiHandlers {
interface MyView extends View, HasUiHandlers<ToasterWidgetUiHandlers> {
void setToaster(Toaster toaster);
}
private final RestDispatch dispatch;
private final ToasterResource resource;
@Inject
@Elrhino
Elrhino / LauncherPresenter.java
Last active Oct 27, 2015
Code snippets from toaster launcher part 2
View LauncherPresenter.java
@Override
public void onLaunch(String coordinates, String power) {
validateFields(coordinates, power);
dispatch.execute(resource.launch(coordinates, power), new AsyncCallback<Void>() {
@Override
public void onFailure(Throwable throwable) {
// Handle failure
}
@Elrhino
Elrhino / LauncherView.ui.xml
Created Oct 20, 2015
Code snippets from toaster launcher part 2
View LauncherView.ui.xml
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui'>
<g:HTMLPanel>
<h1>Toaster Launcher</h1>
<label>Coordinates (x, y, z):</label><br/>
<g:TextBox ui:field="launchCoordinates"/><br/>
<label>Power:</label><br/>
<g:TextBox ui:field="launchPower"/><br/>
<g:Button ui:field="launchButton" text="LAUNCH!"/><br/>
<g:SimplePanel ui:field="container"/>
@Elrhino
Elrhino / LauncherView.java
Created Oct 20, 2015
Code snippets from toaster launcher part 2
View LauncherView.java
public class LauncherView extends ViewWithUiHandlers<LauncherPresenter> implements LauncherPresenter.MyView {
interface Binder extends UiBinder<Widget, LauncherView> {
}
@UiField
TextBox launchCoordinates;
@UiField
TextBox launchPower;
@UiField
Button launchButton;
@Elrhino
Elrhino / ToasterWidgetPresenter.java
Created Oct 20, 2015
Code snippets from toaster launcher part 2
View ToasterWidgetPresenter.java
import com.google.inject.Inject;
import com.google.web.bindery.event.shared.EventBus;
import com.gwtplatform.mvp.client.HasUiHandlers;
import com.gwtplatform.mvp.client.PresenterWidget;
import com.gwtplatform.mvp.client.View;
public class ToasterWidgetPresenter extends PresenterWidget<ToasterWidgetPresenter.MyView>
implements ToasterWidgetUiHandlers {
interface MyView extends View, HasUiHandlers<ToasterWidgetUiHandlers> {
void setToaster(Toaster toaster);
@Elrhino
Elrhino / ClientModule.java
Created Oct 20, 2015
Code snippets from toaster launcher part 2
View ClientModule.java
public class ClientModule extends AbstractPresenterModule {
@Override
protected void configure() {
install(new DefaultModule.Builder().build());
install(new ApplicationModule());
bindConstant().annotatedWith(DefaultPlace.class).to(NameTokens.LOGIN);
bindConstant().annotatedWith(ErrorPlace.class).to(NameTokens.LOGIN);
bindConstant().annotatedWith(UnauthorizedPlace.class).to(NameTokens.LOGIN);
You can’t perform that action at this time.