활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
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.
해결되었습니다! 솔루션으로 이동.
조회 수
답글
좋아요 수
Hi
Use some other API.. jackson and gson can be used here. I believe both are available with AEM 6.3
Java POJO to JSON using Gson (com.google.gson.Gson) - CoderMagnet - JAVA JCR AEM Sightly Resource
조회 수
답글
좋아요 수
You can follow this link hope you will get the idea.
Multifield Component in Sightly with Sling Models | TechCookies
Hi zeeshank15007365,
Thanks a lot for sharing this link across.
In AEM 6.3, JSONObject is deprecated and as a result , cannot proceed with the same.
Any link/pointers on how to achieve this without JSONObject api, would be helpful.
조회 수
답글
좋아요 수
Use some other API.. jackson and gson can be used here. I believe both are available with AEM 6.3
cq5 - org.apache.sling.commons.json.JSONArray is deprecated in AEM 6.3 - Stack Overflow
조회 수
답글
좋아요 수
Hi
Use some other API.. jackson and gson can be used here. I believe both are available with AEM 6.3
Java POJO to JSON using Gson (com.google.gson.Gson) - CoderMagnet - JAVA JCR AEM Sightly Resource
조회 수
답글
좋아요 수
조회 수
Likes
답글