Hi All,
I have set up the aem project in IDE. However, i am not getting the autocomplete option for "currentNode" object. Problem is that project will not build because of compilation error. Can you please help.
Thanks
Ajay
Solved! Go to Solution.
Views
Replies
Total Likes
IDE will not be able to recognize the auto completion of currentNode, and in order to test and execute your code you need to deploy it in AEM.
You cannot compile and execute from IDE
You should edit in JSP crxde and then using vault eclipse plugin get the code in IDE.
Which IDE you are using?
Views
Replies
Total Likes
Cq: Define Object does not gives the access to currentNode
Its the part of JCR API [1]
https://docs.adobe.com/docs/en/cq/5-6-1/developing/the_basics.html#Development Objects in the WEM Environment
Views
Replies
Total Likes
edubey wrote...
Cq: Define Object does not gives the access to currentNode
Its the part of JCR API [1]
https://docs.adobe.com/docs/en/cq/5-6-1/developing/the_basics.html#Development Objects in the WEM Environment
Thanks for the response. I have checked the links provided. Can you please provide more details.
Please find my detailed insight below:
- The <cq:defineObjects> tag exposes the following, regularly used, scripting objects which can be referenced by the developer. It also exposes the objects defined by the <sling:defineObjects> tag.
- currentNode is one of the objects exposed by <sling:defineObjects>.
- Ref: https://docs.adobe.com/docs/en/cq/5-6-1/developing/components.html#<cq:defineObjects>
- Ref: https://docs.adobe.com/docs/en/aem/6-0/develop/components.html#Function of global.jsp, used APIs and Taglibs
- Also, if you directly edit jsp in crx-de and input below code, it works:
- String pageTitle = currentNode.getProperty("jcr:title").getString();
- This implies that this object is exposed but IDE is not able to recognize it.
- Only problem is making this compile from IDE. Because of which bundle will not be deployed.
Views
Replies
Total Likes
IDE will not be able to recognize the auto completion of currentNode, and in order to test and execute your code you need to deploy it in AEM.
You cannot compile and execute from IDE
You should edit in JSP crxde and then using vault eclipse plugin get the code in IDE.
Which IDE you are using?
Views
Replies
Total Likes
Hi
edubey wrote...
IDE will not be able to recognize the auto completion of currentNode, and in order to test and execute your code you need to deploy it in AEM.
You cannot compile and execute from IDE
You should edit in JSP crxde and then using vault eclipse plugin get the code in IDE.
Which IDE you are using?
Hi Praveen,
I had done it that way. Wanted to see if anyone has resolved it.
I am using Intellij.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies