Oracle Fusion Middleware Tag Reference for Oracle ADF Faces 12c (12.2.1.4.0) E81455-02 |
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.
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):
Any one of these approaches is sufficient, though label or labelAndAccessKey is the most convenient and should be used where possible.