AEM 6.1 : Custom plugin for dialog pathfield | Community
Skip to main content
New Participant
Jan 16, 2019 2:32 PM UTC
Solved

AEM 6.1 : Custom plugin for dialog pathfield

Hello,

We have a hard time for creating a custom plugin for a dialog pathfield.

The official documentation : CQ5 | Widgets API says that we can add plugins on pathfield

  • We try to code our custom plugin :

(function($) {

    var plugin = CQ.Ext.extend(CQ.Ext.emptyFn, {

        init: function(widget) {

            console.log('Hello Plugin');

        }

    });

    CQ.Ext.ComponentMgr.registerPlugin('customPlugin', plugin);

}($CQ));

  • We embed this plugin in clientLib of categories=[cq.wcm.edit]
  • We add our custom plugin on a pathfield

<normalUrl

                                jcr:primaryType="cq:Widget"

                                fieldDescription=""

                                fieldLabel="URL"

                                name="./normalUrl"

                                xtype="pathfield"

                                rootPath=""

                                plugins="customPlugin"

                                />

But it's not working, once we add the plugin the dialog doesn't work anaymore (no logs to investigate)

Is there a documentation for implementing a dialog plugin ?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

New Participant
Jan 17, 2019 8:54 PM UTC

smacdonald2008

Thanx for the blogs, this one Experiencing Adobe Experience Manager - Day CQ: AEM 62 - Classic UI extend Pathfield browse dialog to show file name (no… gives us the solution.

The clientLib must be of category cq.widgets and not cq.wcm.edit

Translate
smacdonald2008
Level 10
Jan 16, 2019 3:00 PM UTC

This is an older classic UI example. Most of the examples are based on Touch UI. I am searching to see if a few of our internal bloggers have covered this use case.

Translate