This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.google.inject.Inject; | |
import com.gwtplatform.mvp.client.annotations.DefaultGatekeeper; | |
import com.gwtplatform.mvp.client.proxy.Gatekeeper; | |
@DefaultGatekeeper | |
public class LoggedInGatekeeper implements Gatekeeper { | |
private CurrentUser currentUser; | |
@Inject | |
public LoggedInGatekeeper(CurrentUser currentUser) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mvn clean install -pl -webapp && cd uploader/ && ./upload.sh localhost && cd .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hehehe! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private boolean validateFields(String coordinates, String power) { | |
return coordinates.matches("[0-9]{3};[0-9]{3};[0-9]{3}") && power.matches("[0-9]"); | |
} | |
@Override | |
public void onLaunch(String coordinates, String power) { | |
if (validateFields(coordinates, power)) { | |
// TODO: Do something with the values. Process with service. | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onLaunch(String launchCoordinates, String launchPower) { | |
// TODO: Validate values. | |
// TODO: Do something with the values. | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LauncherPresenter extends Presenter<LauncherPresenter.MyView, LauncherPresenter.MyProxy> { | |
interface MyView extends View { | |
} | |
@ProxyStandard | |
@NameToken(NameTokens.HOME) | |
interface MyProxy extends ProxyPlace<LauncherPresenter> { | |
} | |
@Inject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@UiHandler("launchButton") | |
public void onLaunch(ClickEvent event) { | |
getUiHandlers().onLaunch(launchCoordinates.getText(), launchPower.getText()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@UiHandler("launchButton") | |
public void onLaunch(ClickEvent event) { | |
// TODO: Send launch parameters to the LauncherPresenter. | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.gwtplatform.mvp.client.UiHandlers; | |
public interface launcherUiHandlers extends UiHandlers { | |
void onLaunch(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LauncherView extends ViewImpl implements LauncherPresenter.MyView { | |
interface Binder extends UiBinder<Widget, LauncherView> { | |
} | |
@UiField | |
TextBox launchCoordinates; | |
@UiField | |
TextBox launchPower; | |
@UiField | |
Button launchButton; |