org.apache.myfaces.trinidad.change

## Class ReorderChildrenComponentChange

- java.lang.Object
- - org.apache.myfaces.trinidad.change.ComponentChange
  - - org.apache.myfaces.trinidad.change.ReorderChildrenComponentChange

- All Implemented Interfaces:
    Serializable, DocumentChange

      public class ReorderChildrenComponentChange
      extends ComponentChange
      implements DocumentChange

  Change specialization for re-ordering of children. While applying this Change, the specified order of children is restored.
  Version:
    $Name: $ ($Revision: adfrt/faces/adf-faces-api/src/main/java/oracle/adf/view/faces/change/ReorderChildrenComponentChange.java#0 $) $Date: 10-nov-2005.19:10:01 $
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReorderChildrenComponentChange(List<String> childIds)` Constructs a ReorderChange with the given List of identifiers for children.
    `ReorderChildrenComponentChange(List<String> childIds, String identifier)` Constructs a ReorderChange with the given List of identifiers for children.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `changeComponent(javax.faces.component.UIComponent uiComponent)` Apply this change to the specied component
    `void` | `changeDocument(Node componentNode)` Apply this change to the specied root DOM Node of the component
    `List<String>` | `getChildIds()` Returns an unmodifiable List of the identifiers for the children.
    `boolean` | `getForcesDocumentReload()` Returns true if adding the DocumentChange should force the JSP Document to reload
    `String` | `getIdentifier()` Returns the identifier type.

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

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

- - ### Constructor Detail

    - #### ReorderChildrenComponentChange

          public ReorderChildrenComponentChange(List<String> childIds)

      Constructs a ReorderChange with the given List of identifiers for children.
      Parameters:
        `childIds` - An in-order collection (List) of Ids (as java.lang.String) of child components. This List implementation should be of type java.io.Serializable in order to be persisted. If no identifier was passed, it would be assumed that the list consists of the Ids.
      Throws:
        `IllegalArgumentException` - if supplied childIds were to be null.

    - #### ReorderChildrenComponentChange

          public ReorderChildrenComponentChange(List<String> childIds,
                                        String identifier)

      Constructs a ReorderChange with the given List of identifiers for children.
      Parameters:
        `childIds` - An in-order collection (List) of Ids (as java.lang.String) of child components. This List implementation should be of type java.io.Serializable in order to be persisted.
        `identifier` - Determines the type of identifiers which the List consists of.
      Throws:
        `IllegalArgumentException` - if supplied childIds were to be null or supplied identifier was to be null or emtpy string.

  - ### Method Detail

    - #### getChildIds

          public List<String> getChildIds()

      Returns an unmodifiable List of the identifiers for the children.

    - #### getIdentifier

          public final String getIdentifier()

      Returns the identifier type.

    - #### changeComponent

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

      Apply this change to the specied component In case children were to be removed between the time when this Change was added, and the time when it was applied, maybe due to application of a RemoveChildrenChange, such children are not re-instated. In case children were to be added between the time when this Change was added, and the time when it was applied, maybe due to application of an AddChildChange, such children are appended to the end of the list in preserving the order in which they were added (that is they appear at the end).
      Specified by:
        `changeComponent` in class `ComponentChange`
      Parameters:
        `uiComponent` - the UIComponent to apply the change to

    - #### changeDocument

          public void changeDocument(Node componentNode)

      Apply this change to the specied root DOM Node of the component In case children were to be removed between the time when this Change was added, and the time when it was applied, maybe due to application of a RemoveChildrenChange, such children are not re-instated. In case children were to be added between the time when this Change was added, and the time when it was applied, maybe due to application of an AddChildChange, such children are appended to the end of the list in preserving the order in which they were added (that is they appear at the end).
      Specified by:
        `changeDocument` in interface `DocumentChange`
      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`

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