Skip to main content
GK-007
Level 9
October 16, 2015
Respondido

How cq:WidgetCollection widget type works?

  • October 16, 2015
  • 2 respostas
  • 2433 Visualizações

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

Este tópico foi fechado para respostas.
Melhor resposta por 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 Respostas

smacdonald2008
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

Sham_HC
Level 10
October 16, 2015

which source you find this example?