Пример #1
0
        @Override
        protected void validate(
            Player entity, AsyncCallback<Map<Entry<? extends Widget>, String>> callback) {
          Map<Entry<? extends Widget>, String> errorMap =
              new HashMap<Entry<? extends Widget>, String>();
          if (StringUtil.isEmpty(entity.getNick(), true))
            errorMap.put(nickEntry, "Přezdívka musí být vyplněna");
          if (StringUtil.isEmpty(entity.getEmailAddress(), true))
            errorMap.put(emailEntry, "E-mail musí být vyplněn");

          callback.onSuccess(errorMap);
        }
Пример #2
0
 @Override
 public void updateEntity(Player entity) {
   entity.setActive(getWidget().getValue());
 }
Пример #3
0
 @Override
 public void setUpWidget(Player entity) {
   getWidget().setValue(entity.isActive());
 }
Пример #4
0
 @Override
 public void setUpWidget(Player entity) {
   getWidget().setText(entity.getLastName());
 }
Пример #5
0
 @Override
 public void updateEntity(Player entity) {
   entity.setEmailAddress(getWidget().getValue());
 }
Пример #6
0
 @Override
 public void setUpWidget(Player entity) {
   getWidget().setText(entity.getEmailAddress());
 }
Пример #7
0
 @Override
 protected SafeHtml getLabel(Player entity) {
   return SafeHtmlUtils.fromString(
       entity.getId() > 0 ? "Hráč " + entity.getNick() : "Nový hráč");
 }