Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Dynamic table header/footer on multiple pages stay original


Level 1

hi experts,

i've got a form with a dynamic table. this means that i have a footerrow with mapped information if it should be visible or not. so the table can have from 1 to 40 columns.

i did some scripting in the table's initialize section:

loop over count of colums and set the headerrow, row1 and footerrow elements for index x to hidden.

everything works out fine BUT if the data spans over multiple pages the headerrow on pages 2 to last is original again. means that the hiding of cells is not effective any more. same with footerrow (but here its fine at last page and original at  page 1 to last -1).

i tried to hide cells again in layout:ready section for the other instances of the headerrow.

cells got hidden, but the still visible cells didnt relocate to the left (if i hide it, there should be no space between staying cells).

can anyone please give me a hint what i am missing here?

does anyone have a simple sample for this task? its all about the header/footer for multiple pages!

thanks a lot!


1 Reply


Former Community Member

When the footer goes to the 2nd page the page subform is incremented so you will have to reference the page subform as well. I suggest that you add a button (this is for a test only) to the footer subform and add the code app.alert(this.somExpression). Now render the form and make sure the footer stays on one page. Hit the button and take note of the someExpression. Now add enough rows to force the footer to a new page. Hit th ebutton again and take note of the changed somExpression. So to solve your problem you will have to find out which page your footer is on. and then construct your expression to incorporate this chane in expression. Note that the indexes are 0 based but the page numbering is 1 based.

Hope that helps