Array Null Property
How to read the null property array value?
Example:
Property type Value
area String[]
My requirement is i want to read the property which has a value as NULL
Please help me out to fix the issue.
Thanks!
MIke
How to read the null property array value?
Example:
Property type Value
area String[]
My requirement is i want to read the property which has a value as NULL
Please help me out to fix the issue.
Thanks!
MIke
Here is more information on this subject. Lets assume that we have this property that is a String array:
[img]StringArr.png[/img]
As you can see -- testprop is empty and a String[]. To read this value - you use the JCR API and the following code:
// Retrieve content
Node node = root.getNode("adobe/cq");
Property references = node.getProperty("testprop");
Value[] values = references.getValues();
String myVal = values[0].getString();
Here is a screenshot of debugging the code -- look at the value.
[img]StringArr2.png[/img]
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.