Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Pagination Woes

Avatar

Level 2

Hi all,

I have a multi-page (non-flowing) form with two different Master Pages (not sure if it's important for this exercise). I have set all pages to place On Page "FORM" or On Page "CONTENT" dependant on design of the form and set after  to "Continue Filling Parent". See attached Image:

paginate.jpg

I have these settings throughout my form and it works everywhere but one location. It grabs the subform and places it directly following the previous subform... on the previous page, in the margin, and not visible beyond the title. See attached image:

page2.jpg

I have set Page 2 to "Top of Next Page" and this works temporarily, it fails when the previous page (Page 1) is hidden based on the form settings. This causes a blank page to be created.

Any suggestions are appreciated.

Thanks,

Andrew

edit: Image re-uploaded

6 Replies

Avatar

Level 5

Not sure tbh, but maybe make sure all the subforms you have designed dont overflow the content area of the master pages. Also do you have any other subforms which could be affect the layout at all? If you could maybe upload/publish a sample form some place, might be able to find something, but the pagination settings you have look ok atm.

Avatar

Level 2

Well I went through the form and every subform matches the content area of each masterpage exactly. None are over or under. As for the sizing of subforms and/or items are all within the the physical space set by the masterpage and page subform.

PM sent.

I did notice a strange occurrence where in the pagination tab the "Keep With [ ] Previous [ ] Next" options are greyed out on some pages/subforms but not others. It is inconsistent based on masterpage or even/odd pages. Would whatever is causing the greying out/in possibly contribute to the pagination issue that I am having?


Avatar

Level 10

Hi,

The issue is that while you are hiding page1 at runtime, the first Master Page (FORM) has to be rendered, but without any content.

I would recommend that you set the pagination for all design pages to Follow Previous and Continue Filling Parent. Also untick the Keep checkboxes.

Then for the FORM master page, restrict its occurrence to a Max of 1 in the Master Page palette.

Hope that helps,

Niall

Avatar

Level 5

I hope I can explain this one clearly enough but essentially Niall is correct in that the main cause is that your hiding the first page when you hide the INTERNAL_ONLY and LOI. On the first page, you cannot have a Top of Page "Form" selected since it would immediately do a page break since a Top command inserts a startNew attribute into the xdp, so the first page has to not include any of the Top options. However since you are using placement in the rest of the form, you do need Top of Page "Form" for your DTIApp_PG1 since it is following on from LOI which also uses "FORM". So you basically need to tell it to break.

It is quite a large form and it probably would take some effort to rework all those pages so maybe you can try a workaround for this. Set your DTIApp_PG1 to Top of Page "FORM" and in the click event of Hide INTERNAL on the first page check to see if DTIApp_PG1 will be the first page and remove the page break as follows:

if ( LOI_PG1.presence != "visible" && LOI_PG2.presence != "visible" )

{

     this.resolveNode("DTIApp_PG1.#breakBefore").startNew = "0";

}


INTERNAL_ONLY.presence = "hidden";
OA_CALC.presence = "hidden";
RED_CALC.presence = "hidden";

Depending on logic elsewhere (if the page is no longer first) you may need to set it back to the original value of 1

Avatar

Level 2

I tried the proposed code with mixed results.

After a couple of days troubleshooting this problem I had to step away for a while. When I came back I thought to review the XML code to see if there was anything that popped out at me. Sure enough there was a strange container in the XML code:

     <subform h="0.001mm" w="50mm" name="LOIb" y="239.713mm" x="65.088mm">
        <keep previous="contentArea"/>
        <break after="contentArea"/>

Visible in the Hierarchy:

3-17-2012 2-40-59 PM.jpg

Turns out, this empty subform was the root of all my pagination errors. Once deleted all the page subform locations were in their correct place and acted as it should regardless of the forms hide/show settings.

Thank you dohanlon & niall for your time and suggestions.

Avatar

Level 10

Hi, I'll have a look at the pagination settings tomorrow. Niall