0

I have a requirement where I need to add a custom column in the Siteadmin console. There will a link in every row of the custom column. On click of the link it will take me to another page/popup where it will show some node properties of the selected page.

I was referring to the following document, but it is not working: Adding a Custom Column to the Site Admin Console.

The document says to write a bundle, but it does not say from where it will be called.

Please share your thoughts, how can I achieve this?

Regards, Satish

nateyolles
  • 1,851
  • 5
  • 17
  • 23
Satish
  • 59
  • 3
  • 14
  • Probably you can try http://experience-aem.blogspot.in/2013/12/aem-cq-56-adding-column-to-siteadmin-grid.html – apurvc Jul 02 '16 at 01:46

1 Answers1

0

Update after clarifying information:

Navigate to your overlayed siteadmin while bypassing the Vanity URL: http://localhost:4502/apps/wcm/core/content/siteadmin.html#/content/geometrixx. If you see the column here, it's an issue with the Vanity URL. Navigate to http://localhost:4502/crx/de/index.jsp#/apps/wcm/core/content/siteadmin and edit the sling:vanityOrder value to 310 or anything greater than 300. At this point you should see the new column at http://localhost:4502/siteadmin.

The demo package from Package Share failed to do this. By using the demo package and updating this value, I was able to make this work on AEM 5.6.1 and AEM 6.2.

Original post:

If you follow the instructions on the documentation page that you linked to, Customizing the Websites Administration Console, everything will work. There is even a full example already built for you that can be downloaded from Package Share - the link is at the bottom of the page.

To answer your question, you don't have to call your code, that will be handled by AEM for you as long as you follow the instructions and satisfy these four main points:

  1. Your class implements com.day.cq.commons.ListInfoProvider
  2. Your class is a service @Service(value = ListInfoProvider.class)
  3. Your service is active
  4. You implement the documented methods

Such as:

@Component(metatype = false)
@Service(value = ListInfoProvider.class)
public class StarredListInfoProvider implements ListInfoProvider {
    public void updateListGlobalInfo(SlingHttpServletRequest request, JSONObject info, Resource resource) throws JSONException {
    }

    public void updateListItemInfo(SlingHttpServletRequest request, JSONObject info, Resource resource) throws JSONException {
    }
}

When your service becomes active it will be available to AEM. Verify the status of the service at your Apache Felix Components Console at http://localhost:4502/system/console/components.

Within AEM's core is a service that references the ListInfoProvider interface. AEM is using the @Reference SCR Annotation to bind OSGi services just like you do in your own services. See the Apache Felix SCR Annotations @Reference documentation. The reference in AEM's service defines multiple cardinality meaning that it will bind multiple services, meaning that you can define multiple new columns in the Siteadmin console.

The bottom line is AEM is taking advantage of Apache Felix to bind a reference to your service when it becomes available. It knows how to do that because you've implemented the interface that AEM is watching for. Once your service is active, you don't need to call or run anything.

nateyolles
  • 1,851
  • 5
  • 17
  • 23
  • I've notified the package share team about the bug in the demo package. They will find the owner and get the package updated. – nateyolles Jul 01 '16 at 23:18