Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1)
E10684-01


oracle.adf.view.rich.component.rich.fragment
Class RichDeclarativeComponent

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by org.apache.myfaces.trinidad.component.UIXComponent
          extended by org.apache.myfaces.trinidad.component.UIXComponentBase
              extended by oracle.adf.view.rich.component.fragment.ContextSwitchingComponent
                  extended by oracle.adf.view.rich.component.fragment.UIXInclude
                      extended by oracle.adf.view.rich.component.fragment.UIXDeclarativeComponent
                          extended by oracle.adf.view.rich.component.rich.fragment.RichDeclarativeComponent

All Implemented Interfaces:
javax.faces.component.NamingContainer, javax.faces.component.StateHolder, org.apache.myfaces.trinidad.component.FlattenedComponent

public class RichDeclarativeComponent
extends UIXDeclarativeComponent
implements javax.faces.component.NamingContainer

Includes a declarative component. Declarative components allow the UI definition of a component to be defined in terms of a composition of other components and then treated as a single component.

You can pass attributes using JSP tag attributes, or by using <f:attribute>. Facets can also be set as normal using <f:facet> tags. The definition can refer to the attributes of the component by using the "var" EL variable and the component itself using the "componentVar" EL variable that are setup on the <af:componentDef> tag. The definition can reference a facet using the <af:facetRef> tag. Each facet can only be referenced once.

If you put a component as a child of a declarative component but fail to put it inside of a facet and fail to reference that facet in the component definition file (via facetRef), that component will not be rendered.

Declarative components support being a partial trigger as well as a partial target. The component will trigger partial updates when any of its children broadcast an event. So for example, a value change event in an input text component that is a child of the declarative component will trigger components listening on the declarative components. By using #{attrs.partialTriggers} (assuming var is 'attrs'), child components may partially update when an action triggers the declarative component. One difference from other components is that the declarative component itself is not re-rendered. Therefore, to be able to change the viewId of the declarative component during a partial update, the parent of the declarative component must be updated.

Events:

Type Phases Description
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 events might include the width of a column that supported client-side resizing.

Field Summary
static org.apache.myfaces.trinidad.bean.PropertyKey CLIENT_COMPONENT_KEY
           
static java.lang.String COMPONENT_FAMILY
           
static java.lang.String COMPONENT_TYPE
           
static org.apache.myfaces.trinidad.bean.PropertyKey CUSTOMIZATION_ID_KEY
           
static org.apache.myfaces.trinidad.bean.PropertyKey PARTIAL_TRIGGERS_KEY
           
static org.apache.myfaces.trinidad.bean.FacesBean.Type TYPE
           

 

Fields inherited from class oracle.adf.view.rich.component.fragment.UIXDeclarativeComponent
CLIENT_ATTRIBUTES_KEY

 

Fields inherited from class oracle.adf.view.rich.component.fragment.UIXInclude
COMPONENT_VAR_KEY, VAR_KEY, VIEW_ID_KEY

 

Fields inherited from class org.apache.myfaces.trinidad.component.UIXComponentBase
BINDING_KEY, ID_KEY, RENDERED_KEY, RENDERER_TYPE_KEY, TRANSIENT_KEY

 

Fields inherited from class javax.faces.component.UIComponent
bindings

 

Fields inherited from interface javax.faces.component.NamingContainer
SEPARATOR_CHAR

 

Constructor Summary
  RichDeclarativeComponent()
          Construct an instance of the RichDeclarativeComponent.
protected RichDeclarativeComponent(java.lang.String rendererType)
          Construct an instance of the RichDeclarativeComponent.

 

Method Summary
protected  org.apache.myfaces.trinidad.bean.FacesBean.Type getBeanType()
           
 java.lang.String getCustomizationId()
          Gets The id used to locate this component when applying persistent customizations.
 java.lang.String getFamily()
           
 java.lang.String[] getPartialTriggers()
          Gets the IDs of the components that should trigger a partial update.
 boolean isClientComponent()
          Gets whether a client-side component will be generated.
 void setClientComponent(boolean clientComponent)
          Sets whether a client-side component will be generated.
 void setCustomizationId(java.lang.String customizationId)
          Sets The id used to locate this component when applying persistent customizations.
 void setPartialTriggers(java.lang.String[] partialTriggers)
          Sets the IDs of the components that should trigger a partial update.

 

Methods inherited from class oracle.adf.view.rich.component.fragment.UIXDeclarativeComponent
getClientAttributes, isFlatteningChildren, setClientAttributes

 

Methods inherited from class oracle.adf.view.rich.component.fragment.UIXInclude
broadcast, getAttribute, getComponentVar, getVar, getViewId, invokeOnComponent, queueEvent, restoreContext, setAttribute, setComponentVar, setupContext, setVar

 

Methods inherited from class oracle.adf.view.rich.component.fragment.ContextSwitchingComponent
encodeBegin, encodeEnd, finishComponentEncoding, processDecodes, processFlattenedChildren, processUpdates, processValidators

 

