// Path: src/it/e2e/e2e-model/src/main/java/it/test/model/FieldVerifier.java
// public class FieldVerifier {
// 
// 	/**
// 	 * Verifies that the specified name is valid for our service.
// 	 * 
// 	 * In this example, we only require that the name is at least four
// 	 * characters. In your application, you can use more complex checks to ensure
// 	 * that usernames, passwords, email addresses, URLs, and other fields have the
// 	 * proper syntax.
// 	 * 
// 	 * @param name the name to validate
// 	 * @return true if valid, false if invalid
// 	 */
// 	public static boolean isValidName(String name) {
// 		if (name == null) {
// 			return false;
// 		}
// 		return name.length() > 3;
// 	}
// }


import it.test.model.FieldVerifier;
import com.google.gwt.core.client.Callback;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.KeyCodes;
import com.google.gwt.event.dom.client.KeyUpEvent;
import com.google.gwt.event.dom.client.KeyUpHandler;
import com.google.gwt.safehtml.shared.SafeHtml;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.VerticalPanel;
				sendButton.setEnabled(true);
				sendButton.setFocus(true);
			}
		});

		// Create a handler for the sendButton and nameField
		class MyHandler implements ClickHandler, KeyUpHandler {
			/**
			 * Fired when the user clicks on the sendButton.
			 */
			public void onClick(ClickEvent event) {
				sendNameToServer();
			}

			/**
			 * Fired when the user types in the nameField.
			 */
			public void onKeyUp(KeyUpEvent event) {
				if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
					sendNameToServer();
				}
			}

			/**
			 * Send the name from the nameField to the server and wait for a response.
			 */
			private void sendNameToServer() {
				// First, we validate the input.
				errorLabel.setText("");
				String textToServer = nameField.getText();
// Path: src/it/e2e/e2e-model/src/main/java/it/test/model/FieldVerifier.java
// public class FieldVerifier {
// 
// 	/**
// 	 * Verifies that the specified name is valid for our service.
// 	 * 
// 	 * In this example, we only require that the name is at least four
// 	 * characters. In your application, you can use more complex checks to ensure
// 	 * that usernames, passwords, email addresses, URLs, and other fields have the
// 	 * proper syntax.
// 	 * 
// 	 * @param name the name to validate
// 	 * @return true if valid, false if invalid
// 	 */
// 	public static boolean isValidName(String name) {
// 		if (name == null) {
// 			return false;
// 		}
// 		return name.length() > 3;
// 	}
// }


// Path: src/it/e2e/e2e-client/src/main/java/it/test/client/E2E.java
import it.test.model.FieldVerifier;
import com.google.gwt.core.client.Callback;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.KeyCodes;
import com.google.gwt.event.dom.client.KeyUpEvent;
import com.google.gwt.event.dom.client.KeyUpHandler;
import com.google.gwt.safehtml.shared.SafeHtml;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.VerticalPanel;

				sendButton.setEnabled(true);
				sendButton.setFocus(true);
			}
		});

		// Create a handler for the sendButton and nameField
		class MyHandler implements ClickHandler, KeyUpHandler {
			/**
			 * Fired when the user clicks on the sendButton.
			 */
			public void onClick(ClickEvent event) {
				sendNameToServer();
			}

			/**
			 * Fired when the user types in the nameField.
			 */
			public void onKeyUp(KeyUpEvent event) {
				if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
					sendNameToServer();
				}
			}

			/**
			 * Send the name from the nameField to the server and wait for a response.
			 */
			private void sendNameToServer() {
				// First, we validate the input.
				errorLabel.setText("");
				String textToServer = nameField.getText();
				if (!FieldVerifier.isValidName(textToServer)) {