org.apache.myfaces.trinidad.change

## Class InsertedComponentFragmentLocator

- java.lang.Object
- - org.apache.myfaces.trinidad.change.InsertedComponentFragmentLocator

-     public abstract class InsertedComponentFragmentLocator
      extends Object

  Strategy implemented for tags that insert document fragments, returning the URL of the fragment for any top-level UIComponents inserted by the tag. When determining the URL of the document that defines the tag corresponding to a target component, clients will call `getFramentUrlForInsertedComponent` for each registered `InsertedComponentFragmentLocator` on each UIComponent starting from the target component and upto the UIViewRoot and each registered InsertingComponentFragmentLocator on each component from the parent of the target component to the UIViewRoot. If a non-null URL string is returned, the walk of the ancestor chain halts and the returned value is considered the URL string for the document for the target component. If the registered listeners return `null` for every component in the ancestor chain, the containing URL is assumed to be the URL of the enclosing page. Implementations of InsertedComponentFragmentLocator are registered using the normal Service Provider Interface pattern. A text file named "org.apache.myfaces.trinidad.change.InsertedComponentFragmentLocator" is placed in the META-INF/services directory. This file contains the fully qualified class names of all the InsertedComponentFragmentLocator strategy to register.
  See Also:
    `InsertingComponentFragmentLocator`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `InsertedComponentFragmentLocator()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract String` | `getFragmentUrlForInsertedComponent(javax.faces.context.FacesContext context, javax.faces.component.UIComponent componentToTest, javax.faces.component.UIComponent targetComponent)` Returns the URL string of the fragment that contains tag corresponding to `componentToTest`, or `null` if this InsertedComponentFragmentLocator could not determine the URL.

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

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

- - ### Constructor Detail

    - #### InsertedComponentFragmentLocator

          public InsertedComponentFragmentLocator()

  - ### Method Detail

    - #### getFragmentUrlForInsertedComponent

          public abstract String getFragmentUrlForInsertedComponent(javax.faces.context.FacesContext context,
                                                  javax.faces.component.UIComponent componentToTest,
                                                  javax.faces.component.UIComponent targetComponent)

      Returns the URL string of the fragment that contains tag corresponding to `componentToTest`, or `null` if this InsertedComponentFragmentLocator could not determine the URL.
      Parameters:
        `context` - The FacesContext instance for current request
        `componentToTest` - The component to determine the fragment URL for. `componentToTest` will be the `targetComponent`, or one of its ancestors. EL context will NOT be setup for `componentToTest` when this method is called.
        `targetComponent` - The target component for which we are ultimately trying to determine the fragment URL. It is assumed that this URL will be same as the URL obtained for `componenToTest`

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