I am going to share my experience with different technologies. It helps me in expending my knowledge. I'll start from the basics & try to keep my posts easy to understand.Your comments/suggestions are welcome as they encourage me to search more on different topics.
Sunday, 8 February 2015
Image not visible on Dialog reopen in AEM
In this post, I am going to sort out a very interesting problem which is occured when we use image component as a tab in out custom component.
Most of time when we want to add a image tab into our component then we use these properties -
Using this properties we are able to add a new tab that provides you a drag & drop or upload a image functionality in your component. Some developers uses another approach to add a image tab in our component using xtype smatimage. Both of these approaches works fine for us but some time we face an issue with these component dialogs.
Problem Statement -
when we drop a image on this image tab & click on ok button, we are able to see this image as our component desired functionality, till now everything is working fine. Now when we reopen the dialog & open the image tab, image will not be displayed. i.e. when we reopen component dialog image tab it's not displayed here.
How to resolve this issue -
1). Check sling:resourceSuperType property on your component, it must be present.
2).sling:resourceSuperType property value must be foundation/components/page.
3). Open your component's .content.xml file and check <jcr:root> tag, here xmlns:sling must be present, for example in my case it is -