Example usage for com.vaadin.ui Alignment BOTTOM_RIGHT

List of usage examples for com.vaadin.ui Alignment BOTTOM_RIGHT

Introduction

In this page you can find the example usage for com.vaadin.ui Alignment BOTTOM_RIGHT.

Prototype

Alignment BOTTOM_RIGHT

To view the source code for com.vaadin.ui Alignment BOTTOM_RIGHT.

Click Source Link

Usage

From source file:jp.primecloud.auto.ui.WinServerNetworkConfig.java

License:Open Source License

WinServerNetworkConfig(Application ap, Long instanceNo, Long platformNo, InstanceNetworkDto instanceNetworkDto,
        List<InstanceNetworkDto> instanceNetworkDtos) {
    this.ap = ap;
    this.instanceNo = instanceNo;
    this.platformNo = platformNo;
    this.instanceNetworkDto = instanceNetworkDto;
    this.isAddMode = (this.instanceNetworkDto == null) ? true : false;
    this.instanceNetworkDtos = instanceNetworkDtos;

    // Window//from w  w w  . j a v a  2s  .  co  m
    if (isAddMode) {
        //?
        setIcon(Icons.ADD.resource());
        setCaption(ViewProperties.getCaption("window.WinServerAddNetwork"));
    } else {
        //?
        setIcon(Icons.EDIT.resource());
        setCaption(ViewProperties.getCaption("window.WinServerEditNetwork"));
    }
    setModal(true);
    setWidth("380px");
    setResizable(false);

    // Layout
    VerticalLayout layout = (VerticalLayout) getContent();
    layout.setMargin(true);
    layout.setSpacing(true);

    // Form
    Form form = new Form();

    //??
    networkSelect = new ComboBox(ViewProperties.getCaption("field.netWork"));
    networkSelect.setWidth(COMBOBOX_WIDTH);
    networkSelect.setNullSelectionAllowed(false);
    networkSelect.setItemCaptionPropertyId(CID_NETWORK);
    networkSelect.setItemCaptionMode(AbstractSelect.ITEM_CAPTION_MODE_PROPERTY);
    networkSelect.setImmediate(true);
    networkSelect.addListener(new Property.ValueChangeListener() {
        @Override
        public void valueChange(Property.ValueChangeEvent event) {
            changeNetwork(event);
        }
    });

    //IP?
    ipModeSelect = new ComboBox(ViewProperties.getCaption("caption.field.ipMode"));
    ipModeSelect.setWidth(COMBOBOX_WIDTH);
    ipModeSelect.setNullSelectionAllowed(false);
    ipModeSelect.setItemCaptionPropertyId(CID_IP_MODE);
    ipModeSelect.setItemCaptionMode(AbstractSelect.ITEM_CAPTION_MODE_PROPERTY);
    ipModeSelect.setImmediate(true);
    ipModeSelect.addListener(new Property.ValueChangeListener() {
        @Override
        public void valueChange(Property.ValueChangeEvent event) {
            changeIpMode(event);
        }
    });

    //IP
    ipAddressField = new TextField(ViewProperties.getCaption("field.ipAddress"));
    ipAddressField.setWidth("100%");
    ipAddressField.setImmediate(true);

    //?
    netmaskField = new TextField(ViewProperties.getCaption("field.netmask"));
    netmaskField.setWidth("100%");
    netmaskField.setReadOnly(true);
    netmaskField.setImmediate(true);

    //
    gateWayField = new TextField(ViewProperties.getCaption("field.gateway"));
    gateWayField.setWidth("100%");
    gateWayField.setReadOnly(true);
    gateWayField.setImmediate(true);

    //DNS1
    dns1Field = new TextField(ViewProperties.getCaption("field.dns1"));
    dns1Field.setWidth("100%");
    dns1Field.setReadOnly(true);
    dns1Field.setImmediate(true);

    //DNS2
    dns2Field = new TextField(ViewProperties.getCaption("field.dns2"));
    dns2Field.setWidth("100%");
    dns2Field.setReadOnly(true);
    dns2Field.setImmediate(true);

    //Primary
    primaryOpg = new OptionGroup(ViewProperties.getCaption("field.primary"));
    primaryOpg.addItem(CID_PRIMARY);
    primaryOpg.setItemCaption(CID_PRIMARY, "");
    primaryOpg.setNullSelectionAllowed(false);
    primaryOpg.setImmediate(true);

    form.getLayout().addComponent(networkSelect);
    form.getLayout().addComponent(ipModeSelect);
    form.getLayout().addComponent(ipAddressField);
    form.getLayout().addComponent(netmaskField);
    form.getLayout().addComponent(gateWayField);
    form.getLayout().addComponent(dns1Field);
    form.getLayout().addComponent(dns2Field);
    form.getLayout().addComponent(primaryOpg);
    layout.addComponent(form);

    // ??
    HorizontalLayout buttonBar = new HorizontalLayout();
    buttonBar.setSpacing(true);
    buttonBar.setMargin(false, true, true, false);
    layout.addComponent(buttonBar);
    layout.setComponentAlignment(buttonBar, Alignment.BOTTOM_RIGHT);

    // OK Button
    Button btnOk = new Button(ViewProperties.getCaption("button.ok"));
    btnOk.setDescription(ViewProperties.getCaption("description.ok"));
    btnOk.addListener(new Button.ClickListener() {
        @Override
        public void buttonClick(ClickEvent event) {
            okButtonClick(event);
        }
    });
    buttonBar.addComponent(btnOk);
    // [Enter]?OK
    btnOk.setClickShortcut(KeyCode.ENTER);

    //Cancel Button
    Button btnCancel = new Button(ViewProperties.getCaption("button.cancel"));
    btnCancel.setDescription(ViewProperties.getCaption("description.cancel"));
    btnCancel.addListener(new Button.ClickListener() {
        @Override
        public void buttonClick(ClickEvent event) {
            close();
        }
    });
    buttonBar.addComponent(btnCancel);

    //?
    initData();

    //
    showData();

    // ??
    initValidation();
}

