Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

AEM Livecycle Designer - Subform binding Issue

rakshashetty
Level 2
Level 2

Hi All,

 

We are using AEM Livecycle Designer 6.2.0 to build/bind XDP's . When we try to drop a subform[1] (which has repeating elements in the XML used for data connection) multiple times[2] on the same XDP we see that only the first instance of that subform(having all the repeating elements in the XML used for data connection) gets rendered not the rest of them[3].

 

[1]

Subform-structure.png

[2]

Subform-on-page.png

 

[3]

render-subform.png

Please let me know if anyone has faced this concern and if there is a way to mitigate this issue.

 

Thanks in advance!

 

Regards,

Raksha

1 Accepted Solution
Kosta_Prokopiu1
Correct answer by
Employee
Employee

This is default behavior. When you bind subforms to repeating sections the first instance of that subform (and its child objects) "consume" the data from the input XML. This is a one way. If you copy that subform with the exact same data bindings then the data has "run out".

Why do you place the same list several times in the same form? Do you want to get a copy of the first? If that is the intention then you must use scripting to transfer the values into the "copies".

 

If copying was not the intention then you may have a not so ideal XML data schema. Example:

<root>
  <sections>
    <section>1</section>
    <section>2</section>
    <section>3</section>
    <section>4</section>
    <section>5</section>
    <section>6</section>
    <section>7</section>
  </sections>
</root>

 

If you intend to have the first block 1..3 in the first subform and the rest in another then you must restructure your data as the first access consumes ALL section tags even if not shown.

<root>
  <sections1>
    <section>1</section>
    <section>2</section>
    <section>3</section>
  </sections1>
  <sections2>
    <section>4</section>
    <section>5</section>
    <section>6</section>
    <section>7</section>
  </sections2>

...
</root>

 

Bind the root of the subforms to either sections1 or sections2

View solution in original post

2 Replies
Kosta_Prokopiu1
Correct answer by
Employee
Employee

This is default behavior. When you bind subforms to repeating sections the first instance of that subform (and its child objects) "consume" the data from the input XML. This is a one way. If you copy that subform with the exact same data bindings then the data has "run out".

Why do you place the same list several times in the same form? Do you want to get a copy of the first? If that is the intention then you must use scripting to transfer the values into the "copies".

 

If copying was not the intention then you may have a not so ideal XML data schema. Example:

<root>
  <sections>
    <section>1</section>
    <section>2</section>
    <section>3</section>
    <section>4</section>
    <section>5</section>
    <section>6</section>
    <section>7</section>
  </sections>
</root>

 

If you intend to have the first block 1..3 in the first subform and the rest in another then you must restructure your data as the first access consumes ALL section tags even if not shown.

<root>
  <sections1>
    <section>1</section>
    <section>2</section>
    <section>3</section>
  </sections1>
  <sections2>
    <section>4</section>
    <section>5</section>
    <section>6</section>
    <section>7</section>
  </sections2>

...
</root>

 

Bind the root of the subforms to either sections1 or sections2

View solution in original post

rakshashetty
Level 2
Level 2
Thank you @Kosta_Prokopiu1 for providing this update . Our use case is the second one and we will look to update the XML schema .