Java Code Examples for com.smartgwt.client.widgets.form.fields.TextAreaItem#setHeight()

The following examples show how to use com.smartgwt.client.widgets.form.fields.TextAreaItem#setHeight() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AutomationDialog.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
private Tab prepareScriptTab() {
	scriptForm = new DynamicForm();
	scriptForm.setWidth100();
	scriptForm.setHeight100();
	scriptForm.setTitleOrientation(TitleOrientation.TOP);
	scriptForm.setNumCols(1);

	final TextAreaItem automation = ItemFactory.newTextAreaItemForAutomation("automation", "automation", null, null,
			false);
	automation.setShowTitle(false);
	automation.setStartRow(false);
	automation.setRequired(true);
	automation.setWidth("*");
	automation.setHeight("*");
	scriptForm.setItems(automation);

	Tab tab = new Tab(I18N.message("script"));
	tab.setPane(scriptForm);
	return tab;
}
 
Example 2
Source File: DesaExportAction.java    From proarc with GNU General Public License v3.0 6 votes vote down vote up
private DynamicForm createLogForm() {
    DynamicForm form = new DynamicForm();
    form.setBrowserSpellCheck(false);
    form.setCanEdit(false);
    form.setWidth100();
    form.setHeight("40%");
    TextAreaItem textAreaItem = new TextAreaItem(ExportResourceApi.RESULT_ERROR_LOG);
    textAreaItem.setColSpan("*");
    textAreaItem.setHeight("*");
    textAreaItem.setWrap(TextAreaWrap.OFF);
    textAreaItem.setShowTitle(false);
    textAreaItem.setWidth("*");
    textAreaItem.setCanEdit(false);
    form.setItems(textAreaItem);
    return form;
}
 
Example 3
Source File: ImportBatchChooser.java    From proarc with GNU General Public License v3.0 6 votes vote down vote up
private DynamicForm createLogForm() {
    DynamicForm form = new DynamicForm();
    form.setBrowserSpellCheck(false);
    form.setCanEdit(false);
    form.setWidth100();
    form.setHeight("40%");
    TextAreaItem textAreaItem = new TextAreaItem(ImportBatchDataSource.FIELD_LOG);
    textAreaItem.setColSpan("*");
    textAreaItem.setHeight("*");
    textAreaItem.setWrap(TextAreaWrap.OFF);
    textAreaItem.setShowTitle(false);
    textAreaItem.setWidth("*");
    textAreaItem.setCanEdit(false);
    form.setItems(textAreaItem);
    return form;
}
 
Example 4
Source File: TaskEditor.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
private VLayout prepareAutomationPanel() {
	VLayout automationPanel = new VLayout();
	automationPanel.setWidth100();
	automationPanel.setHeight100();

	DynamicForm automationForm = new DynamicForm();
	automationForm.setTitleOrientation(TitleOrientation.TOP);
	automationForm.setNumCols(1);
	automationForm.setValuesManager(vm);

	TextAreaItem onCreation = ItemFactory.newTextAreaItemForAutomation("onCreation",
			state.getType() == GUIWFState.TYPE_TASK ? "execscriptontaskreached" : "execscriptonenstatusreached",
			state.getOnCreation(), null, false);
	onCreation.setWidth("*");
	onCreation.setHeight(200);
	onCreation.setWrapTitle(false);

	TextAreaItem onAssignment = ItemFactory.newTextAreaItemForAutomation("onAssignment",
			"execscriptontaskassignment", state.getOnAssignment(), null, false);
	onAssignment.setWidth("*");
	onAssignment.setHeight(200);
	onAssignment.setWrapTitle(false);

	if (state.getType() == GUIWFState.TYPE_TASK)
		automationForm.setItems(onCreation, onAssignment);
	else {
		onCreation.setHeight(400);
		automationForm.setItems(onCreation);
	}

	automationPanel.addMember(automationForm);

	return automationPanel;
}
 
