org.apache.myfaces.trinidad.component

## Class UIXComponentRef

- java.lang.Object
- - javax.faces.component.UIComponent
  - - org.apache.myfaces.trinidad.component.UIXComponent
    - - org.apache.myfaces.trinidad.component.UIXComponentBase
      - - org.apache.myfaces.trinidad.component.UIXComponentRef

- All Implemented Interfaces:
    EventListener, javax.faces.component.NamingContainer, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.TransientStateHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder

      public class UIXComponentRef
      extends UIXComponentBase
      implements javax.faces.component.NamingContainer

  This component inserts a component (defined by a separate page that starts with <tr:componentDef>) into the current page. The "id" attribute is required on this component, which implements NamingContainer. This component may have a value, custom attributes, or both. The value will be made available to within component definition using the "binding" EL attribute. Custom attributes, defined with <f:attribute> or <tr:attribute>, will also be made available within the component definition - see the <tr:componentDef> tag documentation for more information. This component may also have facets. Each facet may be referenced exactly once from within a <tr:componentDef> tag by using a <tr:facetRef> - see the <tr:componentRef> tag documentation for more information.

  #### 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 event might include the width of a column that supported client-side resizing.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.myfaces.trinidad.component.UIXComponentBase

      `UIXComponentBase.ComponentSystemEventListenerWrapper`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `COMPONENT_FAMILY`
    `static String` | `COMPONENT_TYPE`
    `static PropertyKey` | `COMPONENT_TYPE_KEY`
    `static FacesBean.Type` | `TYPE`
    `static PropertyKey` | `VALUE_KEY`
    `static PropertyKey` | `VAR_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

      `ATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME, VIEW_LOCATION_KEY`

    - ### Fields inherited from interface javax.faces.component.NamingContainer

      `SEPARATOR_CHAR`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `UIXComponentRef()` Construct an instance of the UIXComponentRef.
    `protected` | `UIXComponentRef(String rendererType)` Construct an instance of the UIXComponentRef.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `broadcast(javax.faces.event.FacesEvent event)`
    `void` | `encodeBegin(javax.faces.context.FacesContext context)`
    `void` | `encodeEnd(javax.faces.context.FacesContext context)`
    `protected FacesBean.Type` | `getBeanType()`
    `String` | `getComponentType()` Gets which componnet to use.
    `String` | `getFamily()`
    `Object` | `getValue()` Gets the value of the component.
    `String` | `getVar()` Gets The name of the EL variable that will be set when encoding the component.
    `boolean` | `invokeOnComponent(javax.faces.context.FacesContext context, String clientId, javax.faces.component.ContextCallback callback)` Override to calls the hooks for setting up and tearing down the context before the children are visited.
    `void` | `processDecodes(javax.faces.context.FacesContext context)`
    `void` | `processUpdates(javax.faces.context.FacesContext context)`
    `void` | `processValidators(javax.faces.context.FacesContext context)`
    `void` | `queueEvent(javax.faces.event.FacesEvent event)`
    `void` | `setComponentType(String componentType)` Sets which componnet to use.
    `void` | `setValue(Object value)` Sets the value of the component.
    `void` | `setVar(String var)` Sets The name of the EL variable that will be set when encoding the component.

    - ### Methods inherited from class org.apache.myfaces.trinidad.component.UIXComponentBase

      `adaptMethodBinding, addAttributeChange, addAttributeChangeListener, addClientBehavior, addComponentChange, addComponentChange, addComponentChangeFilter, addFacesListener, broadcastToMethodBinding, broadcastToMethodExpression, clearCachedClientIds, clearInitialState, createFacesBean, decode, decodeChildren, decodeChildrenImpl, encodeChildren, 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, getRenderedFacetsAndChildren, 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`

    - ### Methods inherited from class org.apache.myfaces.trinidad.component.UIXComponent

      `addPartialTarget, broadcastInContext, clearCachedClientIds, defaultGetRenderedFacetsAndChildren, encodeFlattenedChild, encodeFlattenedChildren, getLogicalParent, getLogicalParent, getStateHelper, getStateHelper, isVisitable, partialEncodeVisit, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, setPartialTarget, setupChildrenEncodingContext, setupChildrenVisitingContext, setupEncodingContext, setUpEncodingContext, setupVisitingContext, tearDownChildrenEncodingContext, tearDownChildrenVisitingContext, tearDownEncodingContext, tearDownVisitingContext, visitAllChildren, visitChildren, visitChildren, visitTree, visitTree`

    - ### Methods inherited from class javax.faces.component.UIComponent

      `encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getResourceBundleMap, getTransientStateHelper, getTransientStateHelper, isCompositeComponent, isInView, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### TYPE

          public static final FacesBean.Type TYPE

    - #### VALUE_KEY

          public static final PropertyKey VALUE_KEY

    - #### COMPONENT_TYPE_KEY

          public static final PropertyKey COMPONENT_TYPE_KEY

    - #### VAR_KEY

          public static final PropertyKey VAR_KEY

    - #### COMPONENT_FAMILY

          public static final String COMPONENT_FAMILY

      See Also:
        Constant Field Values

    - #### COMPONENT_TYPE

          public static final String COMPONENT_TYPE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### UIXComponentRef

          public UIXComponentRef()

      Construct an instance of the UIXComponentRef.

    - #### UIXComponentRef

          protected UIXComponentRef(String rendererType)

      Construct an instance of the UIXComponentRef.

  - ### Method Detail

    - #### invokeOnComponent

          public boolean invokeOnComponent(javax.faces.context.FacesContext context,
                                  String clientId,
                                  javax.faces.component.ContextCallback callback)
                                    throws javax.faces.FacesException

      Description copied from class: `UIXComponentBase`
      Override to calls the hooks for setting up and tearing down the context before the children are visited.
      Overrides:
        `invokeOnComponent` in class `UIXComponentBase`
      Throws:
        `javax.faces.FacesException`
      See Also:
        `UIXComponent.setupVisitingContext(javax.faces.context.FacesContext)`, `UIXComponent.tearDownVisitingContext(javax.faces.context.FacesContext)`

    - #### queueEvent

          public void queueEvent(javax.faces.event.FacesEvent event)

      Overrides:
        `queueEvent` in class `UIXComponentBase`

    - #### broadcast

          public void broadcast(javax.faces.event.FacesEvent event)
                         throws javax.faces.event.AbortProcessingException

      Overrides:
        `broadcast` in class `UIXComponentBase`
      Throws:
        `javax.faces.event.AbortProcessingException`

    - #### processDecodes

          public void processDecodes(javax.faces.context.FacesContext context)

      Overrides:
        `processDecodes` in class `UIXComponentBase`

    - #### processValidators

          public void processValidators(javax.faces.context.FacesContext context)

      Overrides:
        `processValidators` in class `UIXComponentBase`

    - #### processUpdates

          public void processUpdates(javax.faces.context.FacesContext context)

      Overrides:
        `processUpdates` in class `UIXComponentBase`

    - #### encodeBegin

          public void encodeBegin(javax.faces.context.FacesContext context)
                           throws IOException

      Overrides:
        `encodeBegin` in class `UIXComponentBase`
      Throws:
        `IOException`

    - #### encodeEnd

          public void encodeEnd(javax.faces.context.FacesContext context)
                         throws IOException

      Overrides:
        `encodeEnd` in class `UIXComponentBase`
      Throws:
        `IOException`

    - #### getValue

          public final Object getValue()

      Gets the value of the component. This value be evaluated during all lifecycle processing and made available to the componentDef as an EL variable named "bindings".
      Returns:
        the new value value

    - #### setValue

          public final void setValue(Object value)

      Sets the value of the component. This value be evaluated during all lifecycle processing and made available to the componentDef as an EL variable named "bindings".
      Parameters:
        `value` - the new value value

    - #### getComponentType

          public final String getComponentType()

      Gets
      which componnet to use. This should match a <component-type> string in a region metadata file. An example might look like "org.apache.myfaces.trinidaddemo.region.stock". This attribute can be bound to an EL expression or manually set, which will change the region definition used the next time the page renders.
      Returns:
        the new componentType value

    - #### setComponentType

          public final void setComponentType(String componentType)

      Sets
      which componnet to use. This should match a <component-type> string in a region metadata file. An example might look like "org.apache.myfaces.trinidaddemo.region.stock". This attribute can be bound to an EL expression or manually set, which will change the region definition used the next time the page renders.
      Parameters:
        `componentType` - the new componentType value

    - #### getVar

          public final String getVar()

      Gets
      The name of the EL variable that will be set when encoding the component. This attribute is set by the tr:componentDef on behalf of the UIXComponentRef, and not the tr:componentRef. For example, let's say this "var" attribute is set to the value "attrs"; if the <tr:componentRef> tag has an attribute called "bar", The value of "bar" can be referenced from a child within <tr:componentDef> using the expression `#{attrs.bar}`.
      Returns:
        the new var value

    - #### setVar

          public final void setVar(String var)

      Sets
      The name of the EL variable that will be set when encoding the component. This attribute is set by the tr:componentDef on behalf of the UIXComponentRef, and not the tr:componentRef. For example, let's say this "var" attribute is set to the value "attrs"; if the <tr:componentRef> tag has an attribute called "bar", The value of "bar" can be referenced from a child within <tr:componentDef> using the expression `#{attrs.bar}`.
      Parameters:
        `var` - the new var value

    - #### getFamily

          public String getFamily()

      Specified by:
        `getFamily` in class `UIXComponentBase`

    - #### getBeanType

          protected FacesBean.Type getBeanType()

      Overrides:
        `getBeanType` in class `UIXComponentBase`

Copyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.