Oracle Fusion Middleware Tag Reference for Oracle ADF Faces 12c (12.2.1.4.0) E81455-03

Tag Name: | <af:dynamicComponent>
Java Class: | oracle.adf.view.rich.component.rich.RichDynamicComponent
Component Type: | oracle.adf.DynamicComponent

DynamicComponent is a component whose real type is defined by the value of its attribute componentType. Attributes of the real component and componentType are set in its attribute attributeModel.

The following is an example that dyanmicComponent is used for a form with ADFm binding. Converters and validators are used.

    <af:panelFormLayout id="pfl1">
                        <af:iterator id="i1" value="#{bindings.EmpVO1.descriptorCollection.attributes}" var="attr">
                            <af:dynamicComponent id="it1" attributeModel="#{attr}">
                               <af:convertDateTime disabled="#{attr.name == 'Hiredate' ? false : true}"
                                                   pattern="yyyy/MM/dd"/>
                               <af:convertNumber disabled="#{attr.name == 'Sal' ? false : true}" pattern="#,###,###" />
                               <af:validateLength disabled="#{attr.dataType.canonicalName == 'java.lang.String' ? false : true}"
                                                  maximum="10" hintMaximum="maxmum length is 10"/>
                               <af:validateLongRange disabled="#{attr.name == 'Sal' ? false : true}" minimum="10000"/>
                            </af:dynamicComponent>
                        </af:iterator>
                    </af:panelFormLayout>

The following is an example that dyanmicComponent is used for columns of a table with ADFm binding inside a panelCollection.

    <af:panelCollection id="pc1">
                  <f:facet name="menus"/>
                  <f:facet name="toolbar"/>
                  <f:facet name="statusbar"/>
                  <af:table value="#{bindings.EmpVO1.collectionModel}" var="row" rows="#{bindings.EmpVO1.rangeSize}"
                            emptyText="#{bindings.EmpVO1.viewable ? 'No data to display.' : 'Access Denied.'}"
                            fetchSize="#{bindings.EmpVO1.rangeSize}" rowBandingInterval="0"
                            filterModel="#{bindings.EmpVO1Query.queryDescriptor}"
                            queryListener="#{bindings.EmpVO1Query.processQuery}" filterVisible="true" varStatus="vs"
                            selectionListener="#{bindings.EmpVO1.collectionModel.makeCurrent}" rowSelection="multiple" id="t1"
                            contentDelivery="immediate">
                    <af:iterator value="#{bindings.EmpVO1.descriptorCollection.attributes}" id="itr1" var="column">
                      <af:column headerText="#{column.label}" id="dcc1"  filterable="true" sortable="true" sortProperty="#{column.name}">
                        <af:dynamicComponent attributeModel="#{column}" id="dc1">
                          <af:validateLongRange disabled="#{column.name == 'Sal' ? false : true}" minimum="10000"/>
                        </af:dynamicComponent>
                      </af:column>
                    </af:iterator>
                  </af:table>
                </af:panelCollection>

It supports what the real component supports, please see real component's tag document for details.

- helpTopicId attribute: Help information should be provided using the helpTopicId.
  - It is preferred to use helpTopicId instead of shortDesc to provide help information.
- label attribute:

  For all input components (and compound components that have an input component part to which a label can be assigned), the component requires a label. This can be accomplished in one of the following ways (all ways may not be available for all components):

  - a 'label' value on the component
  - a 'labelAndAccessKey' value on the component
  - wrapping the component with an af:panelLabelAndMessage component that has a 'label' (or 'labelAndAccessKey') value and a 'for' value specifying the component's id
  - having a corresponding af:outputLabel component that has a 'value' (or 'valueAndAccessKey') value and a 'for' value specifying the component's id

Any one of these approaches is sufficient, though label or labelAndAccessKey is the most convenient and should be used where possible.

- popupTitle attribute: A popupTitle must be specified.

It supports what the real component supports, please see real component's tag document for details.

blur click contextMenu dblClick focus | keyDown keyPress keyUp mouseDown mouseMove | mouseOut mouseOver mouseUp propertyChange valueChange (default)

## Events

Type | Phases | Description
--- | --- | ---

LaunchPopupEvent is delivered when a user's action on an input component results in the launching of a popup dialog. For example, clicking the search icon on the inputListOfValues component or the "Search..." entry at the bottom of the drop down panel of the inputComboboxListOfValues component or tabbing-out of either of the above components with a non null value set, and autoSumit set to "true" will result in the queueing and broadcasting of LaunchPopupEvent on the input*ListOfValues component.
oracle.adf.view.rich.event.ReturnPopupDataEvent | Invoke Application,Apply Request Values | Deprecated, will be removed in the future release
oracle.adf.view.rich.event.ReturnPopupEvent | Invoke Application | The ReturnPopupEvent is delivered after data for it has been provided by the ReturnPopupDataListener.
javax.faces.event.ValueChangeEvent | Process Validations, Apply Request Values | The valueChange event is delivered when the value attribute is changed.
org.apache.myfaces.trinidad.event.AttributeChangeEvent | Invoke Application, Apply Request Values | Event delivered to describe an attribute change. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change event might include the width of a column that supported client-side resizing.

It supports what the real component supports, please see real component's tag document for details.

Name | Description
--- | ---
context | Allowed Child Components: af:contextInfo Location for contextual information. A contextInfo component is expected. This facet is ignored when 'mode' is 'compact'.
This facet is deprecated, helpTopicId should be used for providing help. This is a no-op for form components.
Table component to be used in the Search and Select dialog. Supports sub classes of RichTable. Table columns should not be configured as they are auto generated by LOV. Only one of 'searchContent' or 'resultsTable' facet can be configured.
Content in the Search and Select popup dialog.

## Attributes

It supports what the real component supports, please see real component's tag document for details. Here are the common ones.

Name | Type | Supports EL? | Description
--- | --- | --- | ---

Has a type of BaseAttributeDescriptor and has getters for all of the real component's attributes.
the identifier for the component. The identifier must follow a subset of the syntax allowed in HTML: Must not be a zero-length String. First character must be an ASCII letter (A-Za-z) or an underscore ('_'). Subsequent characters must be an ASCII letter or digit (A-Za-z0-9), an underscore ('_'), or a dash ('-').