Example 5
Source File: ZonalOCRTemplateSettings.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
private void prepareForm() {
	form = new DynamicForm();
	form.setWidth100();
	form.setAlign(Alignment.LEFT);
	form.setColWidths("1px, 100%");
	vm = new ValuesManager();
	form.setValuesManager(vm);

	final StaticTextItem fileNameWaring = ItemFactory.newStaticTextItem("fileNameWarning",
			I18N.message("attention"), I18N.message("filenamewarning"));
	fileNameWaring.setRequired(true);

	TextItem name = ItemFactory.newTextItem("name", "name", ocrPanel.getSelectedOcrTemplate().getName());
	name.setRequired(true);
	name.setDisabled(ocrPanel.getSelectedOcrTemplate().getId() != 0L);

	StaticTextItem id = ItemFactory.newStaticTextItem("id", I18N.message("id"),
			"" + ocrPanel.getSelectedOcrTemplate().getId());
	id.setVisible(ocrPanel.getSelectedOcrTemplate().getId() != 0L);

	SpinnerItem batch = ItemFactory.newSpinnerItem("batch", "batch",
			Session.get().getConfigAsInt("zonalocr.batch"));
	batch.setStep(50);
	batch.setMin(1);

	TextAreaItem description = ItemFactory.newTextAreaItem("description", "description",
			ocrPanel.getSelectedOcrTemplate().getDescription());
	description.setHeight(200);

	if (Session.get().isDefaultTenant())
		form.setItems(id, name, description, batch);
	else
		form.setItems(id, name, description);
}
 
Example 6
Source File: BarcodeTemplateSettings.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
private void prepareForm() {
	form = new DynamicForm();
	form.setWidth100();
	form.setAlign(Alignment.LEFT);
	form.setColWidths("1px, 100%");
	vm = new ValuesManager();
	form.setValuesManager(vm);

	TextItem name = ItemFactory.newTextItem("name", "name", template.getName());
	name.setRequired(true);
	name.setDisabled(template.getId() != 0L);

	StaticTextItem id = ItemFactory.newStaticTextItem("id", I18N.message("id"), "" + template.getId());
	id.setVisible(template != null && template.getId() != 0L);

	TextAreaItem description = ItemFactory.newTextAreaItem("description", "description", template.getDescription());
	description.setHeight(200);

	// The optional batch
	SpinnerItem batch = ItemFactory.newSpinnerItem("batch", "batch", template.getBatch());
	batch.setRequired(true);
	batch.setMin(1);
	batch.setStep(10);
	batch.setHintStyle("hint");

	// The image threshold
	SpinnerItem resolutionThreshold = ItemFactory.newSpinnerItem("resolutionthreshold",
			I18N.message("resolutionthreshold"), template.getImageThreshold());
	resolutionThreshold.setRequired(true);
	resolutionThreshold.setWrapTitle(false);
	resolutionThreshold.setMin(50);
	resolutionThreshold.setStep(100);
	resolutionThreshold.setHint("pixels");

	if (Session.get().isDefaultTenant() && template.getId() != 0L)
		form.setItems(id, name, description, batch, resolutionThreshold);
	else
		form.setItems(id, name, description);
}
 
Example 7
Source File: SearchIndexCheckStatus.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
public SearchIndexCheckStatus(String result) {
	super();
	
	setWidth100();
	setHeight100();

	setHeaderControls(HeaderControls.HEADER_LABEL, HeaderControls.CLOSE_BUTTON);
	setTitle(I18N.message("checkfulltextindex"));
	setIsModal(true);
	setShowModalMask(true);
	centerInPage();


	final DynamicForm form = new DynamicForm();
	form.setHeight100();
	form.setWidth100();
	form.setTitleOrientation(TitleOrientation.TOP);

	final TextAreaItem status = new TextAreaItem();
	status.setWidth(700);
	status.setHeight("100%");
	status.setValue(result);
	status.setShowTitle(false);

	form.setFields(status);
	addItem(form);
}
 
Example 8
Source File: ItemFactory.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * Creates a new TextAreaItem
 * 
 * @param name The item name (mandatory)
 * @param title The item title (mandatory)
 * @param value The item value (optional)
 * 
 * @return the new item
 */
public static TextAreaItem newTextAreaItem(String name, String title, String value) {
	TextAreaItem item = new TextAreaItem();
	item.setName(filterItemName(name));
	item.setTitle(I18N.message(title));
	item.setHeight("*");
	if (value != null)
		item.setValue(value);
	else
		item.setValue("");
	return item;
}
 
Example 9
Source File: TextEditor.java    From proarc with GNU General Public License v3.0 5 votes vote down vote up
private DynamicForm createForm(TextDataSource dataSource) {
    DynamicForm form = new DynamicForm();
    form.setDataSource(dataSource);
    form.setWidth100();
    form.setHeight100();
    TextAreaItem textAreaItem = new TextAreaItem(TextDataSource.FIELD_CONTENT);
    textAreaItem.setColSpan("*");
    textAreaItem.setHeight("*");
    textAreaItem.setWrap(TextAreaWrap.OFF);
    textAreaItem.setShowTitle(false);
    textAreaItem.setWidth("*");
    form.setFields(textAreaItem);
    return form;
}
 