From source file:jp.primecloud.auto.ui.WinServiceAdd.java

License:Open Source License

WinServiceAdd(Application ap) {
    apl = ap;//w  w w.j av  a 2  s  . co m

    //
    setIcon(Icons.ADD.resource());
    setCaption(ViewProperties.getCaption("window.winServiceAdd"));
    setModal(true);
    setWidth("630px");
    //setHeight("500px");

    VerticalLayout layout = (VerticalLayout) getContent();
    layout.setMargin(false, true, false, true);
    layout.setSpacing(false);

    // 
    layout.addComponent(new BasicForm());

    // ??
    HorizontalLayout okbar = new HorizontalLayout();
    okbar.setSpacing(true);
    okbar.setMargin(false, false, true, false);
    layout.addComponent(okbar);
    layout.setComponentAlignment(okbar, Alignment.BOTTOM_RIGHT);

    // Add
    Button addButton = new Button(ViewProperties.getCaption("button.add"));
    addButton.setDescription(ViewProperties.getCaption("description.addService"));
    addButton.addListener(new Button.ClickListener() {
        @Override
        public void buttonClick(ClickEvent event) {
            WinServiceAdd.this.addButtonClick(event);
        }
    });
    okbar.addComponent(addButton);
    // [Enter]?addButton
    addButton.setClickShortcut(KeyCode.ENTER);
    addButton.focus();

    // Cancel
    Button cancelButton = new Button(ViewProperties.getCaption("button.cancel"));
    cancelButton.setDescription(ViewProperties.getCaption("description.cancel"));
    cancelButton.addListener(new Button.ClickListener() {
        @Override
        public void buttonClick(ClickEvent event) {
            WinServiceAdd.this.close();
        }
    });
    okbar.addComponent(cancelButton);

    // ??
    initValidation();

    // ???
    initData();

    // 
    showServices();
}

From source file:jp.primecloud.auto.ui.WinServiceEdit.java

License:Open Source License

