Package com.vaadin.tests.util

Examples of com.vaadin.tests.util.Address


public class AddressFormExample extends TestBase {

    @Override
    protected void setup() {
        getMainWindow().setLocale(Locale.ENGLISH);
        Address address = new Address("Ruukinkatu 2-4", 20540, "Turku");
        final AddressField field = new AddressField();
        field.setValue(address);
        field.setRequired(true);

        addComponent(field);

        Button commitButton = new Button("Save", new Button.ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                field.commit();
                Address address = field.getValue();
                Notification.show("Address saved: "
                        + address.getStreetAddress() + ", "
                        + address.getPostalCode() + ", " + address.getCity());
            }
        });
        addComponent(commitButton);
    }
View Full Code Here


    @Override
    public void setInternalValue(Address address) throws ReadOnlyException {
        // create the address if not given
        if (null == address) {
            address = new Address();
        }

        super.setInternalValue(address);

        // set item data source and visible properties in a single operation to
View Full Code Here

TOP

Related Classes of com.vaadin.tests.util.Address

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.