Skip navigation links

Oracle Fusion Middleware Design Time Java API Reference for Oracle ADF Faces and Data Visualization Components
11g Release 2 (11.1.2.2.0)

E18581-03


oracle.adfdt.view.common.binding.standalone
Class Widget<O extends PatternOptions>

java.lang.Object
  extended by oracle.adfdt.view.common.binding.standalone.Widget<O>


public class Widget<O extends PatternOptions>
extends java.lang.Object

A creatable widget allows the caller to preview the category and type of widget to create. Creating a new instance of the widget will properly databind the widget to the underlying model used to create the creatable widget.

Binding categories are defined by the model and are arbitrary. They should closely match, however, the different binding types related to JSR 227 definition metadata.


Method Summary
 BinderResult bind(BinderParams<O> params)
          Binds the given subtree to the model.
 void bind(org.w3c.dom.Node insertionSubTreeRoot, org.w3c.dom.Element subtreeToBind)
          Deprecated. Use bind(BinderParams) instead.
 void bind(org.w3c.dom.Node insertionSubTreeRoot, ModelProvider parent, java.util.Map properties, org.w3c.dom.Element subtreeToBind)
          Deprecated. Use bind(BinderParams) instead.
 org.w3c.dom.DocumentFragment create()
          Deprecated. Use create(CreatorParams) instead.
 CreatorResult create(CreatorParams<O> params)
          Returns an Element representing the root of the subtree of elements making up this widget.
 org.w3c.dom.DocumentFragment create(org.w3c.dom.Node insertionSubTreeRoot, ModelProvider parent, java.util.Map properties)
          Deprecated. Use create(CreatorParams) instead.
 BinderParams<O> createBaseBinderParams(org.w3c.dom.Node bindRootParent, org.w3c.dom.Node toBind)
          Builds a CreatorParams with the existing dt context and creation context, and the model provider.
 CreatorParams<O> createBaseCreatorParams(org.w3c.dom.Node insertionRoot)
          Builds a CreatorParams with the existing dt context and creation context, and the model provider.
 O createOptions(CreatorParams<O> params)
          Generates the PatternOptions with the default set of values.
 boolean equals(java.lang.Object obj)
           
 O generateBinderOptions(BinderParams<O> params)
          Generates the PatternOptions based on the current set of nodes and bindings already existing in the document.
 java.lang.String getCategory()
          The binding category this widget falls in.
 CreatorInfo getCreator()
          Returns the CreatorInfo used in the widget generation.
 java.lang.String getId()
          Returns the id for this widget.
 ModelProvider getModelProvider()
          Returns the ModelProvider used in the widget generation.
 java.lang.String getName()
          Returns a short description of what the widget will create.
 int hashCode()
           
 void runConfigurations()
          Runs all necessary configurations as determined by the environmental ADFDesignTimeContext.
 void setOptions(O patternOptions)
          Sets options to be used for all subsequent create and bind operations.

 

Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

 

Method Detail

getCategory

public java.lang.String getCategory()

The binding category this widget falls in. Some examples of binding categories include:

Returns:
Label of the binding category.

getName

public java.lang.String getName()

Returns a short description of what the widget will create. Some examples include:

Returns:
Description of the what the widget will create.

getId

public java.lang.String getId()

Returns the id for this widget.

Returns:
Widget id.

runConfigurations

public void runConfigurations()

Runs all necessary configurations as determined by the environmental ADFDesignTimeContext. Specifcally, this sets up the environment for:


create

@Deprecated
public org.w3c.dom.DocumentFragment create()
Deprecated. Use create(CreatorParams) instead.

Returns an Element representing the root of the subtree of elements making up this widget. The returned widget is fully databound to the underlying model, as specified when the creatable widget is vended.

Returns:
Databound Element subtree of the widget.

create

@Deprecated
public org.w3c.dom.DocumentFragment create(org.w3c.dom.Node insertionSubTreeRoot,
                                                      ModelProvider parent,
                                                      java.util.Map properties)
Deprecated. Use create(CreatorParams) instead.

Returns an Element representing the root of the subtree of elements making up this widget. The returned widget is fully databound to the underlying model, as specified when the creatable widget is vended.

This signature allows the created ModelProvider to be initialized by a parent model provider. This can be used by providers in ModelProvider.initializeFromParent(parent)

You can also pass in the parent subtree Node as well as additional properties to passed on to the CreatorInfo.

