Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

How to check the node property type is single value or multi value in aem? | AEM Community Blog Seeding

Avatar

Administrator

BlogImage.jpg

How to check the node property type is single value or multi value in aem? by Rashid Jorvee

Abstract

How to check the node property type is single value or multi value in aem?
We can check the type of property(whether single or multiple) using the method isMultiple() of Property interface. Below is an example to check the node property "items" is a single value or multiple values and based on that get the value or values for that property in AEM.



Property property = node.getProperty("items");
Value[] values = null;
if(property.isMultiple()){
values = property.getValues();
} else {
values[0] = property.getValue();
}



Hope this helps. Thank you!

Read Full Blog

How to check the node property type is single value or multi value in aem?

Q&A

Please use this thread to ask the related questions.

0 Replies