aem

Export XML component from CRXDE Lite


In our source code, we have some dialog.xml files to represent the structure of our dialog components. We deploy the project via maven to our local CQ server for development and testing. There are times we need to modify the dialog component via CRXDE Lite (in the CQ server) because it's much faster to edit the dialog that way.

The problem is: How do I export (from CRXDE Lite) the edited dialog component back to it's corresponding dialog.xml file?


Solution

  • CRXDE Lite itself doesn't provide export-to-XML feature, but you can get your dialog.xml in a few different ways. Let's assume you want to get dialog for the /libs/foundation/components/text component:

    1. Sling GET servlet - quick & dirty

    Enter the dialog path to your browser and add .xml extension:

    http://localhost:4502/libs/foundation/components/text/dialog.xml
    

    2. VLT - recommended way

    Use VLT Tool which is a standard way to synchronize between JCR and local filesystem:

    vlt export http://localhost:4502/crx /libs/foundation/components/text my-export
    # cat my-export/jcr_root/libs/foundation/components/text/dialog.xml 
    

    3. Package manager

    Open /crx/packmgr/index.jsp and click Build on the package that contains the first version of dialog. It'll rebuild the package using current content. Download the package, unzip it and find appropriate dialog.xml file inside.