This functionality is only available for certain module packages.

You are here: Reference > SCRIPTING > Methods for components > Operations on placeholders > Organizing and sorting objects on placeholders > reorderPlaceholderObjects(String placeholderName, int srcIndex,int count, int dstIndex)

reorderPlaceholderObjects(String placeholderName, int srcIndex,int count, int dstIndex)

Reorganizes objects on the placeholder placeholder in a way that count objects on index srcIndex are moved to dstIndex.

reorderPlaceholderObjects(String placeholderName, int srcIndex,int count, int dstIndex)
Argument String placeholderName The name of the placeholder of the component.
Integer srcIndex A valid source index within the placeholder objects.
Integer count The number of objects to be moved
Integer dstIndex A valid destination index within the placeholder objects.
Return value
Exceptions Throws a PlaceholderNotExistingException, if no placeholder with the specified name exists.
Throws an IndexOutOfBoundsException if the specified indexes are out of bounds:
-1 < srcIndex < getPlaceholderObjects(placeholder).size() and dstIndex + count < getPlaceholderObjects(placeholder).size()