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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

AEM editContext is null

Avatar

Level 1

I have created a component and i want to add something in toolbar based on value given in edit dialog

when i came to page editContext is giving proper value

// value is a string that i am reading from edit dialog field if (editContext != null && editContext.getComponent() != null && value != null) { editContext.getEditConfig().getToolbar().add(new Toolbar.Label(value)); }

this code is written in jsp and if condition is true , but when i click on edit and change something in dialog my component got refreshed (not the whole page), now editContext is giving me null .If i refresh the page again it works fine

If i add listener to refresh parent or whole page after edit it works fine but i don't want to do that.

0 Replies