WinServiceEdit(Application ap, Long componentNo) {
    apl = ap;/*w w w .  j a v a  2s  .  com*/
    this.componentNo = componentNo;

    // ???
    initData();

    //
    setIcon(Icons.EDITMINI.resource());
    setCaption(ViewProperties.getCaption("window.winServiceEdit"));
    setModal(true);
    setWidth("600px");

    VerticalLayout layout = (VerticalLayout) getContent();
    //        layout.setWidth("100%");
    layout.setMargin(false, true, false, true);
    layout.setSpacing(true);

    // 
    layout.addComponent(tab);

    basicTab = new BasicTab();
    tab.addTab(basicTab, ViewProperties.getCaption("tab.basic"), Icons.BASIC.resource());

    detailTab = new DetailTab();
    Boolean useCustomPara = BooleanUtils.toBooleanObject(Config.getProperty("userCustomize.useCustomParam"));
    if (BooleanUtils.isTrue(useCustomPara)) {
        tab.addTab(detailTab, ViewProperties.getCaption("tab.detail"), Icons.BASIC.resource());
    }

    // ??
    HorizontalLayout okbar = new HorizontalLayout();
    okbar.setSpacing(true);
    okbar.setMargin(false, false, true, false);
    layout.addComponent(okbar);
    layout.setComponentAlignment(okbar, Alignment.BOTTOM_RIGHT);

    // OK
    Button okButton = new Button(ViewProperties.getCaption("button.ok"));
    okButton.setDescription(ViewProperties.getCaption("description.editService.ok"));
    okButton.addListener(new Button.ClickListener() {
        @Override
        public void buttonClick(ClickEvent event) {
            okButtonClick(event);
        }
    });
    okbar.addComponent(okButton);
    // [Enter]?okButton
    okButton.setClickShortcut(KeyCode.ENTER);
    okButton.focus();

    // Cancel
    Button cancelButton = new Button(ViewProperties.getCaption("button.cancel"));
    cancelButton.setDescription(ViewProperties.getCaption("description.cancel"));
    cancelButton.addListener(new Button.ClickListener() {
        @Override
        public void buttonClick(ClickEvent event) {
            close();
        }
    });
    okbar.addComponent(cancelButton);

    // ??
    initValidation();

    // ?
    basicTab.showData();

    // ?
    detailTab.showData();
}

From source file:jp.primecloud.auto.ui.WinUserAuthAddEdit.java

License:Open Source License

WinUserAuthAddEdit(Long masterUserNo, Long userNo) {

    this.masterUserNo = masterUserNo;
    this.userNo = userNo;

    //?/*from  ww  w . jav  a2 s  .  c o m*/
    isAddUser = (userNo == null) ? true : false;

    // ???
    initData();

    //
    //????
    if (isAddUser) {
        //??
        setIcon(Icons.ADD.resource());
        setCaption(ViewProperties.getCaption("window.winUserAdd"));
    } else {
        //?
        setIcon(Icons.EDIT.resource());
        setCaption(ViewProperties.getCaption("window.winUserEdit"));
    }
    //
    setModal(true);
    setWidth("450px");
    //
    setResizable(false);

    //
    VerticalLayout layout = (VerticalLayout) getContent();
    layout.setMargin(false, true, false, true);
    layout.setSpacing(false);

    // 
    layout.addComponent(new AuthAddForm());

    // ?
    userAuthTable = new UserAuthTable();
    layout.addComponent(userAuthTable);

    // ??
    HorizontalLayout okbar = new HorizontalLayout();
    okbar.setSpacing(true);
    okbar.setMargin(true, false, true, false);
    layout.addComponent(okbar);
    layout.setComponentAlignment(okbar, Alignment.BOTTOM_RIGHT);

    // OK
    Button okButton = new Button(ViewProperties.getCaption("button.ok"));
    if (isAddUser) {
        //??
        okButton.setDescription(ViewProperties.getCaption("description.addUserAuth.ok"));
    } else {
        //?
        okButton.setDescription(ViewProperties.getCaption("description.editUserAuth.ok"));
    }
    okButton.addListener(new Button.ClickListener() {
        @Override
        public void buttonClick(ClickEvent event) {
            WinUserAuthAddEdit.this.okButtonClick(event);
        }
    });
    okbar.addComponent(okButton);

    //Delete
    if (!isAddUser) {
        //?????
        Button deleteButton = new Button(ViewProperties.getCaption("button.delete"));
        deleteButton.setDescription(ViewProperties.getCaption("description.editUserAuth.delete"));
        deleteButton.addListener(new Button.ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                WinUserAuthAddEdit.this.deleteButtonClick(event);
            }
        });
        okbar.addComponent(deleteButton);
    }

    // Cancel
    Button cancelButton = new Button(ViewProperties.getCaption("button.cancel"));
    cancelButton.setDescription(ViewProperties.getCaption("description.cancel"));
    cancelButton.addListener(new Button.ClickListener() {
        @Override
        public void buttonClick(ClickEvent event) {
            WinUserAuthAddEdit.this.cancelButtonClick(event);
        }
    });
    okbar.addComponent(cancelButton);

    // ??
    showData();

    // ??
    initValidation();
}

