Highlighted

Multiple Custom component conflicting

andrewm9979711

14-03-2019

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

Replies

Highlighted
Highlighted

andrewm9979711

22-03-2019

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.