org.apache.myfaces.trinidad.change

## Class SetFacetChildDocumentChange

- java.lang.Object
- - org.apache.myfaces.trinidad.change.AddComponentDocumentChange
  - - org.apache.myfaces.trinidad.change.SetFacetChildDocumentChange

- All Implemented Interfaces:
    DocumentChange

      public class SetFacetChildDocumentChange
      extends AddComponentDocumentChange

  Change specialization for adding a child component to a facet using document mark up. While applying this Change, the child component is created and added to the document. If the facet doesn't exist, it will be created. If the facet does exist, all of its content will be removed and the new content added.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SetFacetChildDocumentChange(String facetName, DocumentFragment fragment)` Constructs an AddFacetDocumentChange with the specified child component mark up and the name of the facet.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `changeDocument(Node componentNode)` Given the DOM Node representing a Component, apply any necessary DOM changes.
    `String` | `getFacetName()` Returns the identifier of the sibling before which this new child needs to be inserted.
    `boolean` | `getForcesDocumentReload()` Returns true if adding the DocumentChange should force the JSP Document to reload

    - ### Methods inherited from class org.apache.myfaces.trinidad.change.AddComponentDocumentChange

      `getComponentFragment, getImportedComponentFragment`

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

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

- - ### Constructor Detail

    - #### SetFacetChildDocumentChange

          public SetFacetChildDocumentChange(String facetName,
                                     DocumentFragment fragment)

      Constructs an AddFacetDocumentChange with the specified child component mark up and the name of the facet.
      Parameters:
        `facetName` - Name of facet to create the child component in
        `fragment` - DOM mark up for child component to be inserted.
      Throws:
        `IllegalArgumentException` - if facetName or componentFragment is `null`

  - ### Method Detail

    - #### getFacetName

          public String getFacetName()

      Returns the identifier of the sibling before which this new child needs to be inserted.

    - #### changeDocument

          public void changeDocument(Node componentNode)

      Given the DOM Node representing a Component, apply any necessary DOM changes. While applying this Change, the child component is created and added to the document. If the facet doesn't exist, it will be created. If the facet does exist, all of its content will be removed and the new content added.
      Parameters:
        `componentNode` - DOM node of the component to apply the change to

    - #### getForcesDocumentReload

          public boolean getForcesDocumentReload()

      Returns true if adding the DocumentChange should force the JSP Document to reload
      Specified by:
        `getForcesDocumentReload` in interface `DocumentChange`
      Overrides:
        `getForcesDocumentReload` in class `AddComponentDocumentChange`

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