From source file:jp.primecloud.auto.ui.WinUserAuthEditDetail.java

License:Open Source License

WinUserAuthEditDetail(Long userNo, Long farmNo) {

    this.userNo = userNo;
    this.farmNo = farmNo;

    ////from   www .j av a  2 s.  c  om
    setIcon(Icons.EDIT.resource());
    setCaption(ViewProperties.getCaption("window.winUserDetailEdit"));

    //
    setModal(true);
    setWidth("300px");
    //
    setResizable(false);

    //
    VerticalLayout layout = (VerticalLayout) getContent();
    layout.setMargin(false, true, false, true);
    layout.setSpacing(false);

    layout.addComponent(new AuthForm());

    // ??
    HorizontalLayout okbar = new HorizontalLayout();
    okbar.setSpacing(true);
    okbar.setMargin(false, false, true, false);
    layout.addComponent(okbar);
    layout.setComponentAlignment(okbar, Alignment.BOTTOM_RIGHT);

    // OK
    Button okButton = new Button(ViewProperties.getCaption("button.ok"));
    okButton.setDescription(ViewProperties.getCaption("description.editUserAuthDetail.ok"));
    okButton.addListener(new Button.ClickListener() {
        @Override
        public void buttonClick(ClickEvent event) {
            WinUserAuthEditDetail.this.okButtonClick(event);
        }
    });
    okbar.addComponent(okButton);

    // Cancel
    Button cancelButton = new Button(ViewProperties.getCaption("button.cancel"));
    cancelButton.setDescription(ViewProperties.getCaption("description.cancel"));
    cancelButton.addListener(new Button.ClickListener() {
        @Override
        public void buttonClick(ClickEvent event) {
            WinUserAuthEditDetail.this.cancelButtonClick(event);
        }
    });
    okbar.addComponent(cancelButton);

    // ??
    initData();

    // ?
    showData();

    // ??
    initValidation();
}

From source file:me.uni.emuseo.view.login.LoginLayout.java

License:Open Source License

public LoginLayout() {

    loginField.setWidth(306, Unit.PIXELS);
    loginField.setIcon(FontAwesome.USER);
    loginField.addStyleName("inline-icon");
    passField.setWidth(306, Unit.PIXELS);
    passField.setIcon(FontAwesome.LOCK);
    passField.addStyleName("inline-icon");

    addComponent(loginField);/*from  w  w w  .  j a v  a  2s. com*/
    addComponent(passField);
    addComponent(logButton);

    setComponentAlignment(loginField, Alignment.MIDDLE_CENTER);
    setComponentAlignment(passField, Alignment.MIDDLE_CENTER);
    setComponentAlignment(logButton, Alignment.BOTTOM_RIGHT);

    buildStyles();
    final AuthManager authManager = EMuseoUtil.getAppContext().getBean(AuthManager.class);
    logButton.addClickListener(new Button.ClickListener() {

        private static final long serialVersionUID = 1324235262L;

        @Override
        public void buttonClick(ClickEvent event) {
            try {
                authManager.login(loginField.getValue(), passField.getValue());
            } catch (AuthenticationException e) {
                Notification.show("Niepoprawny login lub haso");
            }
        }
    });
    logButton.setClickShortcut(KeyCode.ENTER);

}

From source file:nl.kpmg.lcm.ui.view.transfer.MonitorPanel.java

License:Apache License

private HorizontalLayout initSearchLayout(RestClientService restClientService1)
        throws UnsupportedOperationException {
    taskStatusComboBox = initTaskStatusComboBox();

    searchField = new TextField();
    searchField.addStyleName("margin-right-20");
    searchField.addStyleName("width-search-field");
    searchField.setCaption("Search criteria");
    searchField.setInputPrompt("Type search criteria");

    Button searchButton = new Button("Search");
    searchButton.addClickListener(new SearchListener());

    HorizontalLayout searchlayout = new HorizontalLayout();
    searchlayout.addComponent(taskStatusComboBox);
    searchlayout.addComponent(searchField);
    searchlayout.addComponent(searchButton);
    searchlayout.setComponentAlignment(searchButton, Alignment.BOTTOM_RIGHT);
    searchlayout.addStyleName("margin-bottom-20");
    return searchlayout;
}