Methods inherited from class org.apache.myfaces.trinidad.component.UIXComponentBase
adaptMethodBinding, addAttributeChange, addAttributeChangeListener, addFacesListener, broadcastToMethodBinding, broadcastToMethodExpression, createFacesBean, decode, decodeChildren, decodeChildrenImpl, encodeAll, encodeChildren, findComponent, getAttributeChangeListener, getAttributeChangeListeners, getAttributes, getBooleanProperty, getChildCount, getChildren, getClientId, getContainerClientId, getFacesBean, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacetNames, getFacets, getFacetsAndChildren, getId, getIntProperty, getLifecycleRenderer, getParent, getProperty, getPropertyKey, getRenderer, getRendererType, getRendersChildren, getValueBinding, getValueExpression, isRendered, isTransient, markInitialState, processRestoreState, processSaveState, removeAttributeChangeListener, removeFacesListener, restoreState, saveState, setAttributeChangeListener, setAttributeChangeListener, setBooleanProperty, setId, setIntProperty, setParent, setProperty, setRendered, setRendererType, setTransient, setValueBinding, setValueExpression, toString, updateChildren, updateChildrenImpl, validateChildren, validateChildrenImpl

 

Methods inherited from class org.apache.myfaces.trinidad.component.UIXComponent
processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren

 

Methods inherited from class javax.faces.component.UIComponent
getContainerClientId

 

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

 

Field Detail

TYPE

public static final org.apache.myfaces.trinidad.bean.FacesBean.Type TYPE

CUSTOMIZATION_ID_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey CUSTOMIZATION_ID_KEY

CLIENT_COMPONENT_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey CLIENT_COMPONENT_KEY

PARTIAL_TRIGGERS_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey PARTIAL_TRIGGERS_KEY

COMPONENT_FAMILY

public static final java.lang.String COMPONENT_FAMILY
See Also:
Constant Field Values

COMPONENT_TYPE

public static final java.lang.String COMPONENT_TYPE
See Also:
Constant Field Values

Constructor Detail

RichDeclarativeComponent

public RichDeclarativeComponent()
Construct an instance of the RichDeclarativeComponent.

RichDeclarativeComponent

protected RichDeclarativeComponent(java.lang.String rendererType)
Construct an instance of the RichDeclarativeComponent.

Method Detail

getCustomizationId

public final java.lang.String getCustomizationId()
Gets The id used to locate this component when applying persistent customizations. Components without a customizationId set can not save customizations to the persistent store. Instead, any customizations will at most only apply to the current Session. Each customizationId must be unique in the document.
Returns:
the new customizationId value

setCustomizationId

public final void setCustomizationId(java.lang.String customizationId)
Sets The id used to locate this component when applying persistent customizations. Components without a customizationId set can not save customizations to the persistent store. Instead, any customizations will at most only apply to the current Session. Each customizationId must be unique in the document.
Parameters:
customizationId - the new customizationId value

isClientComponent

public final boolean isClientComponent()
Gets whether a client-side component will be generated. A component may be generated whether or not this flag is set, but if client Javascript requires the component object, this must be set to true to guarantee the component's presence. Client component objects that are generated today by default may not be present in the future; setting this flag is the only way to guarantee a component's presence, and clients cannot rely on implicit behavior. However, there is a performance cost to setting this flag, so clients should avoid turning on client components unless absolutely necessary.
Returns:
the new clientComponent value

setClientComponent

public final void setClientComponent(boolean clientComponent)
Sets whether a client-side component will be generated. A component may be generated whether or not this flag is set, but if client Javascript requires the component object, this must be set to true to guarantee the component's presence. Client component objects that are generated today by default may not be present in the future; setting this flag is the only way to guarantee a component's presence, and clients cannot rely on implicit behavior. However, there is a performance cost to setting this flag, so clients should avoid turning on client components unless absolutely necessary.
Parameters:
clientComponent - the new clientComponent value

getPartialTriggers

public final java.lang.String[] getPartialTriggers()
Gets the IDs of the components that should trigger a partial update. This component will listen on the trigger components. If one of the trigger components receives an event that will cause it to update in some way, this component will request to be updated too. Identifiers are relative to the source component (this component), and must account for NamingContainers. If your component is already inside of a naming container, you can use a single colon to start the search from the root of the page, or multiple colons to move up through the NamingContainers - "::" will pop out of the component's naming container (or itself if the component is a naming container) and begin the search from there, ":::" will pop out of two naming containers (including itself if the component is a naming container) and begin the search from there, etc.
Returns:
the new partialTriggers value

setPartialTriggers

public final void setPartialTriggers(java.lang.String[] partialTriggers)
Sets the IDs of the components that should trigger a partial update. This component will listen on the trigger components. If one of the trigger components receives an event that will cause it to update in some way, this component will request to be updated too. Identifiers are relative to the source component (this component), and must account for NamingContainers. If your component is already inside of a naming container, you can use a single colon to start the search from the root of the page, or multiple colons to move up through the NamingContainers - "::" will pop out of the component's naming container (or itself if the component is a naming container) and begin the search from there, ":::" will pop out of two naming containers (including itself if the component is a naming container) and begin the search from there, etc.
Parameters:
partialTriggers - the new partialTriggers value

getFamily

public java.lang.String getFamily()
Overrides:
getFamily in class UIXDeclarativeComponent

getBeanType

protected org.apache.myfaces.trinidad.bean.FacesBean.Type getBeanType()
Overrides:
getBeanType in class UIXDeclarativeComponent

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1)
E10684-01


Copyright © 1998, 2008, Oracle. All rights reserved.