Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 import java.util.List;
Entry point into the Grocery List. This page's HTML template provides the header and footer content that is present on every page of the app, and also situates the navigation system's content panel into the main body of the page. The navigation system takes responsibility for filling the content panel with the appropriate body content based on the current history token in the page URL.
public class GroceryListClient extends Composite {
  private Navigation navigation;
  private NavBar navbar;
  private SimplePanel content;
  public void clientMain() {
  private User getUser(EntityManager em) {
    // XXX Of course, this only works if all the data is local.
    // When there is a server side to this demo, we will always have to authenticate with it before
    // we can produce a User instance capable of syncing.
    List<Userusers = em.createNamedQuery("allUsers"User.class).getResultList();
    final User user;
    if (users.isEmpty()) {
      User newUser = new User();
      user = newUser;
    else {
      user = users.get(0);
    return user;
New to GrepCode? Check out our FAQ X