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

Table rows do not break into the next page if height exceeds the limit.

Avatar

Level 8

I have very puzzling issue. The expanding table with repeating rows do not break properly on the second page. On the first page, it breaks properly.

I noticed that if the row will exceed the allowed height, then there is truncation, and not only the current row is truncated, also, the next row becomes hidden. If I search for the text that is supposed to show, it is found, but not visible on the screen. It seems it is hidden by the boundaries of the page, not the content area.

I know how to use expanding tables, and how to control it. I used this feature many times. But, this case, I am not sure what is going on. It was developed by someone else, and the table is nested with multiple tables. I tried to play around with it, but no luck.

See image below for details.

I tried to use conditional breaks based on this logic:

"If the height of the row "row_mediumRiskRules2Cols" plus the "y" coordinate exceeds the height of the content area, then make a page break."

I noticed that the element coordinates are always "-1" at this time (conditional break script), so this method will not work.

I was able to get readings on the layout ready event, and I got the following:

xfa.layout.h(tbl_riskRules, 'in') = 9.135708333333334

xfa.layout.y(row_mediumRiskRules2Cols, 'in') = 0.2

xfa.layout.h(row_mediumRiskRules2Cols, 'in') = 12.085708333333333

I am not sure how to make use of this. Also, why the height of the main table "tbl_riskRules" is less than the height of the row "row_mediumRiskRules2Cols"?

Mind you that the repeating row (in the binding tab) is "tbl_riskRules.row_mediumRiskRules2Cols.tbl_mediumRiskRules2Cols.row".

How I can troubleshoot and fix this issue?

Tarek

Page Overflow Issue.png

1 Accepted Solution

Avatar

Correct answer by
Level 4

Truncation is allowed in the XFA spec, basically if there is no other option (i.e. the content doesn't fit and there is no other place to put it). I would imagine the content has gotten so big that it could not fit on even in the contentArea of a new page, thus truncating it where it was originally placed. I would trying allowing page breaks in all your subforms, to narrow down the issue

View solution in original post

2 Replies

Avatar

Correct answer by
Level 4

Truncation is allowed in the XFA spec, basically if there is no other option (i.e. the content doesn't fit and there is no other place to put it). I would imagine the content has gotten so big that it could not fit on even in the contentArea of a new page, thus truncating it where it was originally placed. I would trying allowing page breaks in all your subforms, to narrow down the issue

Avatar

Level 8

Many thanks altrue990​ ! Your reply makes a lot of sense.

I did a lot of research, applied your recommendation, and came to the following conclusion....

Most probably this issue happened because the table is being generated in the "Form Ready" Event of the page that has the table. I think this is causing the rendering engine to get confused. I remember that we are not supposed to change the layout in the form ready event, as this might cause repeated triggering of this event.

When I imported the data without using code to generate the table, all looked fine.

Tarek