public class UIXDynamicDeclarativeComponent extends UIXInclude implements javax.faces.component.NamingContainer
Defines a dynamic declarative component without a need for a specific tag. Dynamic 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.
Dynamic declarative components support flattened chlidren. This means that children of the declarative component can be seen by the declarative component parent. So for example, input components at the root level of the declarative component will be correctly rendered if the declarative component resides in a panelFormLayout component.
Note about stretching layouts and flowing/scrolling layouts:
With today's web browsers, it is not reliable to have vertically-stretched content inside of areas that also have scroll bars. If you want the outer areas of your page structure to stretch, you need to be careful of how you assemble your component tree.
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 event might include the width of a column that supported client-side resizing. |
Modifier and Type | Field and Description |
---|---|
static org.apache.myfaces.trinidad.bean.PropertyKey |
CLIENT_ATTRIBUTES_KEY |
static org.apache.myfaces.trinidad.bean.PropertyKey |
CLIENT_COMPONENT_KEY |
static String |
COMPONENT_FAMILY |
static String |
COMPONENT_TYPE |
static org.apache.myfaces.trinidad.bean.FacesBean.Type |
TYPE |
VIEW_ID_KEY
COMPONENT_VAR_KEY, VAR_KEY
BINDING_KEY, ID_KEY, RENDERED_KEY, RENDERER_TYPE_KEY, TRANSIENT_KEY
Modifier | Constructor and Description |
---|---|
|
UIXDynamicDeclarativeComponent()
Construct an instance of the UIXDynamicDeclarativeComponent.
|
protected |
UIXDynamicDeclarativeComponent(String rendererType)
Construct an instance of the UIXDynamicDeclarativeComponent.
|
Modifier and Type | Method and Description |
---|---|
protected org.apache.myfaces.trinidad.bean.FacesBean.Type |
getBeanType() |
Set |
getClientAttributes()
Gets a set of client attribute names.
|
String |
getFamily() |
boolean |
isClientComponent()
Gets whether a client-side component will be generated.
|
void |
setClientAttributes(Set clientAttributes)
Sets a set of client attribute names.
|
void |
setClientComponent(boolean clientComponent)
Sets whether a client-side component will be generated.
|
broadcast, createFacesBean, getAttribute, getRenderedFacetsAndChildren, getViewId, invokeOnComponent, queueEvent, resumeContext, setAttribute, setupChildrenVisitingContext, suspendChange, suspendContext, tearDownChildrenVisitingContext
getComponentVar, getVar, setComponentVar, setVar
finishComponentEncoding, isFlatteningChildren, processDecodes, processFlattenedChildren, processUpdates, processValidators, restoreContext, setupContext, setupVisitingContext, tearDownVisitingContext
adaptMethodBinding, addAttributeChange, addAttributeChangeListener, addClientBehavior, addComponentChange, addComponentChange, addComponentChangeFilter, addFacesListener, broadcastToMethodBinding, broadcastToMethodExpression, clearCachedClientIds, clearInitialState, decode, decodeChildren, decodeChildrenImpl, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributeChangeListener, getAttributeChangeListeners, getAttributes, getBooleanProperty, getChildCount, getChildren, getClientBehaviors, getClientId, getComponentChangeFilters, getContainerClientId, getDefaultEventName, getFacesBean, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacetNames, getFacets, getFacetsAndChildren, getId, getIntProperty, getLifecycleRenderer, getListenersForEventClass, getParent, getProperty, getPropertyKey, getRenderer, getRendererType, getRendersChildren, getValueBinding, getValueExpression, initialStateMarked, invokeOnChildrenComponents, invokeOnNamingContainerComponent, isRendered, isTransient, markInitialState, processRestoreState, processSaveState, removeAttributeChangeListener, removeComponentChangeFilter, removeFacesListener, restoreState, satisfiesPartialTrigger, saveState, setAttributeChangeListener, setAttributeChangeListener, setBooleanProperty, setId, setIntProperty, setParent, setProperty, setRendered, setRendererType, setTransient, setupFlattenedChildrenContext, setupFlattenedContext, setValueBinding, setValueExpression, subscribeToEvent, tearDownFlattenedChildrenContext, tearDownFlattenedContext, toString, unsubscribeFromEvent, updateChildren, updateChildrenImpl, validateChildren, validateChildrenImpl
addPartialTarget, broadcastInContext, clearCachedClientIds, defaultGetRenderedFacetsAndChildren, encodeFlattenedChild, encodeFlattenedChildren, getLogicalParent, getLogicalParent, getStateHelper, getStateHelper, isVisitable, partialEncodeVisit, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, setPartialTarget, setupChildrenEncodingContext, setupEncodingContext, setUpEncodingContext, tearDownChildrenEncodingContext, tearDownEncodingContext, visitAllChildren, visitChildren, visitChildren, visitTree, visitTree
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getPassThroughAttributes, getPassThroughAttributes, getResourceBundleMap, getTransientStateHelper, getTransientStateHelper, isCompositeComponent, isInView, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView
public static final org.apache.myfaces.trinidad.bean.FacesBean.Type TYPE
public static final org.apache.myfaces.trinidad.bean.PropertyKey CLIENT_ATTRIBUTES_KEY
public static final org.apache.myfaces.trinidad.bean.PropertyKey CLIENT_COMPONENT_KEY
public static final String COMPONENT_FAMILY
public static final String COMPONENT_TYPE
public UIXDynamicDeclarativeComponent()
protected UIXDynamicDeclarativeComponent(String rendererType)
public final Set getClientAttributes()
public final void setClientAttributes(Set clientAttributes)
clientAttributes
- the new clientAttributes valuepublic final boolean isClientComponent()
public final void setClientComponent(boolean clientComponent)
clientComponent
- the new clientComponent valuepublic String getFamily()
getFamily
in class PartialUIXInclude
protected org.apache.myfaces.trinidad.bean.FacesBean.Type getBeanType()
getBeanType
in class UIXInclude