Example 10
Source File: WorkflowTaskFormView.java    From proarc with GNU General Public License v3.0 5 votes vote down vote up
private FormItem createFormItem(DisplayType displayType, Record profile) {
    String name = profile.getAttribute(WorkflowParameterDataSource.FIELD_NAME);
    switch (displayType) {
        case SELECT:
            SelectItem si = new SelectItem();
            setOptions(si, profile);
            si.setWidth("*");
            return si;
        case COMBOBOX:
            ComboBoxItem cbi = new ComboBoxItem();
            setOptions(cbi, profile);
            cbi.setLength(2000);
            cbi.setWidth("*");
            return cbi;
        case CHECKBOX:
            CheckboxItem ci = new CheckboxItem();
            // the width must be set otherwise it overflows the form
            ci.setWidth(150);
            ci.setAllowEmptyValue(true);
            return ci;
        case TEXTAREA:
            TextAreaItem tai = new TextAreaItem();
            tai.setStartRow(true);
            tai.setEndRow(true);
            tai.setLength(2000);
            tai.setColSpan("*");
            tai.setWidth("*");
            tai.setHeight(30);
            return tai;
        case DATETIME:
            DateTimeItem di = new DateTimeItem();
            return di;
        case TEXT:
        default:
            TextItem ti = new TextItem(name);
            ti.setLength(2000);
            ti.setWidth("*");
            return ti;
    }
}
 
Example 11
Source File: MonographUnitForm.java    From proarc with GNU General Public License v3.0 5 votes vote down vote up
public MonographUnitForm(final ClientMessages i18n) {
    setWidth100();
    setHeight100();
    setTitleOrientation(TitleOrientation.TOP);
    setNumCols(1);

    // identifiers
    final RepeatableFormItem identifiers = new RepeatableFormItem(ModsCustomDataSource.FIELD_IDENTIFIERS,
            i18n.MonographUnitForm_Identifiers_Title());
    identifiers.setDataSource(IdentifierDataSource.getInstance());
    identifiers.setValidators(
            new IdentifiersValidator(i18n, Arrays.asList(IdentifierDataSource.TYPE_UUID)));
    DynamicForm identifierForm = new DynamicForm();
    identifierForm.setUseAllDataSourceFields(true);
    identifierForm.setNumCols(4);
    identifiers.setFormPrototype(identifierForm);
    identifiers.setEndRow(true);
    identifiers.setColSpan("2");

    TextItem unitNumber = new TextItem(ModsCustomDataSource.FIELD_MONOGRAPHUNIT_NUMBER);
    unitNumber.setTitle(i18n.MonographUnitForm_UnitNumber_Title());
    unitNumber.setRequired(true);
    unitNumber.setValidators(new IsIntegerValidator());

    TextAreaItem note = new TextAreaItem(ModsCustomDataSource.FIELD_NOTE, i18n.MonographUnitForm_Note_Title());
    note.setWidth("*");
    note.setHeight("*");
    note.setColSpan("*");

    setFields(unitNumber, identifiers, note);
}
 
