How to find custom xtype js in adobe cq5?

1.2k Views Asked by At

Is there any way through which we get the path of our custom xtype js if we know the value of js. Suppose my xtype is urlwithlinkand i want to know where its js resides. just like if we know the client library name we get its path using this link http://localhost:4504/libs/granite/ui/content/dumplibs.html is there any similar way to find out the path of custom xtype js ?

2

There are 2 best solutions below

1
Tomek Rękawek On

Widgets are registered with their xtype using ExtJS API, eg.:

CQ.Ext.reg("richtext", CQ.form.RichText);

The only way to find out the mapping between a JS file in the JCR repository and its xtype is to perform a full-text search. I don't think it's possible to define a precise XPath/SQL2 query that finds something in the binary resources.

If you have the source code of the custom widgets, just use your IDE to find the appropriate CQ.Ext.reg invocation.

If you don't have the source code and the widget is available only on the instance, create a CQ package including the ExtJS source (for the standard CQ widgets it's /libs/cq/ui), unzip it and browse the contents, looking for the aforementioned CQ.Ext.reg("your_xtype" string.

0
user2142786 On

using a SQL2 query we can find the file. Example if my xtype name is urlwithlabel then the SQL2 query will be SELECT * FROM [nt:base] AS s WHERE CONTAINS(s.*, 'urlwithlabel').