Demo:

Simple FAQ Component Demo
High Level Overview on creating this custom component:
- In CRXDE, create a new component (cq:Component) of FAQ. Set the following properties:
- Create a cq:Dialog with the following structure:
- The faqEntries [cq:Widget] node would be using xtype of the Multi Composite Fields.
- Inside the fieldConfigs [cq:WidgetCollection] node, create the necessary fields to capture the question and answer pair. For example:
- Specify the appropriate listeners to refresh the page so that modification to the FAQ component would trigger (or re-trigger) the jQueryUI Accordion.
- Modify the component JSP file so that the generated markup of question-answer pairs would fulfill jQueryUI’s markup requirement.
- Finally, create a cq:ClientLibraryFolder for the FAQ Component. It should contain a javascript file to render the Accordion.
Sample of the component:

How do you register the Multi Composite Field? What version is it available? I’ve never found it in 5.4, though it was mentioned in the release.
Hello Matthew. The widget is not part of the 5.4 release. The Multi composite field widget is essentially an extension to the CQ.form.CompositeField widget. And to register, you should have something similar to the following:
CQ.Ext.reg(“multicompositefield”, CQ.form.MultiCompositeField);
Is it possible that we can have your demo code to port into our site for a test?
Sure Pao,
I’ll email you separately. Thanks.
Oliver,
I have installed your package and created our own multicompositefield extends the CQ compositefield. Everything seems to work fine except when I click the delete button to remove a Question/Answer pair, the content was removed from the dialog box. But when click on the OK button of the dialog box, I got js error of “this.el.dom is undefined in this.el.dom.value = html”. I have been spending hours try to debug this issue and still no luck. Do you have any idea of what might went wrong. By the way, I tried the above code in CQ5.4 and CQ5.5 and all get the same error. Below is the delete button js code in the multicompositefield.js:
items.push({
xtype: “panel”,
border: false,
items: {
xtype: “button”,
cls: “cq-multifield-btn”,
text: “-”,
handler: function() {
item.ownerCt.remove(item);
}
}
});
Thank you for your help on this. If you need to whole js code I can send to you via email if you wish to take a look.
Can u please send me the MultiCompositeField.js
Good work !!
Can you please send me your demo code for a test?