Hi there,
Now i need to assert a property type is "String[]", please see below:
[img]option.png[/img]
But I find that there is no specified value for type "String[]", please see below:
[img]string.png[/img]
Anyone know how to assert the type?
Thanks a lot in advance.
Solved! Go to Solution.
Views
Replies
Total Likes
boolean multi = property.isMultiple(); if (multi) { Value[] values = property.getValues(); ... }
Views
Replies
Total Likes
You could have tried using instanceof worked well for me before(https://docs.oracle.com/javase/tutorial/java/nutsandbolts/op2.html)
Views
Replies
Total Likes
Take a look here - there are some examples on http://www.day.com/specs/jsr170/javadocs/jcr-1.0/javax/jcr/PropertyType.html that may help:
Views
Replies
Total Likes
boolean multi = property.isMultiple(); if (multi) { Value[] values = property.getValues(); ... }
Views
Replies
Total Likes
Sorry, i check the https://docs.oracle.com/javase/tutorial/java/nutsandbolts/op2.html content, it seeming not fit the problem. Note: this is JCR API.
Views
Replies
Total Likes
smacdonald2008 wrote...
Take a look here - there are some examples on http://www.day.com/specs/jsr170/javadocs/jcr-1.0/javax/jcr/PropertyType.html that may help:
http://www.javased.com/index.php?api=javax.jcr.PropertyType
Exactly!!!!! Thanks a lot.
Now i know to assert and get the multi type property.
But if need to assign multi values to multi property, how to do that?
Views
Replies
Total Likes