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

Can any one explain in brief how the CQ5 report related components post the query to crx and renders the data .?

Avatar

Level 5
Level 5

Can any one explain in brief how the CQ5 report related components post the query to crx and renders the data in the report tabular format .?

1 Accepted Solution

Avatar

Correct answer by
Level 2

an example here ..

http://dev.day.com/docs/en/cq/current/developing/developing-reports.html#Creating%20Your%20Own%20Rep...

the example has outlined cq widgetscollection(nodes*) to define the query limiting the nodetype ( to  see the last line ..P:nodeTypes [String[]] = "sling:OsgiConfig")

            N:items [cq:WidgetCollection]
                N:props [cq:Panel]
                    N:items [cq:WidgetCollection]
                        N:title [cq:Widget]
                            P:path [String] = "/libs/cq/reporting/components/commons/title.infinity.json"
                            P:xtype [String] = "cqinclude"
                        N:description [cq:Widget]
                            P:path [String] = "/libs/cq/reporting/components/commons/description.infinity.json"
                            P:xtype [String] = "cqinclude"
                        N:rootPath [cq:Widget]
                            P:fieldLabel [String] = "Root path"
                            P:name [String] = "./report/rootPath"
                            P:xtype [String] = "pathfield"
                        N:processing [cq:Widget]
                            P:path [String] = "/libs/cq/reporting/components/commons/processing.infinity.json"
                            P:xtype [String] = "cqinclude"
                        N:scheduling [cq:Widget]
                            P:path [String] = "/libs/cq/reporting/components/commons/scheduling.infinity.json"
                            P:xtype [String] = "cqinclude"
        N:queryBuilder [nt:unstructured]
            P:nodeTypes [String[]] = "sling:OsgiConfig"

-Venu Gummadala

View solution in original post

2 Replies

Avatar

Level 2

Hi ,

I believe it is happening as the page is getting launched .. for e.g. have a look at the " diskusage " component located at /libs/cq/reporting/components/diskusage.

The /libs/cq/reporting/components/diskusage/diskusage.jsp is creating the table .. (look at the function updateUI) ..

in this case the whole query is  handled in jsp by traversing through the nodes .. you may not customize existing reports .. but choose to create one of your own ..

you may also write an scr component and implement your query logic in a java class instead of jsp ..

 

- Venu Gummadala

Avatar

Correct answer by
Level 2

an example here ..

http://dev.day.com/docs/en/cq/current/developing/developing-reports.html#Creating%20Your%20Own%20Rep...

the example has outlined cq widgetscollection(nodes*) to define the query limiting the nodetype ( to  see the last line ..P:nodeTypes [String[]] = "sling:OsgiConfig")

            N:items [cq:WidgetCollection]
                N:props [cq:Panel]
                    N:items [cq:WidgetCollection]
                        N:title [cq:Widget]
                            P:path [String] = "/libs/cq/reporting/components/commons/title.infinity.json"
                            P:xtype [String] = "cqinclude"
                        N:description [cq:Widget]
                            P:path [String] = "/libs/cq/reporting/components/commons/description.infinity.json"
                            P:xtype [String] = "cqinclude"
                        N:rootPath [cq:Widget]
                            P:fieldLabel [String] = "Root path"
                            P:name [String] = "./report/rootPath"
                            P:xtype [String] = "pathfield"
                        N:processing [cq:Widget]
                            P:path [String] = "/libs/cq/reporting/components/commons/processing.infinity.json"
                            P:xtype [String] = "cqinclude"
                        N:scheduling [cq:Widget]
                            P:path [String] = "/libs/cq/reporting/components/commons/scheduling.infinity.json"
                            P:xtype [String] = "cqinclude"
        N:queryBuilder [nt:unstructured]
            P:nodeTypes [String[]] = "sling:OsgiConfig"

-Venu Gummadala