private void addAxeField() { axeField = new TextField<String>(); axeField.setFieldLabel(I18N.CONSTANTS.axe()); axeField.setMaxLength(50); add(axeField); }
private void addNameField() { nameField = new TextField<String>(); nameField.setFieldLabel(locationType.getName()); nameField.setMaxLength(50); add(nameField); nameField.addKeyListener(new KeyListener() { @Override public void componentKeyDown(ComponentEvent event) { nameTypeAheadTimer.schedule(200); } }); }
public FolderForm() { super(); binding = new FormBinding(this); UiConstants constants = GWT.create(UiConstants.class); nameField = new TextField<String>(); nameField.setFieldLabel(constants.name()); nameField.setMaxLength(PROJECT_MAX_LENGTH); nameField.setAllowBlank(false); nameField.setValidator(new BlankValidator()); binding.addFieldBinding(new FieldBinding(nameField, "name")); this.add(nameField); }
public PartnerForm(Set<String> existingPartnerName) { super(); binding = new FormBinding(this); UiConstants constants = GWT.create(UiConstants.class); nameField = new TextField<>(); nameField.setFieldLabel(constants.name()); nameField.setMaxLength(PartnerDTO.NAME_MAX_LENGTH); nameField.setAllowBlank(false); nameField.setValidator(new UniqueNameValidator(existingPartnerName)); binding.addFieldBinding(new FieldBinding(nameField, "name")); this.add(nameField); TextField<String> fullField = new TextField<>(); fullField.setFieldLabel(constants.description()); fullField.setMaxLength(64); binding.addFieldBinding(new FieldBinding(fullField, "fullName")); this.add(fullField); }
public ProjectForm() { super(); binding = new FormBinding(this); UiConstants constants = GWT.create(UiConstants.class); nameField = new TextField<String>(); nameField.setFieldLabel(constants.name()); nameField.setMaxLength(PROJECT_MAX_LENGTH); nameField.setAllowBlank(false); nameField.setValidator(new BlankValidator()); binding.addFieldBinding(new FieldBinding(nameField, "name")); this.add(nameField); TextArea descriptionTextArea = new TextArea(); descriptionTextArea.setFieldLabel(constants.description()); descriptionTextArea.setMaxLength(250); binding.addFieldBinding(new FieldBinding(descriptionTextArea, "description")); this.add(descriptionTextArea); }
public AttributeForm() { binding = new FormBinding(this); final NumberField idField = new NumberField(); idField.setFieldLabel("ID"); idField.setReadOnly(true); binding.addFieldBinding(new FieldBinding(idField, "id")); add(idField); TextField<String> nameField = new TextField<String>(); nameField.setFieldLabel(I18N.CONSTANTS.name()); nameField.setMaxLength(AttributeDTO.NAME_MAX_LENGTH); nameField.setAllowBlank(false); nameField.setValidator(new BlankValidator()); binding.addFieldBinding(new OnlyValidFieldBinding(nameField, "name")); add(nameField); hideFieldWhenNull(idField); }
public DatabaseForm(final Dispatcher dispatcher) { binding = new FormBinding(this); TextField<String> nameField = new TextField<String>(); nameField.setFieldLabel(I18N.CONSTANTS.name()); nameField.setAllowBlank(false); nameField.setValidator(new BlankValidator()); nameField.setMaxLength(UserDatabaseDTO.MAX_NAME_LENGTH); binding.addFieldBinding(new FieldBinding(nameField, "name")); add(nameField); TextField<String> fullNameField = new TextField<String>(); fullNameField.setFieldLabel(I18N.CONSTANTS.description()); fullNameField.setMaxLength(50); binding.addFieldBinding(new FieldBinding(fullNameField, "fullName")); add(fullNameField); countryField = new RemoteComboBox<CountryDTO>(); countryField.setStore(createCountryStore(dispatcher, countryField)); countryField.setFieldLabel(I18N.CONSTANTS.country()); countryField.setValueField("id"); countryField.setDisplayField("name"); countryField.setAllowBlank(false); countryField.setEnabled(true); countryField.setTriggerAction(TriggerAction.ALL); binding.addFieldBinding(new FieldBinding(countryField, "country") { @Override public void updateModel() { ((UserDatabaseDTO) model).setCountry((CountryDTO) field.getValue()); } }); add(countryField); }
nameField.setAllowBlank(false); nameField.setFieldLabel(I18N.CONSTANTS.name()); nameField.setMaxLength(50); nameField.addListener(Events.Change, new ProfileChangeListener("name")); binding.addFieldBinding(new FieldBinding(nameField, "name")); organizationField.setMaxLength(100); organizationField.addListener(Events.Change, new ProfileChangeListener("organization")); binding.addFieldBinding(new FieldBinding(organizationField, "organization")); jobtitleField.setMaxLength(100); jobtitleField.addListener(Events.Change, new ProfileChangeListener("jobtitle")); binding.addFieldBinding(new FieldBinding(jobtitleField, "jobtitle"));
nameField.setMaxLength(LocationTypeDTO.NAME_MAX_LENGTH); nameField.setAllowBlank(false); nameField.setValidator(new BlankValidator());
nameField.setMaxLength(255); nameField.setAllowBlank(false); nameField.setValidator(new BlankValidator());
nameField.setAllowBlank(false); nameField.setValidator(new BlankValidator()); nameField.setMaxLength(50); this.add(nameField);
nameField.setMaxLength(AttributeGroupDTO.NAME_MAX_LENGTH); nameField.setAllowBlank(false); nameField.setValidator(new BlankValidator());
unitsField.setFieldLabel(constants.units()); unitsField.setAllowBlank(false); unitsField.setMaxLength(IndicatorDTO.UNITS_MAX_LENGTH); binding.addFieldBinding(new OnlyValidFieldBinding(unitsField, IndicatorDTO.UNITS_PROPERTY)); this.add(unitsField); categoryField.setName("category"); categoryField.setFieldLabel(constants.category()); categoryField.setMaxLength(IndicatorDTO.MAX_CATEGORY_LENGTH); binding.addFieldBinding(new OnlyValidFieldBinding(categoryField, IndicatorDTO.CATEGORY_PROPERTY)); this.add(categoryField); listHeaderField.setMaxLength(IndicatorDTO.MAX_LIST_HEADER_LENGTH); binding.addFieldBinding(new OnlyValidFieldBinding(listHeaderField, IndicatorDTO.LIST_HEADER_PROPERTY)); this.add(listHeaderField);
nameField.setAllowBlank(false); nameField.setFieldLabel(I18N.CONSTANTS.name()); nameField.setMaxLength(ActivityFormDTO.NAME_MAX_LENGTH); nameField.setValidator(new BlankValidator());