How cq:WidgetCollection widget type works? | Community
Skip to main content
GK-007
Level 9
October 16, 2015
Solved

How cq:WidgetCollection widget type works?

  • October 16, 2015
  • 2 replies
  • 2409 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

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

2 replies

Sham_HC
Level 10
October 16, 2015

which source you find this example?

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 16, 2015

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