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

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Multiple Custom component conflicting

Avatar

Level 2

I have created 2 custom components .

If I use them individual on different forms then i have no issues

The moment i add them to the same forms within tabs I get the following error

for the second component

Uncaught TypeError: Cannot read property 'abstractWidget' of undefined

   var widgetObj_sig = $.widget('xfaWidget.interfilesignatureWidget2', $.xfaWidget.abstractWidget, {

the xfaWidget  = undefined

I can trace that the first component

       works when it gets to

$.widget('xfaWidget.interfilebioWidget2', $.xfaWidget.abstractWidget, {}

and finds

xfaWidget.abstractWidget, {}

If I change the order then the second component can not reference xfaWidget

Not sure what i am doing wrong

2 Replies

Avatar

Employee Advisor

Can you share the component with us? You can upload it on the shared drive and message me the link.

Avatar

Level 2

I added bootstrap script to both component widget.jsp pages

<script src="/apps/clientlibs/jslibs/jquery-3.2.1.min.js"></script>

which caused the xfaWidget object to be reset

removed the scripts and then it worked.