Equivalent API methods in granite/touch UI | Community
Skip to main content
Level 5
June 1, 2017
Solved

Equivalent API methods in granite/touch UI

  • June 1, 2017
  • 4 replies
  • 3344 views

Hi ,

I am upgrading code to Touch UI as part of that rewriting the listeners as well. One of the requirement needs to get the selected page URL from 2 locations one is from the sites and other from the page edits.

what are the equivalent API methods for these 2  in AEM6.2?

CQ.wcm.SiteAdmin

CQ.HTTP.noCaching(CQ.HTTP.getPath())

Or How can I get the selected page in Touch UI?

Can anyone let me know how I can have the selected current page path in the js?

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

This is a really difficult question as Granite does not necessary have matching APIs from Classic UI.

Here is the complete Granite Reference:

Reference Materials

Also - check Blog - he has written a lot of great Touch UI blog artilces -

Experiencing Adobe Experience Manager - Day CQ: In the blog "Experiencing Adobe Experience Manger - Day CQ"

I will see if he has a specific one that can help you!

4 replies

dragon2AAuthor
Level 5
June 2, 2017

Any luck on this query. It's very urgent.

smacdonald2008
smacdonald2008Accepted solution
Level 10
June 2, 2017

This is a really difficult question as Granite does not necessary have matching APIs from Classic UI.

Here is the complete Granite Reference:

Reference Materials

Also - check Blog - he has written a lot of great Touch UI blog artilces -

Experiencing Adobe Experience Manager - Day CQ: In the blog "Experiencing Adobe Experience Manger - Day CQ"

I will see if he has a specific one that can help you!

smacdonald2008
Level 10
June 2, 2017

"How can I get the selected page in Touch UI?"

Sreekanth - the blog author suggested this:

try

var fSelections = $(".foundation-collection").adaptTo("foundation-selections");

if(fSelections && (fSelections.count() > 1)){

showAlert("Select one asset", 'Error');

return;

}

For eg. http://experience-aem.blogspot.com/2016/11/aem-62-touch-ui-replace-asset-binary-with-aem-asset-or-local-file-upload.html

In TOuch UI - you can use JQuey selectors.

dragon2AAuthor
Level 5
June 2, 2017

Thaks for the suggestions and reply. I am able to resolve it by another way. I will go through those links again to check for the solution.

Thanks