Expand my Community achievements bar.

SOLVED

How cq:WidgetCollection widget type works?

Avatar

Level 9

Hi All,

I am new to Using CQ widgets i tried to understand below snippet code but could not able to.Below code is responsible to create a dialog ,inside a dialog a panel with text boxes and corresponding labels.

CQ.wcm.DamAdmin.openForm=function(config,defaults){
   var createDialog={
       "jcr:primaryType":"cq:Dialog",
       "title":CQ.I18n.getMessage("Sample Dialog"),
       "id":CQ.Util.createId("cq-createfolderdialog"),
       "height":240,
       "params":{
           "_charset":"utf-8"
       },
        "items": {
            "jcr:primaryType":"cq:Panel",
            "items": {
                "jcr:primaryType":"cq:WidgetCollection",
                "label": {
                    "fieldLabel":CQ.I18n.getMessage("Property1"),
                    "fieldDescription":CQ.I18n.getMessage('It is a value of "property1"'),
                    "name":"label",
                    //"vtype":vtype
                },
                "title": {
                    "fieldLabel":CQ.I18n.getMessage("Property2"),
                    "fieldSubLabel":CQ.I18n.getMessage("Optional"),
                    "fieldDescription":CQ.I18n.getMessage('It is a value of "property2"'),
                    "name":"title"
                }
            }
        }
   };
   var dialog=CQ.WCM.getDialog(createDialog); 
   dialog.show();
};

Here i want to understand without creating xtype config objects for text and label,how these widgets have been created.Can someone explain how is done with minimum configurations.

Thanks,

Kishore

1 Accepted Solution

Avatar

Correct answer by
Level 10

See this article - it covers this topic and how to use it to build a CQ component dialog:

http://helpx.adobe.com/experience-manager/using/creating-aem-multifield-components.html

View solution in original post

2 Replies

Avatar

Level 10

which source you find this example?

Avatar

Correct answer by
Level 10

See this article - it covers this topic and how to use it to build a CQ component dialog:

http://helpx.adobe.com/experience-manager/using/creating-aem-multifield-components.html