Example #1
0
 @Override
 public void setModel(Store store) {
   if (store.getName() == null || store.getName().trim().length() == 0) {
     store.setName("Unnamed Store"); // XXX this side effect is not in a great place
   }
   storeBinder.setModel(store, InitialState.FROM_MODEL);
   departments.setText(store.getDepartments().size() + " Departments");
 }
Example #2
0
 @Override
 public void setModel(final Store model) {
   link.setText(model.getName());
   link.addClickHandler(
       new ClickHandler() {
         @Override
         public void onClick(ClickEvent event) {
           groceryListWidget.filterOn(model);
         }
       });
 }