Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How to use Java script use function calling direct in the js file logic?

Avatar

Avatar
Validate 10
Level 4
Var
Level 4

Likes

44 likes

Total Posts

113 posts

Correct Reply

5 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 25
View profile

Avatar
Validate 10
Level 4
Var
Level 4

Likes

44 likes

Total Posts

113 posts

Correct Reply

5 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 25
View profile
Var
Level 4

27-12-2017

AM doing a customization of touch UI dialog where i am using some of the function in the dialog events. like below code. Where as i want to use the use function of JavaScript API to call some of the AdaptTo mechanism and use it in the Jquery level code. Will it be possible or it is tightly coupled with sightly framework alone..?

$document.on("dialog-ready", function() {

        document.querySelector('form.cq-dialog').addEventListener('submit', function(){

            //$(window).adaptTo("foundation-ui").alert("Close", "Dialog closed, selector [form.cq-dialog]");

        }, true);

    });

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Level 10
edubey
Level 10

Likes

274 likes

Total Posts

1,502 posts

Correct Reply

392 solutions
Top badges earned
Validate 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Validate 1
Level 10
edubey
Level 10

Likes

274 likes

Total Posts

1,502 posts

Correct Reply

392 solutions
Top badges earned
Validate 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile
edubey
Level 10

27-12-2017

AFAIK, you cannot.

These things are executed at different level. Javascript (at browser) and JS USE (at server)

What's your use case, there may be better alternative solution available.

Answers (3)

Answers (3)

Avatar

Avatar
Validate 10
Level 4
Var
Level 4

Likes

44 likes

Total Posts

113 posts

Correct Reply

5 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 25
View profile

Avatar
Validate 10
Level 4
Var
Level 4

Likes

44 likes

Total Posts

113 posts

Correct Reply

5 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 25
View profile
Var
Level 4

04-01-2018

can i do this request in JAVA SCRIPT USE API function, if we can, can you show some limelight on it with an example.?

Avatar

Avatar
Validate 1
Level 10
edubey
Level 10

Likes

274 likes

Total Posts

1,502 posts

Correct Reply

392 solutions
Top badges earned
Validate 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Validate 1
Level 10
edubey
Level 10

Likes

274 likes

Total Posts

1,502 posts

Correct Reply

392 solutions
Top badges earned
Validate 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile
edubey
Level 10

03-01-2018

With the mentioned article you have already got the path to the image in DAM, you can make a request to that jcr:content of that image to read the properties/metadata and display it any preferred format/UI

Avatar

Avatar
Validate 10
Level 4
Var
Level 4

Likes

44 likes

Total Posts

113 posts

Correct Reply

5 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 25
View profile

Avatar
Validate 10
Level 4
Var
Level 4

Likes

44 likes

Total Posts

113 posts

Correct Reply

5 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 25
View profile
Var
Level 4

02-01-2018

Hi edubey,

My use-case is to bring the image properties in the dialog authoring to showcase the path, size, mimeType, etc meta properties.

The below article helps a little to bring image path as it is already available in the page rendition as a html tag. but i need some more infor which i want to retrieve at Touch UI dialog load or some other dialog event listeners.

Image Path in Touch UI dialog (AEM 6.1 and AEM 6.2)

..

VAr