Package com.vaadin.ui.declarative
Interface Design.ComponentFactory
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
Design.DefaultComponentFactory
- Enclosing class:
- Design
public static interface Design.ComponentFactory extends Serializable
Callback for creating instances of a given component class when reading designs. The default implementation,Design.DefaultComponentFactory
will useClass.forName(className).newInstance()
, which might not be suitable e.g. in an OSGi environment or if the Component instances should be created as managed CDI beans.Use
Design.setComponentFactory(ComponentFactory)
to configure Vaadin to use a custom component factory.- Since:
- 7.4.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Component
createComponent(String fullyQualifiedClassName, DesignContext context)
Creates a component based on the fully qualified name derived from the tag name in the design.
-
-
-
Method Detail
-
createComponent
Component createComponent(String fullyQualifiedClassName, DesignContext context)
Creates a component based on the fully qualified name derived from the tag name in the design.- Parameters:
fullyQualifiedClassName
- the fully qualified name of the component to createcontext
- the design context for which the component is created- Returns:
- a newly created component
-
-