Expand my Community achievements bar.

Using granite include to include json response of granite field types

Avatar

Level 3

Hello,

Is it possible to include json response(fields with labels and granite ui types) in touch ui dialog using /granite/ui/components/foundation/include?

In Extjs, using xtype=cqinclude with property path="/libs/foundation/components/form/defaults/items.infinity.json", the fields present under the node "items" are included in the component dialog. I tried similar approach using granite type(sling:resourceType) /granite/ui/components/foundation/include and property path="/libs/foundation/components/form/defaults/graniteitems.infinity.json". Node "graniteitems" has been added under which granite ui types are present. The JSON response returned contains fields of granite type, but is not working.

What must be the value for property resourceType?

Any inputs on this would be highly appreciated.

Thanks in advance.

Dialog structure:

<fields
    jcr:primaryType="nt:unstructured"    
    sling:resourceType="granite/ui/components/foundation/include"
    path="/libs/foundation/components/form/defaults/graniteitems.infinity.json"
    resourceType="" />

1 Reply

Avatar

Employee Advisor

 Check the following example node in AEM - http://localhost:4502/crx/de/index.jsp#/libs/wcm/foundation/components/page/cq%3Adialog/content/item...

 

Ref doc - http://docs.adobe.com/docs/en/aem/6-1/ref/granite-ui/api/jcr_root/libs/granite/ui/components/foundat...

Following should work if graniteitems is granite UI component node
<fields jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/include" path="foundation/components/form/defaults/graniteitems" />