org.apache.myfaces.trinidad.change

## Class AddChildComponentChange

- java.lang.Object
- - org.apache.myfaces.trinidad.change.ComponentChange
  - - org.apache.myfaces.trinidad.change.AddComponentChange
    - - org.apache.myfaces.trinidad.change.AddChildComponentChange

- All Implemented Interfaces:
    Serializable

      public class AddChildComponentChange
      extends AddComponentChange

  Change specialization for adding a child component. While applying this Change, the child component is re-created and added to the list of children. If a child component with an id same as the new child being added is already present in the parent container, the new child is not added.
  Version:
    $Name: $ ($Revision: adfrt/faces/adf-faces-api/src/main/java/oracle/adf/view/faces/change/AddChildComponentChange.java#0 $) $Date: 10-nov-2005.19:09:54 $
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AddChildComponentChange(String insertBeforeId, javax.faces.component.UIComponent childComponent)` Constructs an AddChildChange with the specified child component and the the identifier of the neighbour.
    `AddChildComponentChange(javax.faces.component.UIComponent childComponent)` Constructs an AddChildChange that appends the specified child component.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `changeComponent(javax.faces.component.UIComponent uiComponent)` Apply this change to the specied component
    `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.AddComponentChange

      `getComponent`

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

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

- - ### Constructor Detail

    - #### AddChildComponentChange

          public AddChildComponentChange(javax.faces.component.UIComponent childComponent)

      Constructs an AddChildChange that appends the specified child component.
      Parameters:
        `childComponent` - The child component that is to be appended.
      Throws:
        `IllegalArgumentException` - if specified childComponent is null.

    - #### AddChildComponentChange

          public AddChildComponentChange(String insertBeforeId,
                                 javax.faces.component.UIComponent childComponent)

      Constructs an AddChildChange with the specified child component and the the identifier of the neighbour. If the neighbour is not found when applying this Change, or is `null`< 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.
        `childComponent` - The child component that is to be added.
      Throws:
        `IllegalArgumentException` - if specified childComponent is null

  - ### Method Detail

    - #### getInsertBeforeId

          public String getInsertBeforeId()

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

    - #### changeComponent

          public void changeComponent(javax.faces.component.UIComponent uiComponent)

      Apply this change to the specied component
      Specified by:
        `changeComponent` in class `ComponentChange`
      Parameters:
        `uiComponent` - the UIComponent to apply the change to

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