Example 12
Source File: PeriodicalVolumeForm.java    From proarc with GNU General Public License v3.0 5 votes vote down vote up
public PeriodicalVolumeForm(ClientMessages i18n) {
    setWidth100();
    setHeight100();
    setTitleOrientation(TitleOrientation.TOP);
    setNumCols(1);

    TextItem volumeNumber = new TextItem(ModsCustomDataSource.FIELD_PER_VOLUME_NUMBER,
            i18n.PeriodicalVolumeForm_Number_Title());
    volumeNumber.setRequired(true);
    // javascript regexp ^([1-9]\d{0,4}(-[1-9]\d{0,4})?)$
    volumeNumber.setValidators(new StringTrimValidator(), new RegExpValidator("^([1-9]\\d{0,4}(-[1-9]\\d{0,4})?)$"));
    TextItem date = new TextItem(ModsCustomDataSource.FIELD_PER_VOLUME_YEAR,
            i18n.PeriodicalVolumeForm_Date_Title());
    date.setRequired(true);
    // issue 43; see https://docs.google.com/document/d/1zSriHPdnUY5d_tKv0M8a6nEym560DKh2H6XZ24tGAEw/edit?pli=1
    // javascript regexp ^([1-9]\d{3}(-[1-9]\d{3})?)$
    date.setValidators(new StringTrimValidator(), new RegExpValidator("^([1-9]\\d{3}(-[1-9]\\d{3})?)$"));
    date.setEndRow(true);

    // identifiers
    final RepeatableFormItem identifiers = new RepeatableFormItem(ModsCustomDataSource.FIELD_IDENTIFIERS,
            i18n.PeriodicalVolumeForm_Identifiers_Title());
    identifiers.setDataSource(IdentifierDataSource.getInstance());
    identifiers.setValidators(
            new IdentifiersValidator(i18n, Arrays.asList(IdentifierDataSource.TYPE_UUID)));
    DynamicForm identifierForm = new DynamicForm();
    identifierForm.setUseAllDataSourceFields(true);
    identifierForm.setNumCols(4);
    identifiers.setFormPrototype(identifierForm);
    identifiers.setEndRow(true);
    identifiers.setColSpan("2");

    TextAreaItem note = new TextAreaItem(ModsCustomDataSource.FIELD_NOTE,
            i18n.PeriodicalVolumeForm_Note_Title());
    note.setWidth("*");
    note.setHeight("*");
    note.setColSpan("*");

    setFields(volumeNumber, date, identifiers, note);
}
 
Example 13
Source File: FirewallPanel.java    From document-management-software with GNU Lesser General Public License v3.0 4 votes vote down vote up
private void init() {
	form = new DynamicForm();
	form.setValuesManager(vm);
	form.setTitleOrientation(TitleOrientation.TOP);
	if (user != null)
		form.setNumCols(2);
	else
		form.setNumCols(1);
	final TextAreaItem whitelist = ItemFactory.newTextAreaItem("whitelist", "whitelist", null);
	whitelist.setHeight(120);
	whitelist.setWidth(350);
	whitelist.setHint(I18N.message("blacklisthint"));
	if (changedHandler != null)
		whitelist.addChangedHandler(changedHandler);
	if (Session.get().isDemo())
		whitelist.setDisabled(true);

	final TextAreaItem blacklist = ItemFactory.newTextAreaItem("blacklist", "blacklist", null);
	blacklist.setHeight(120);
	blacklist.setWidth(350);
	blacklist.setHint(I18N.message("blacklisthint"));
	if (changedHandler != null)
		blacklist.addChangedHandler(changedHandler);
	if (Session.get().isDemo())
		blacklist.setDisabled(true);

	form.setItems(whitelist, blacklist);

	if (user == null) {
		/*
		 * We are operating on general filters
		 */
		SettingService.Instance.get().loadSettingsByNames(
				new String[] { "firewall.whitelist", "firewall.blacklist" }, new AsyncCallback<GUIParameter[]>() {
					@Override
					public void onFailure(Throwable caught) {
						Log.serverError(caught);
					}

					@Override
					public void onSuccess(GUIParameter[] params) {
						whitelist.setValue(params[0].getValue().replace(',', '\n'));
						blacklist.setValue(params[1].getValue().replace(',', '\n'));
					}
				});
	} else {
		/*
		 * We are operating on user's specific filters
		 */
		whitelist.setValue(user.getIpWhitelist() != null ? user.getIpWhitelist().replace(',', '\n') : "");
		blacklist.setValue(user.getIpBlacklist() != null ? user.getIpBlacklist().replace(',', '\n') : "");
	}
}
 