From source file:nl.kpmg.lcm.ui.view.transfer.SchedulePanel.java

License:Apache License

private HorizontalLayout initSearchLayout(RestClientService restClientService1)
        throws UnsupportedOperationException {
    remoteLcmListComboBox = initRemoteLcmListComboBox();

    searchField = new TextField();
    searchField.addStyleName("margin-right-20");
    searchField.addStyleName("width-search-field");
    searchField.setCaption("Search criteria");
    searchField.setInputPrompt("Type search criteria");

    Button searchButton = new Button("Search");
    searchButton.addClickListener(new SearchListener());

    HorizontalLayout searchlayout = new HorizontalLayout();
    searchlayout.addComponent(remoteLcmListComboBox);
    searchlayout.addComponent(searchField);
    searchlayout.addComponent(searchButton);
    searchlayout.setComponentAlignment(searchButton, Alignment.BOTTOM_RIGHT);
    searchlayout.addStyleName("margin-bottom-20");
    return searchlayout;
}

From source file:org.accelerators.activiti.admin.ui.GroupCreateForm.java

License:Open Source License

/**
 * /*from   w  ww.j  av a2 s  .c om*/
 * @param app
 */
public GroupCreateForm(AdminApp application) {

    // Set application reference
    this.app = application;

    // Enable buffering so that commit() must be called for the form.
    setWriteThrough(false);

    // Set the form to act immediately on user input.
    setImmediate(true);

    // Set form size
    setSizeFull();

    // Setup footer layout
    HorizontalLayout footer = new HorizontalLayout();
    footer.setSpacing(true);
    footer.setWidth("100%");
    footer.setVisible(true);

    // Add footer
    setFooter(footer);

    // Init buttons
    create = new Button(app.getMessage(Messages.Create), (ClickListener) this);
    close = new Button(app.getMessage(Messages.Close), (ClickListener) this);
    reset = new Button(app.getMessage(Messages.Reset), this, "discard");

    // Set button grid
    GridLayout grid = new GridLayout(3, 1);
    grid.addComponent(create, 0, 0);
    grid.addComponent(reset, 1, 0);
    grid.addComponent(close, 2, 0);
    grid.setSpacing(true);

    // Add grid to footer
    footer.addComponent(grid);

    // Right align buttons in footer
    footer.setComponentAlignment(grid, Alignment.BOTTOM_RIGHT);

    // Init group types
    types = new String[] { app.getMessage(Messages.Assignment), app.getMessage(Messages.Program),
            app.getMessage(Messages.Project), app.getMessage(Messages.Role), app.getMessage(Messages.Team),
            app.getMessage(Messages.Unit) };

    // Create combo box for group types
    groupTypes = new ComboBox("type");

    groupTypes.setFilteringMode(Filtering.FILTERINGMODE_STARTSWITH);
    for (int i = 0; i < types.length; i++) {
        groupTypes.addItem(types[i]);
    }

    // Propagate changes directly
    groupTypes.setImmediate(true);

    // Allow adding new group types
    groupTypes.setNewItemsAllowed(true);

    // Get available users
    members = new TwinColSelect(app.getMessage(Messages.Members), app.getAdminService().getUsers());

    // Set column headers
    members.setLeftColumnCaption(app.getMessage(Messages.AvailableUsers));
    members.setRightColumnCaption(app.getMessage(Messages.GroupMembers));

    // Propagate changes directly
    members.setImmediate(true);

    // Set max width
    members.setWidth("100%");

    // Field factory for over riding how fields are created
    setFormFieldFactory(new DefaultFieldFactory() {

        private static final long serialVersionUID = 1L;

        @Override
        public Field createField(Item item, Object propertyId, Component uiContext) {

            if (propertyId.equals("type")) {
                groupTypes.setWidth("100%");
                groupTypes.setRequired(false);
                groupTypes.setCaption(app.getMessage(Messages.Types));
                return groupTypes;
            }

            Field field = super.createField(item, propertyId, uiContext);

            if (propertyId.equals("id")) {
                TextField tf = (TextField) field;

                // Do not display "null" to the user when the field is empty
                tf.setNullRepresentation("");

                // Set as required field
                tf.setRequired(true);

                // Set error message
                tf.setRequiredError("Id is missing");

                // Set read only
                tf.setReadOnly(false);

            } else if (propertyId.equals("name")) {
                TextField tf = (TextField) field;

                // Do not display "null" to the user when the field is empty
                tf.setNullRepresentation("");

                // Set as required field
                tf.setRequired(true);

                // Set error message
                tf.setRequiredError(app.getMessage(Messages.GroupNameIsMissing));

            }

            field.setWidth("100%");
            return field;
        }
    });
}

