Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

AEM 6.2 Widgets uncaught exception: cannot create Component: xtype 'undefined' not found and no default supplied

Avatar

Level 2

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');

                                                }

                                            });

                                        }

                                    }

                                }]

                            })

Screen Shot 2017-12-13 at 11.08.45 AM.png

Screen Shot 2017-12-13 at 11.23.01 AM.png

Appreciate your help on this.

0 Replies

Avatar

Level 10

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.