Dear All,
Dear All,
We have developed the multi field in CQ 5.6 and it is working fine in 5.6 . After migration to 6.4 it is not working.
Also ion developer tools I am getting the below error when I am clicking in Add Item sign.
widgets.js:112872 Uncaught TypeError: Cannot read property 'toString' of undefined
at constructor.setOptions (widgets.js:112872)
at new constructor (widgets.js:113410)
at Object.create (widgets.js:25846)
at sb.createComponent (widgets.js:30472)
at sb.lookupComponent (widgets.js:30460)
at sb.add (widgets.js:30266)
at sb.<anonymous> (widgets.js:30262)
at Object.each (widgets.js:1824)
at sb.add (widgets.js:30261)
at sb.initComponent (widgets.js:30152)
1) In 5.6 When we click on Add Item , it is coming fine , as shown below.
Below is the dialog and the multi field value is created by using JavaScript , as shown below.
var sunitaSiteClientLib = sunitaSiteClientLib || {};
if(typeof CQ !== 'undefined')
{
sunitaSiteClientLib.MultiFieldPanel = CQ.Ext.extend(CQ.Ext.Panel, {
panelValue: '',
onstructor: function(config){
config = config || {};
sunitaSiteClientLib.MultiFieldPanel.superclass.constructor.call(this, config);
},
initComponent: function () {
sunitaSiteClientLib.MultiFieldPanel.superclass.initComponent.call(this);
this.panelValue = new CQ.Ext.form.Hidden({
name: this.name
});
this.add(this.panelValue);
var dialog = this.findParentByType('dialog');
dialog.on('beforesubmit', function(){
var value = this.getValue();
if(value){
this.panelValue.setValue(value);
}
},this);
},
getValue: function () {
var pData = {};
this.items.each(function(i){
if(i.xtype === "label" || i.xtype === "hidden" || !i.hasOwnProperty("dName")){
return;
}
pData[i.dName] = i.getValue();
});
return $.isEmptyObject(pData) ? "" : JSON.stringify(pData);
},
setValue: function (value) {
this.panelValue.setValue(value);
var pData = JSON.parse(value);
this.items.each(function(i){
if(i.xtype === "label" || i.xtype === "hidden" || !i.hasOwnProperty("dName")){
return;
}
if(!pData[i.dName]){
return;
}
i.setValue(pData[i.dName]);
});
},
validate: function(){
return true;
},
getName: function(){
return this.name;
}
});
CQ.Ext.reg("sunitamultifieldpanel", sunitaSiteClientLib.MultiFieldPanel);
}
2) In 6.4 , When we click on Add Item , it is not coming anything.
Views
Replies
Total Likes
In AEM 6.4 - most community members are working in Touch UI and not in Classic UI. Lets see if ppl answer this, but you should look at using AEM 6.4 features and move past Classic UI. I recommend that you move to granite/coral resource types -- Building Experience Manager Components using Granite/Coral Resource Types
Views
Replies
Total Likes
Hi,
As AEM 6.4 is very advanced version and its built on granite framework, AEM 5.6 classic UI components may not work pm 6.4.
Some components needs to be updated to Touch UI and multifield is very main component. Its recommended that you use granite as Scott suggests.
Thanks,
Ratna Kumar.
Views
Replies
Total Likes