public final class WidgetFactory
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
WidgetFactory.RestrictingWidgetFilter
Simple filter subclass that takes in an array of Strings.
|
static class |
WidgetFactory.WidgetFactoryContext
Used to create widgets.
|
static interface |
WidgetFactory.WidgetFilter
Used to restrict what types of widgets may be returned based on their base creator info.
|
Modifier and Type | Method and Description |
---|---|
static WidgetFactory.WidgetFactoryContext |
createContext(ADFDesignTimeContext dtContext, oracle.adfdt.model.objects.DataControl dataControl, oracle.binding.meta.NamedDefinition definition)
Creates a new context that can be used to lookup and create
Widget s. |
static Widget |
createWidgetDelegate(CreationContext creationContext, ModelProvider modelProvider, java.lang.String id)
Used to create a widget by the given ID.
|
static java.util.Map<java.lang.String,Widget> |
getAvailableWidgets(ADFDesignTimeContext dtContext, oracle.adfdt.model.objects.DataControl dataControl, oracle.binding.meta.NamedDefinition dataControlDefinition)
Deprecated.
Use getAvailableWidgets(WidgetFactoryContext) instead.
|
static java.util.Map<java.lang.String,Widget> |
getAvailableWidgets(ADFDesignTimeContext dtContext, oracle.adfdt.model.objects.DataControl dataControl, oracle.binding.meta.NamedDefinition dcDefinition, CreationContext creationContext)
Deprecated.
Use getAvailableWidgets(WidgetFactoryContext) instead.
|
static java.util.Map<java.lang.String,Widget> |
getAvailableWidgets(ADFDesignTimeContext dtContext, oracle.adfdt.model.objects.DataControl dataControl, oracle.binding.meta.NamedDefinition definition, CreationContext creationContext, WidgetFactory.WidgetFilter widgetFilter)
Deprecated.
Use getAvailableWidgets(WidgetFactoryContext) instead.
|
static java.util.Map<java.lang.String,Widget> |
getAvailableWidgets(WidgetFactory.WidgetFactoryContext widgetFactoryContext)
Returns a map of
Widget .id to Widget s that can be used to create databound components. |
static Widget |
getWidget(WidgetFactory.WidgetFactoryContext widgetFactoryContext, java.lang.String id)
Returns a specific
Widget identified by the ID parameter. |
public static final WidgetFactory.WidgetFactoryContext createContext(ADFDesignTimeContext dtContext, oracle.adfdt.model.objects.DataControl dataControl, oracle.binding.meta.NamedDefinition definition)
Widget
s. The new context can then be annotated by various other properties. Important to note among these is the CreationContext
. If your code has already obtained a CreationContext
, be sure to set it on the context so this does not get created again. I.e.: WidgetFactoryContext wfc = WidgetFactory.createContext(...) .withCreationContext(<creationContext>);
Parameters:
dtContext
-
dataControl
-dataControlDefinition
-public static final java.util.Map<java.lang.String,Widget> getAvailableWidgets(WidgetFactory.WidgetFactoryContext widgetFactoryContext)
Returns a map of Widget
.id to Widget
s that can be used to create databound components. A creatable widget is a composition of bound components. Some examples are:
The widgets will be tailored to the particular type of JSR 227 definition that is passed in. For instance, form widgets will only be selectable for structured, and iterator definitions.
See Widget
on more discussion on how these widgets can be created.
public static final Widget getWidget(WidgetFactory.WidgetFactoryContext widgetFactoryContext, java.lang.String id)
Returns a specific Widget
identified by the ID parameter.
This is the same as calling:
Map<String,Widget> widgets = getAvailableWidgets(ctx); return widgets.get(id);
It is presented as a convenience call. Note that this may return null if the Widget is not found, or cannot be used with the given definition.
public static final Widget createWidgetDelegate(CreationContext creationContext, ModelProvider modelProvider, java.lang.String id)
Binder2
or Creator2
code generation routine. NOTE: The model provider must be compatible with the pattern to be generated. In other words, the bindings type that created the model provider must be supported by the pattern. If it is not, the pattern generation will eventually fail with an exception. This API does not guarantee the model provider is appropriate, and will always return a widget if it can find one matching the id given. This API may return null if the pattern with the given id cannot be found.@Deprecated public static final java.util.Map<java.lang.String,Widget> getAvailableWidgets(ADFDesignTimeContext dtContext, oracle.adfdt.model.objects.DataControl dataControl, oracle.binding.meta.NamedDefinition dataControlDefinition)
Returns a map of Widget
.id to Widget
s that can be used to create databound components. A creatable widget is a composition of bound components. Some examples are:
The widgets will be tailored to the particular type of JSR 227 definition that is passed in. For instance, form widgets will only be selectable for structured, and iterator definitions.
See Widget
on more discussion on how these widgets can be created.
@Deprecated public static final java.util.Map<java.lang.String,Widget> getAvailableWidgets(ADFDesignTimeContext dtContext, oracle.adfdt.model.objects.DataControl dataControl, oracle.binding.meta.NamedDefinition dcDefinition, CreationContext creationContext)
Returns a map of Widget
.id to Widget
s that can be used to create databound components. A creatable widget is a composition of bound components. Some examples are:
The widgets will be tailored to the particular type of JSR 227 definition that is passed in. For instance, form widgets will only be selectable for structured, and iterator definitions.
See Widget
on more discussion on how these widgets can be created.
@Deprecated public static final java.util.Map<java.lang.String,Widget> getAvailableWidgets(ADFDesignTimeContext dtContext, oracle.adfdt.model.objects.DataControl dataControl, oracle.binding.meta.NamedDefinition definition, CreationContext creationContext, WidgetFactory.WidgetFilter widgetFilter)
Returns a map of Widget
.id to Widget
s that can be used to create databound components. A creatable widget is a composition of bound components. Some examples are:
The widgets will be tailored to the particular type of JSR 227 definition that is passed in. For instance, form widgets will only be selectable for structured, and iterator definitions.
See Widget
on more discussion on how these widgets can be created.