Expand my Community achievements bar.

SOLVED

XDP scripting not reflecting once the XPD is moved to AEM server

Avatar

Level 3

We have been noticing, some issues with XDP scripting/ repeating data binding when the files are uploaded to the AEM server.

They work fine in the AEM Designer. But if the XDPS are uploaded to AEM server and called using the Output or Forms service. 

The table looping scripts some times do not work.

 

Example 

If an XDP has 2 Pages and in each page there is a dynamic table data which gets data from the corresponding payload. Schema bindings are mapped to the data Column. 

In the first page there is  a table named Page1Table and it is a dynamic table with repeating rows that has the databinding as $.rowRepeats[*]  and then the corresponding column is mapped to  $.columnData in the databinding.

 

The same is done in the second page. That is in the second page there is a table named Page2Table and its rows are mapped to same $.rowRepeats[*]  and then the column value mapped to $.columnData.

 

That is the same mapping is used from the schema to both the table. If we attach a payload and test it out in Designer it shows the values perfectly. But when the XDP is in the AEM server. The data comes only in the first page but not in the second page. This usually happens with repeating data. Tried with javascripting also without using direct binding. The same issue is noted. 

 

Kindly if someone knows how to resolve, please let me know. Not sure if we have to reset the loop or if some setting has to be done in AEM server.

 

Any suggestions are helpful.

 

Thanks

Eshwari

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Repeating data binding doesn't work for two tables/subforms with the same data node.

 

What you can do, for the first table you can do repeat data binding to populate the table.

And for the second table, you need to populate the table with java script by traversing the data XML.

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Repeating data binding doesn't work for two tables/subforms with the same data node.

 

What you can do, for the first table you can do repeat data binding to populate the table.

And for the second table, you need to populate the table with java script by traversing the data XML.

Avatar

Level 3

Thank you. It is working with the scripting on the second table.