Returns:
Databound Element subtree of the widget.

create

public CreatorResult create(CreatorParams<O> params)

Returns an Element representing the root of the subtree of elements making up this widget. The returned widget is fully databound to the underlying model, as specified when the creatable widget is vended.

This signature allows the created ModelProvider to be initialized by a parent model provider. This can be used by providers in ModelProvider.initializeFromParent(parent)

You can also pass in the parent subtree Node as well as additional properties to passed on to the CreatorInfo.

Returns:
Databound Element subtree of the widget.

createBaseCreatorParams

public CreatorParams<O> createBaseCreatorParams(org.w3c.dom.Node insertionRoot)

Builds a CreatorParams with the existing dt context and creation context, and the model provider. All other fields of the params is optional.

Returns:
A params, preseeded with the dt and creation contexts, as well as the model provider.

bind

@Deprecated
public void bind(org.w3c.dom.Node insertionSubTreeRoot,
                            org.w3c.dom.Element subtreeToBind)
Deprecated. Use bind(BinderParams) instead.

Binds the given subtree to the model.


bind

@Deprecated
public void bind(org.w3c.dom.Node insertionSubTreeRoot,
                            ModelProvider parent,
                            java.util.Map properties,
                            org.w3c.dom.Element subtreeToBind)
Deprecated. Use bind(BinderParams) instead.

Binds the given subtree to the model.

This signature allows the bound ModelProvider to be initialized by a parent model provider. This can be used by providers in ModelProvider.initializeFromParent(parent)

You can also pass in the parent subtree Node as well as additional properties to passed on to the CreatorInfo.


bind

public BinderResult bind(BinderParams<O> params)

Binds the given subtree to the model.

This signature allows the bound ModelProvider to be initialized by a parent model provider. This can be used by providers in ModelProvider.initializeFromParent(parent)

You can add binder options, and other properties on the BinderParams. This should be created with the createBinderParams(.) method.


createOptions

public O createOptions(CreatorParams<O> params)

Generates the PatternOptions with the default set of values. Useful for create cases.


generateBinderOptions

public O generateBinderOptions(BinderParams<O> params)

Generates the PatternOptions based on the current set of nodes and bindings already existing in the document.


setOptions

public void setOptions(O patternOptions)

Sets options to be used for all subsequent create and bind operations. Typically, calling this method is redundant, as options can be set on either CreatorParams or BinderParams that are passed into their respective methods. However, there are certain cases where patterns will delegate to subpatterns. In these cases, the user may not have an opportunity to set options as the calls to create and bind are made by the super pattern.

In effect, then, this call (re)sets the default options that will be used when this widget is asked to create or bind. Generally, the programming pattern that is used is delegation. That is, specific widgets are set on the super pattern, which then in turn calls into those widgets to generate the sub parts of the pattern. In this programming paradigm, this method is the only affective way to alter how those subpatterns are created.

There are cases when this default is set on the widget, and an additional set of options is passed in during create or bind. In those cases, the patterns will be merged via the merge() method on PatternOperations. The default options method will be called with the new options as the parameter. Refer to individual patterns to see if this is implemented and to see additional details.

To ensure that no default set of options is set, it is acceptable to call this method with null as a parameter to effectively clear out any default option. When a widget is created the first time, there will be no default options set.

Parameters:
patternOptions - The defaul options (see createOptions or generateBinderOptions)

createBaseBinderParams

public BinderParams<O> createBaseBinderParams(org.w3c.dom.Node bindRootParent,
                                              org.w3c.dom.Node toBind)

Builds a CreatorParams with the existing dt context and creation context, and the model provider. All other fields of the params is optional.

Parameters:
Node - The node representing the parent of where the bound nodes are attached to the DOM tree.
Node - toBind The element or document fragment representing the nodes to bind.
Returns:
A params, preseeded with the dt and creation contexts, as well as the model provider.

getCreator

public CreatorInfo getCreator()

Returns the CreatorInfo used in the widget generation. This can be used to get more detailed information concerning the widget.


getModelProvider

public ModelProvider getModelProvider()

Returns the ModelProvider used in the widget generation.


equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

Skip navigation links

Oracle Fusion Middleware Design Time Java API Reference for Oracle ADF Faces and Data Visualization Components
11g Release 2 (11.1.2.2.0)

E18581-03


Copyright © 1997, 2012, Oracle. All rights reserved.