Using the Granite include to include an individual item in a cq:dialog
We are currently on AEM 6.0, SP1 for what its worth.
I am setting up the cq:dialog's for each of my individual components. I figured out how to use the granite/ui/components/foundation/include to include multiple elements inside a dialog. After doing this, I thought about it some more and wondered if I can do the same thing to include a single granite component (a select with almost 40 options) in multiple dialogs. The answer to that is it includes it OK, but it does not seem to save the results out to the content repository. Based on the following code was wondering if anyone had any suggestions as to how to get it to save it's changes (again, for what it's worth, I make a change to the textbox that is inside the same tab and that does save any changes out to the repository).
!Dummy (hidden) component solely setup to store these kind of selects <?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" jcr:primaryType="nt:unstructured" jcr:title="Standard CQ Dialog" sling:resourceType="cq/gui/components/authoring/dialog"> <content jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/container"> <layout jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/layouts/tabs" type="nav"/> <items jcr:primaryType="nt:unstructured"> <icon jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/form/select" > <items jcr:primaryType="nt:unstructured"> <option LOTS OF THEM /> </items> </icon> </items> </content> </jcr:root>
Attempting to include the above select:
<callToActionIcon jcr:primaryType="nt:unstructured" fieldLabel="Icon" sling:resourceType="granite/ui/components/foundation/include" name="./callToActionIcon" path="/apps/global-web/components/content/standardCQDialog/cq:dialog/content/items/icon" resourceType="granite/ui/components/foundation/form/select" />
Thanks in advance!