Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

cq 5.3 editorgrid

Avatar

Level 2

Hi,

Does anyone know how to create editorgrid in dialog? I have tried following this:

http://docs.adobe.com/docs/en/cq/5-3/widgets-api/index.html?class=CQ.Ext.grid.EditorGridPanel

but I am still missing some nodes and get errors in console. I don't know any example of correct structure for this.

 

I have found also description of creating a component by using CQ.Ext here:

https://helpx.adobe.com/experience-manager/using/creating-custom-cq-grid.html

but it is for cq 5.5. Was anyone trying it for 5.3?

 

Agnieszka

1 Accepted Solution

Avatar

Correct answer by
Level 10

Here is a communtiy article that works with that xtype:

Creating a custom CQ component that uses an editable dialog grid

Although tested on 5.5 - it should work on 5.3. You can modify the code so it appears in the dialog. 

That is - create a custom xtype and use the logic of the grid on that custom xtype (just a script).

To learn how to build custom xtypes and code against them - see this AEM article:

https://helpx.adobe.com/experience-manager/using/creating-aem-multifield-components.html

Now from this article - download and install the hero component. It will show you and the article will describe coding custom xtypes. Then extend the code to use the grid. Now you will have a grid in a component's dialog. 

View solution in original post

5 Replies

Avatar

Level 9

If apis exist there should not be any change in instructions. It should work for 5.3 as well.

Avatar

Level 2

Hi, thank you for answer. What I need is actually a grid in dialog and not in component on page. I would like to use xtype editorgrid but I can't configure it propertly. Do you or anyone have example of it?

Agnieszka

Avatar

Level 2

Maybe I will describe more in detail. I have created node with

jcr:primaryType: cq:Widget

name: ./grid

xtype: editorgrid

When I open component to edit, dialog doesn't appear and I get error:

TypeError: cm is undefined
for (var i = 0, len = cm.getColumnCount(); i < len; i++) {

so I added node under grid: colModel, I get another error now:

TypeError: cm.on is not a function
cm.on("configchange", this.onColConfigChange, this);

This object does not have events defined. It seems like it is not created properly. I tried to set some properties but didn't help.

Agnieszka

Avatar

Correct answer by
Level 10

Here is a communtiy article that works with that xtype:

Creating a custom CQ component that uses an editable dialog grid

Although tested on 5.5 - it should work on 5.3. You can modify the code so it appears in the dialog. 

That is - create a custom xtype and use the logic of the grid on that custom xtype (just a script).

To learn how to build custom xtypes and code against them - see this AEM article:

https://helpx.adobe.com/experience-manager/using/creating-aem-multifield-components.html

Now from this article - download and install the hero component. It will show you and the article will describe coding custom xtypes. Then extend the code to use the grid. Now you will have a grid in a component's dialog. 

Avatar

Level 2

Hi,

I know this article about custom cq grid but it doesn't solve my problem :( This grid is placed into component, and I need grid placed into dialog. Is there any possibility to create grid by using xtype in dialog without to much hassle?

Agnieszka