com.vaadin.ui.declarative
Interface Design.ComponentFactory

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
Design.DefaultComponentFactory
Enclosing class:
Design

public static interface Design.ComponentFactory
extends java.io.Serializable

Callback for creating instances of a given component class when reading designs. The default implementation, Design.DefaultComponentFactory will use Class.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
 Component createComponent(java.lang.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(java.lang.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 create
context - the design context for which the component is created
Returns:
a newly created component


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.