6.1. Binding the designer’s HTML to Java code

As you might have guessed by its name, UiBinder will bind a template to the Java code. This is accomplished by markup in the template and annotations in the Java source. Because you’re going to build a login form, let’s start by looking at listing 6.1, which contains some basic HTML code that you might use for a login form.

Listing 6.1. A basic HTML login form
<!DOCTYPE HTML> <html> <head> <!-- head stuff omitted --> </head> <body> <div class="container"> <div class="content"> <h1>S-Mart Login</h1> <div class="form-divider"></div> <form action="" method="post" id="login-form"> <ul> <li><label>Email</label></li> <li><input type="text" /></li> <li><label>Password</label></li> <li><input type="password" ...

Get GWT in Action, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.