Expand my Community achievements bar.

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.



Kautuk Sahni
0 Replies