From source file:org.accelerators.activiti.admin.ui.GroupEditForm.java

License:Open Source License

/**
 * /*  w  ww  . ja  v  a  2s .co m*/
 * @param app
 */
public GroupEditForm(AdminApp application) {

    // Set application reference
    this.app = application;

    // Enable buffering so that commit() must be called for the form.
    setWriteThrough(false);

    // Set the form to act immediately on user input.
    setImmediate(true);

    // Set form size
    setSizeFull();

    // Setup footer layout
    HorizontalLayout footer = new HorizontalLayout();
    footer.setSpacing(true);
    footer.setWidth("100%");
    footer.setVisible(true);

    // Add footer
    setFooter(footer);

    // Init buttons
    save = new Button(app.getMessage(Messages.Save), (ClickListener) this);
    close = new Button(app.getMessage(Messages.Close), (ClickListener) this);
    reset = new Button(app.getMessage(Messages.Reset), this, "discard");

    // Set button grid
    GridLayout grid = new GridLayout(3, 1);
    grid.addComponent(save, 0, 0);
    grid.addComponent(reset, 1, 0);
    grid.addComponent(close, 2, 0);
    grid.setSpacing(true);

    // Add grid to footer
    footer.addComponent(grid);

    // Right align buttons in footer
    footer.setComponentAlignment(grid, Alignment.BOTTOM_RIGHT);

    // Init group types
    types = new String[] { app.getMessage(Messages.Assignment), app.getMessage(Messages.Program),
            app.getMessage(Messages.Project), app.getMessage(Messages.Role), app.getMessage(Messages.Team),
            app.getMessage(Messages.Unit) };

    // Create combo box for group types
    groupTypes = new ComboBox("type");

    groupTypes.setFilteringMode(Filtering.FILTERINGMODE_STARTSWITH);
    for (int i = 0; i < types.length; i++) {
        groupTypes.addItem(types[i]);
    }

    // Propagate changes directly
    groupTypes.setImmediate(true);

    // Allow adding new group types
    groupTypes.setNewItemsAllowed(true);

    // Get available users
    members = new TwinColSelect(app.getMessage(Messages.Members), app.getAdminService().getUsers());

    // Set column headers
    members.setLeftColumnCaption(app.getMessage(Messages.AvailableUsers));
    members.setRightColumnCaption(app.getMessage(Messages.GroupMembers));

    // Propagate changes directly
    members.setImmediate(true);

    // Set max width
    members.setWidth("100%");

    // Field factory for over riding how fields are created
    setFormFieldFactory(new DefaultFieldFactory() {

        private static final long serialVersionUID = 1L;

        @Override
        public Field createField(Item item, Object propertyId, Component uiContext) {

            if (propertyId.equals("type")) {
                groupTypes.setWidth("100%");
                groupTypes.setRequired(false);
                groupTypes.setCaption(app.getMessage(Messages.Types));
                return groupTypes;
            }

            Field field = super.createField(item, propertyId, uiContext);

            if (propertyId.equals("id")) {
                TextField tf = (TextField) field;

                // Do not display "null" to the user when the field is empty
                tf.setNullRepresentation("");

                // Set as read-only. Changing the id will create a new
                // group.
                tf.setReadOnly(true);

                // Set as required field
                // tf.setRequired(true);

                // Set error message
                tf.setRequiredError("Id is missing");

            } else if (propertyId.equals("name")) {
                TextField tf = (TextField) field;

                // Do not display "null" to the user when the field is empty
                tf.setNullRepresentation("");

                // Set as required field
                tf.setRequired(true);

                // Set error message
                tf.setRequiredError(app.getMessage(Messages.GroupNameIsMissing));

            }

            field.setWidth("100%");
            return field;
        }
    });
}