org.apache.myfaces.trinidad.change

## Class AddChildDocumentChange

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

- All Implemented Interfaces:
    DocumentChange

      public class AddChildDocumentChange
      extends AddComponentDocumentChange

  Change specialization for adding a child component using document mark up. While applying this Change, the child component is created and added to the document.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AddChildDocumentChange(DocumentFragment componentFragment)` Constructs an AddChildDocumentChange with the specified child component mark up.
    `AddChildDocumentChange(String insertBeforeId, DocumentFragment componentFragment)` Constructs an AddChildDocumentChange with the specified child component mark up and the identifier of the neighbour.

  - ### 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` | `getInsertBeforeId()` Returns the identifier of the sibling before which this new child needs to be inserted.

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

      `getComponentFragment, getForcesDocumentReload, getImportedComponentFragment`

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

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

- - ### Constructor Detail

    - #### AddChildDocumentChange

          public AddChildDocumentChange(DocumentFragment componentFragment)

      Constructs an AddChildDocumentChange with the specified child component mark up.
      Parameters:
        `componentFragment` - DOM mark up for child component to be appended.
      Throws:
        `IllegalArgumentException` - if componentFragment is `null`

    - #### AddChildDocumentChange

          public AddChildDocumentChange(String insertBeforeId,
                                DocumentFragment componentFragment)

      Constructs an AddChildDocumentChange with the specified child component mark up and the identifier of the neighbour. If the neighbour were not to be found while applying this Change, the child is appended to the end of the list of children.
      Parameters:
        `insertBeforeId` - The identifier of the sibling before which this new child is to be inserted or `null` to append the child
        `componentFragment` - DOM mark up for child component to be inserted.
      Throws:
        `IllegalArgumentException` - if componentFragment is `null`

  - ### Method Detail

    - #### getInsertBeforeId

          public String getInsertBeforeId()

      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.
      Parameters:
        `componentNode` - DOM node of the component to apply the change to

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