Sling Model usage for property of type string Array in AEM 6.3
Hi,
Suppose, I have a pathbrowser within multifield. For instance I select two paths in dialog, which is stored in backend as {"pagePath":"/content/test1"}, {"pagePath":"/content/test2"}. I want to retrieve the jcr: title of these two pages. How do I go about doing this.
If I were to use, WCMUsePOJO's/activate method, I would have done something like
ValueMap properties = getProperties();
if (properties.containsKey("multifieldPropertystoredincrx")) {
String[] paths= properties.get("multifieldPropertystoredincrx", String[].class);
for (int i = 0; (null != paths) && (i < paths.length); i++) {
JSONObject obj = new JSONObject(paths[i]);
if (obj.has("pagePath")) {
String productPath = obj.getString("pagePath"));
and so on.
But with SlingModel, I am not getting how to go about this. Any thoughts on this will be really helpful.