When you define a custom xtype -- you are still using available xypes. For example - in the article -- notice we are programmatically defining this xtype (a drop down):
//DROP DOWN
this.linkType = new CQ.form.Selection({
type:"select",
cls:"customwidget-1",
listeners: {
selectionchanged: {
scope:this,
fn: this.updateHidden
}
},
optionsProvider: this.optionsProvider
});
What I am suggesting is in your JS code - you define this data type: CQ.Ext.form.RadioGroup. For information -- see:
http://dev.day.com/docs/en/cq/current/widgets-api/index.html?class=CQ.Ext.form.RadioGroup
Follow the article that develops the dialog that uses the custom xtype.In the CustomWidget.js, define a CQ.Ext.form.RadioGroup (instead of CQ.form.Selection) and define your buttons. You can use supported events and methods of a CQ.Ext.form.RadioGroup to drive the functionality that you want in your AEM component dialog. (See the reference docs in the above link.)
It is really powerful defining your own event handlers for your AEM dialog.
We are working on new articles and new code examples. We will be putting out a series of articles showing use of different xtypes and use cases.