Hi,
I have a need where i need to disable Activate and Deactivate and display other options in Sick kick bar. When that option is clicked in authoring mode in classic UI, it should display a form or panel with few text fields and a button. i have created a js in client lib of our application to achieve this but i am getting an exception as " Uncaught cannot create Component: xtype 'undefined' not found and no default supplied". I am trying to create form panel using below code. I used xtype as form, formpanel, panel but did not help.
CQ.Ext.create('CQ.Ext.form.FormPanel', {
title: 'Publish To Vendor',
width: 300,
//bodyPadding: 10,
//renderTo: CQ.Ext.getBody(),
//xtype:"formformpanel",
xtype: "panel",
layout: 'anchor',
defaults: { anchor: '100%'},
defaultType: 'textfield',
items: [{
xtype: "textfield",
name: "vendorname",
fieldLabel: "Vendor Name",
allowBlank: false // requires a non-empty value
}, {
xtype: "textfield",
name: "vendoremail",
fieldLabel: "Vendor Email",
allowBlank: "false" // requires value to be a valid email address format
}],
buttons: [{
text: 'Submit',
handler: function() {
// The getForm() method returns the Ext.form.Basic instance:
var form = this.up('form').getForm();
if (form.isValid()) {
// Submit the Ajax request and handle the response
form.submit({
success: function(form, action) {
Ext.Msg.alert('Success', action.result.message);
},
failure: function(form, action) {
Ext.Msg.alert('Failed', action.result ? action.result.message : 'No response');
}
});
}
}
}]
})
Appreciate your help on this.
Views
Replies
Total Likes
This means the Classic UI dialog is not picking up the type defined in the JS file. See this article - where we talk about this - Adobe Experience Manager Help | Creating your first Adobe Experience Manager custom xtype
Also - this is for 5.x - for AEM 6.1 and on - we do only TOuch UI (Granite) as that is the preferred way to write AEM components now.
Views
Replies
Total Likes