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 > sortPlaceholderObjects(String placeholderName, String sortedByFormula)

sortPlaceholderObjects(String placeholderName, String sortedByFormula)

Sorts the objects on the placeholder with the name placeholderName in the order of the result of the sortedByFormula. The formula has the same form as the List.sortedBy(sortedByFormula) formula in the formula language.

sortPlaceholderObjects(String placeholderName, String sortedByFormula)
Argument String placeholderName The name of the placeholder of the component.
String sortedByFormula A valid formula, which returns a sortedBy formula expression
Return value
Exception Throws a PlaceholderNotExistingException, if no placeholder with the specified name exists.
Throws an EvaluationException, if an invalid formula is specified.