Example 14
Source File: NdkAudioPageForm.java    From proarc with GNU General Public License v3.0 4 votes vote down vote up
/**
     * Create a new form.
     * @param i18n I18N
     * @param typeValueMapId {@link ValueMapDataSource#getOptionDataSource}
     *          reference to bundle with page types.
     */
    public NdkAudioPageForm(ClientMessages i18n, String typeValueMapId) {
        // save on Enter is supposed mainly for ImportBatchItemEditor
        // see submit handler in ModsMultiEditor
        setSaveOnEnter(true);
        setWidth100();
        setHeight100();
        setTitleOrientation(TitleOrientation.TOP);

        TextItem pageType = new TextItem(ModsCustomDataSource.FIELD_PAGE_TYPE);
        pageType.setTitle(i18n.PageForm_PageType_Title());
        pageType.setEndRow(true);
        pageType.setRequired(true);
        pageType.setReadOnly();
        pageType.disable();

        IntegerItem pageIndex = new IntegerItem(ModsCustomDataSource.FIELD_PAGE_INDEX);
        pageIndex.setTitle(i18n.PageForm_PageIndex_Title());
        pageIndex.setValidators(new IsIntegerValidator());
        pageIndex.setRequired(true);
        pageIndex.setEndRow(true);

        TextItem pageNumber = new TextItem(ModsCustomDataSource.FIELD_PAGE_NUMBER);
        pageNumber.setTitle(i18n.PageForm_PageNumber_Title());
        pageNumber.setEndRow(true);
        pageNumber.setRequired(true);
        pageNumber.setValidators(new StringTrimValidator());
//        pageNumber.setLength(5);

        final RepeatableFormItem identifiers = new RepeatableFormItem(ModsCustomDataSource.FIELD_IDENTIFIERS,
                i18n.PageForm_Identifiers_Title());
        identifiers.setDataSource(IdentifierDataSource.getInstance());
        identifiers.setRequired(true);
        identifiers.setValidators(
                new IdentifiersValidator(i18n, Arrays.asList(IdentifierDataSource.TYPE_UUID)));
        DynamicForm identifierForm = new DynamicForm();
        identifierForm.setUseAllDataSourceFields(true);
        identifierForm.setNumCols(4);
        identifiers.setFormPrototype(identifierForm);
        identifiers.setEndRow(true);
        identifiers.setColSpan("3");

//        TextAreaItem note = new AutoFitTextAreaItem(ModsCustomDataSource.FIELD_NOTE, "Note");
        TextAreaItem note = new TextAreaItem(ModsCustomDataSource.FIELD_NOTE, i18n.PageForm_Note_Title());
        note.setWidth("*");
        //https://github.com/proarc/proarc/issues/645 GWT v.6.0-p20161023 form draw issue
        note.setHeight("*");
        note.setColSpan("*");

        setFields(pageType, pageIndex, pageNumber, identifiers, note);

        IntegerRangeValidator integerRangeValidator = new IntegerRangeValidator();
        integerRangeValidator.setMin(0);
        integerRangeValidator.setMax(Integer.MAX_VALUE);

        pageIndex.setValidators(integerRangeValidator);
    }
 
Example 15
Source File: PeriodicalIssueForm.java    From proarc with GNU General Public License v3.0 4 votes vote down vote up
public PeriodicalIssueForm(ClientMessages i18n) {
    setWidth100();
    setHeight100();
    setTitleOrientation(TitleOrientation.TOP);
    setNumCols(1);

    ComboBoxItem issueSequenceNumber = new ComboBoxItem(ModsCustomDataSource.FIELD_PER_ISSUE_NUMBER_SORTING,
            i18n.PeriodicalIssueForm_NumberSorting_Title());
    issueSequenceNumber.setRequired(true);
    issueSequenceNumber.setValidators(new StringTrimValidator(), new RegExpValidator(
            "^([1-9]\\d{0,4}(-[1-9]\\d{0,4})?|mimořádné|zvláštní|na ukázku)$"));
    issueSequenceNumber.setValueMap("mimořádné", "na ukázku", "zvláštní");
    issueSequenceNumber.setHideEmptyPickList(true);

    TextItem date = new TextItem(ModsCustomDataSource.FIELD_PER_ISSUE_DATE, i18n.PeriodicalIssueForm_Date_Title());
    date.setRequired(true);
    // issue 43, see https://docs.google.com/document/d/1zSriHPdnUY5d_tKv0M8a6nEym560DKh2H6XZ24tGAEw/edit?pli=1
    // YYYY|YYYY-YYYY|MM.YYYY|MM.-MM.YYYY|DD.MM.YYYY|DD.-DD.MM.YYYY
    // javascript regex ^([1-9]\d{3}(-[1-9]\d{3})?|(1\d|[1-9])\.(-(1\d|[1-9])\.)?[1-9]\d{3}|([123]\d|[1-9])\.(1\d|[1-9])\.(-([123]\d|[1-9])\.(1\d|[1-9])\.)?[1-9]\d{3})$
    date.setValidators(new StringTrimValidator(), new RegExpValidator(
            "^([1-9]\\d{3}(-[1-9]\\d{3})?|(1\\d|[1-9])\\.(-(1\\d|[1-9])\\.)?[1-9]\\d{3}|([123]\\d|[1-9])\\.(1\\d|[1-9])\\.(-([123]\\d|[1-9])\\.(1\\d|[1-9])\\.)?[1-9]\\d{3})$"));

    // identifiers
    final RepeatableFormItem identifiers = new RepeatableFormItem(ModsCustomDataSource.FIELD_IDENTIFIERS,
            i18n.PeriodicalIssueForm_Identifiers_Title());
    identifiers.setDataSource(IdentifierDataSource.getInstance());
    identifiers.setValidators(
            new IdentifiersValidator(i18n, Arrays.asList(IdentifierDataSource.TYPE_UUID)));
    DynamicForm identifierForm = new DynamicForm();
    identifierForm.setUseAllDataSourceFields(true);
    identifierForm.setNumCols(4);
    identifiers.setFormPrototype(identifierForm);
    identifiers.setEndRow(true);
    identifiers.setColSpan("2");

    TextAreaItem note = new TextAreaItem(ModsCustomDataSource.FIELD_NOTE, i18n.PeriodicalIssueForm_Note_Title());
    note.setWidth("*");
    note.setHeight("*");
    note.setColSpan("*");

    setFields(issueSequenceNumber, date, identifiers, note);
}
 
