AEM 6.4 touch UI dialog | Reload the component dialog after select event

Avatar

Avatar
Validate 10
Level 3
pradeepdubey82
Level 3

Likes

16 likes

Total Posts

93 posts

Correct reply

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

Avatar
Validate 10
Level 3
pradeepdubey82
Level 3

Likes

16 likes

Total Posts

93 posts

Correct reply

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

17-06-2020

Hi All,

 

I have a requirement where i need to reload the component(not page refresh) when changed the tag value.

At present i am refreshing the page using 

window.location.reload();

which is closing the dialog and refreshing the page, this is what i don't want.

 

Please advise, thanks in advance. 

 

Thanks,

Pradeep

 

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back 5
Employee
vanegi
Employee

Likes

392 likes

Total Posts

378 posts

Correct reply

148 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 50
View profile

Avatar
Give Back 5
Employee
vanegi
Employee

Likes

392 likes

Total Posts

378 posts

Correct reply

148 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 50
View profile
vanegi
Employee

17-06-2020

You can use REFRESH_SELF in _cq_editConfig.xml. Sample xml file is:

 

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
    jcr:primaryType="cq:EditConfig">
    <cq:listeners
        jcr:primaryType="cq:EditListenersConfig"
        afteredit="REFRESH_SELF"/>
</jcr:root>

 

See the example component implementation from /libs/foundation/components/carousel/cq:editConfig/cq:listeners.

Answers (1)

Answers (1)

Avatar

Avatar
Establish
MVP
BrianKasingli
MVP

Likes

645 likes

Total Posts

606 posts

Correct reply

239 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Establish
MVP
BrianKasingli
MVP

Likes

645 likes

Total Posts

606 posts

Correct reply

239 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
BrianKasingli
MVP

17-06-2020

@pradeepdubey82 

Adding to @vanegi's response, the cq:listeners have a bit more properties than just afteredit, which you can try to see if it fits your needs:

beforedelete - The handler is triggered before the component is removed.
beforeedit - The handler is triggered before the component is edited.
beforecopy - The handler is triggered before the component is copied.
beforeinsert - The handler is triggered before the component is inserted.
beforechildinsert - The handler is triggered before the component is inserted.
Only operational for the touch-enabled UI.
beforemove - The handler is triggered before the component is moved.
afterdelete - The handler is triggered after the component is deleted.
afteredit - The handler is triggered after the component is edited.
aftercopy - The handler is triggered after the component is copied.
afterinsert - The handler is triggered after the component is inserted.
afterchildinsert - The handler is triggered after the component is inserted inside another component (containers only).
aftermove - The handler is triggered after the component is moved..

Values can be as:

REFRESH_SELF
REFRESH_PARENT
REFRESH_PAGE
REFRESH_INSERTED

 Reference: http://www.sgaemsolutions.com/2019/01/ootbcustom-cqlisteners-in-cqeditconfig.html