org.metawidget.vaadin.ui.widgetbuilder

Class VaadinWidgetBuilder

    • Constructor Detail

      • VaadinWidgetBuilder

        public VaadinWidgetBuilder()
    • Method Detail

      • buildWidget

        public com.vaadin.ui.Component buildWidget(String elementName,
                                          Map<String,String> attributes,
                                          VaadinMetawidget metawidget)
        Description copied from interface: WidgetBuilder
        Builds the most appropriate widget for this business field.
        Specified by:
        buildWidget in interface WidgetBuilder<com.vaadin.ui.Component,VaadinMetawidget>
        Parameters:
        elementName - XML node name of the business field. Typically 'entity', 'property' or 'action'. Never null
        attributes - attributes of the business field to build a widget for. Never null. This Map is modifiable - changes will be passed to subsequent WidgetBuilders, WidgetProcessors and Layouts
        metawidget - the parent Metawidget. Never null
        Returns:
        the built widget. To suppress a field, return a Stub. To defer to the next WidgetBuilder in the pipeline, return null. If there are no more WidgetBuilders in the pipeline, will create a nested Metawidget. This approach (return Stub for no field, null for nested Metawidget) as opposed to the other way around (return null for no field, return Metawidget for nested Metawidget) works better for those UI frameworks that cannot instatiate widgets without adding them to containers (eg. SWT)

Copyright © 2015. All Rights Reserved.