Example 16
Source File: PageForm.java    From proarc with GNU General Public License v3.0 4 votes vote down vote up
/**
     * Create a new form.
     * @param i18n I18N
     * @param typeValueMapId {@link ValueMapDataSource#getOptionDataSource}
     *          reference to bundle with page types.
     */
    public PageForm(ClientMessages i18n, String typeValueMapId) {
        // save on Enter is supposed mainly for ImportBatchItemEditor
        // see submit handler in ModsMultiEditor
        setSaveOnEnter(true);
        setWidth100();
        setHeight100();
        setTitleOrientation(TitleOrientation.TOP);
        SelectItem pageType = new SelectItem(ModsCustomDataSource.FIELD_PAGE_TYPE, i18n.PageForm_PageType_Title());
        pageType.setOptionDataSource(ValueMapDataSource.getInstance().getOptionDataSource(typeValueMapId));
        pageType.setValueField(BundleValue.KEY);
        pageType.setDisplayField(BundleValue.VALUE);
        pageType.setDefaultValue(ModsCustomDataSource.getDefaultPageType());
        pageType.setWidth(200);
        pageType.setEndRow(true);

        IntegerItem pageIndex = new IntegerItem(ModsCustomDataSource.FIELD_PAGE_INDEX);
        pageIndex.setTitle(i18n.PageForm_PageIndex_Title());
        pageIndex.setValidators(new IsIntegerValidator());
        pageIndex.setRequired(true);
        pageIndex.setEndRow(true);

        TextItem pageNumber = new TextItem(ModsCustomDataSource.FIELD_PAGE_NUMBER);
        pageNumber.setTitle(i18n.PageForm_PageNumber_Title());
        pageNumber.setEndRow(true);
        pageNumber.setRequired(true);
        pageNumber.setValidators(new StringTrimValidator());
//        pageNumber.setLength(5);

        final RepeatableFormItem identifiers = new RepeatableFormItem(ModsCustomDataSource.FIELD_IDENTIFIERS,
                i18n.PageForm_Identifiers_Title());
        identifiers.setDataSource(IdentifierDataSource.getInstance());
        identifiers.setRequired(true);
        identifiers.setValidators(
                new IdentifiersValidator(i18n, Arrays.asList(IdentifierDataSource.TYPE_UUID)));
        DynamicForm identifierForm = new DynamicForm();
        identifierForm.setUseAllDataSourceFields(true);
        identifierForm.setNumCols(4);
        identifiers.setFormPrototype(identifierForm);
        identifiers.setEndRow(true);
        identifiers.setColSpan("3");

//        TextAreaItem note = new AutoFitTextAreaItem(ModsCustomDataSource.FIELD_NOTE, "Note");
        TextAreaItem note = new TextAreaItem(ModsCustomDataSource.FIELD_NOTE, i18n.PageForm_Note_Title());
        note.setWidth("*");
        //https://github.com/proarc/proarc/issues/645 GWT v.6.0-p20161023 form draw issue
        note.setHeight("*");
        note.setColSpan("*");

        setFields(pageType, pageIndex, pageNumber, identifiers, note);

        IntegerRangeValidator integerRangeValidator = new IntegerRangeValidator();
        integerRangeValidator.setMin(0);
        integerRangeValidator.setMax(Integer.MAX_VALUE);

        pageIndex.setValidators(integerRangeValidator);
    }