Component Reload

Avatar

Avatar
Validate 1
Level 3
sr508
Level 3

Likes

2 likes

Total Posts

51 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 10
Ignite 1
View profile

Avatar
Validate 1
Level 3
sr508
Level 3

Likes

2 likes

Total Posts

51 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 10
Ignite 1
View profile
sr508
Level 3

20-09-2018

Hi,

I need to reload my component when i edit . It should not reload the whole page.

If my page is having 10 components , if i edit a component in it, only that component should be reload.

Please Provide any links to refer this concept.

Replies

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

20-09-2018

When you edit a given component by opening its dialog, entering data and clicking dialog done button - the component is refreshed.

Avatar

Avatar
Validate 1
Level 3
sr508
Level 3

Likes

2 likes

Total Posts

51 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 10
Ignite 1
View profile

Avatar
Validate 1
Level 3
sr508
Level 3

Likes

2 likes

Total Posts

51 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 10
Ignite 1
View profile
sr508
Level 3

20-09-2018

Hi Scott,

I don't want the entire page to reload after submitting the dialog.

I have read a sling concept which will enable that particular edited component to reload but not the entire page.

Could you provide any such references?

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

20-09-2018

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,314 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,314 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

20-09-2018

Hi,

As Scott suggested REFRESH_SELF will help.

More info

AEM Components - The Basics

Other option you could be looking for along with edit

afterdeleteThe handler is triggered after the component is removed.REFRESH_SELF
aftereditThe handler is triggered after the component is edited.REFRESH_SELF
aftercopyThe handler is triggered after the component is copied.REFRESH_SELF
afterinsertThe handler is triggered after the component is inserted.REFRESH_INSERTED
aftermoveThe handler is triggered after the component is moved.REFRESH_SELFMOVED

Avatar

Avatar
Validate 1
Level 3
sr508
Level 3

Likes

2 likes

Total Posts

51 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 10
Ignite 1
View profile

Avatar
Validate 1
Level 3
sr508
Level 3

Likes

2 likes

Total Posts

51 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 10
Ignite 1
View profile
sr508
Level 3

20-09-2018

Thanks Scott and Arun for the posts, but is there anything that can be implemented at sling level for this kind of functionality?

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,314 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,314 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

20-09-2018

Hi,

What do you mean by component refresh at sling level. Sling render the content of the component in the page, do you want to alter that content? Can you please explain your use case?

Avatar

Avatar
Validate 1
Level 3
sr508
Level 3

Likes

2 likes

Total Posts

51 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 10
Ignite 1
View profile

Avatar
Validate 1
Level 3
sr508
Level 3

Likes

2 likes

Total Posts

51 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 10
Ignite 1
View profile
sr508
Level 3

20-09-2018

Hi Arun,

In normal scenario's when I edit the dialog and submit , the whole page will reload which means all the other components which are not edited will also load again which I didn't want  to happen.

I want only the particular component to load  again instead of whole page refresh.

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

20-09-2018

The thread i referenced states how to do what you want.