/** * <br/> * @return */ public String getSearchString() { return textField.getValue(); }
@Override public Object getValue() { return field.getValue(); }
@Override public void componentKeyPress(ComponentEvent event) { if ((event.getKeyCode() == 13)) { // && (!search.getValue().equals(""))) { // searchStatus.setBusy("Connection to the Server"); if (search.getValue() != null) { searchText = search.getValue() == null ? "" : search.getValue(); loader.load(0, 25); } } }
private WsecRole getRoleModelData() { if(!this.isValid()) { output.info("Formularz nie wypełniony poprawnie"); return null; } WsecRole role = new WsecRole(); role.setName(roleName.getValue()); role.setDescription(roleDescription.getValue()); if(roleId.getValue() != null) { role.setId(Long.parseLong(roleId.getValue()+"")); } return role; }
private WsecGroup createModelGroup() { if (!this.isValid()) { output.info("Formularz nie wypełnłniony poprawnie"); return null; } WsecGroup group = new WsecGroup(); group.setName(groupName.getValue()); group.setDescription(groupDescription.getValue()); if (groupId.getValue() != null) { GWT.log(groupId.getValue() + "", null); group.setId(groupId.getValue()); } return group; }
public WsecGroup getModelObject() { if (!this.isValid()) { Log.warn("Form in invalid state, cannot create domain object"); return null; } group = new WsecGroup(); group.setDescription(groupDescription.getValue()); group.setName(groupName.getValue()); if (groupId.getValue() != null) { Object id = groupId.getValue(); group.setId(Long.parseLong(id.toString())); } return group; }
@Override public void componentKeyUp(ComponentEvent event) { if ((event.getKeyCode() == 8) && (search.getValue() == null)) { reset(); } }
@Override public void componentKeyUp(ComponentEvent event) { boolean enableSearch = true; if (Util.emptyString(textField.getValue()) && !enabledEmptySearch) { enableSearch = false; } else { enableSearch = true; } bSearch.setEnabled(enableSearch); } });
/** * Validate. * * @return true, if successful */ protected boolean validate() { boolean loginInfoOk = hasValue(userName) && hasValue(password) && (password.getValue().length() >= PASSWORD_MIN_LENGTH); login.setEnabled(loginInfoOk); return loginInfoOk; }
@Override public void componentKeyUp(ComponentEvent event) { if ((event.getKeyCode() == 8) && (search.getValue() == null)) { reset(); loader.load(0, 25); } }
@Override public void handleEvent(final MessageBoxEvent be) { String newTitle = be.getMessageBox().getTextBox().getValue(); boolean cancelled = be.getButtonClicked().getItemId().equals("cancel"); if (!Strings.isNullOrEmpty(newTitle) && !cancelled) { currentModel.setTitle(newTitle); reportBar.setReportTitle(newTitle); save(callback); } } });
@Override public void handleEvent(MessageBoxEvent be) { if (be.getButtonClicked().getItemId().equals(Dialog.OK)) { model.setTitle(box.getTextBox().getValue()); titleElement.setInnerText(ElementTitles.format(model)); } } });
public void execute() { this.saveStatus.setBusy("Operation in progress"); this.profile.setId(-1l); this.profile.setName(profileName.getValue()); this.profile.setDateCreation(new Date()); this.profile.setEnabled(true); if (this.closeOnSubmit) { cancel(); } this.injectEvent(); }
/** * <br/> */ @Override protected void maybeAddSourceValues() { String text = sourceField.getValue(); if (!Util.emptyString(text)) { sourceField.setValue(""); ModelData data = new BaseModelData(); data.set(getDisplayProperty(), text); addValue(data); } }
private void saveNewLocation() { if (coordinateFields.validate() && nameField.validate() && axeField.validate()) { LocationDTO newLocation = new LocationDTO(); newLocation.setId(new KeyGenerator().generateInt()); newLocation.setLocationTypeId(locationType.getId()); newLocation.setName(nameField.getValue()); newLocation.setAxe(axeField.getValue()); newLocation.setLatitude(coordinateFields.getLatitudeField().getValue()); newLocation.setLongitude(coordinateFields.getLongitudeField().getValue()); for (AdminLevelDTO level : adminPresenter.getAdminLevels()) { newLocation.setAdminEntity(level.getId(), adminPresenter.getAdminEntity(level)); } newLocationPresenter.accept(newLocation); } }