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.

Adding Rows and Data in Table Problem

Avatar

Former Community Member

I have a table that is needs to be populated with xml data.  The number of rows can change based on a selection in a drop down.  I can get the table to create the correct number of rows based on the node count from a text field that contains xml data.  Below is what I am trying to do.

1.  User selects a manager from a dropdown list.  The dropdown list is populated from a webservice and uses the manager's id# as an index value.

2.  Based on the selection in the dropdown, the manager id# is passed to an invisible text field and then a webservice is executed to get that selected manager's direct reports.  This result is passed as XML into another text field.

3.  Based on the node count of the direct reports xml data, I have a for loop that adds the appropriate number of rows to the table.

4.  Problem:  I can't get the data from the xml to populate the rows in the table.   Here is the code I am trying to use to poplate the rows in the table (this is done on the Exit of the dropdown list (see below).  I don't get any errors, just no data in the table.

Thank you in adavance!

John

5 Replies

Avatar

Former Community Member

Make sure that you click the Repeat Subform for each data item on the binding tab for the subforms that represent repeating rows. This will cause a [*] to be appended to the repeating nodes in the binding expression.

Paul

Avatar

Former Community Member

Paul,

I made the change but it's still not working.

Thanks,

John

Avatar

Former Community Member

I have verified that I am getting the desired data from the XML data but for some reason

it's not populating the field on the table.

Thanks,

John

Avatar

Former Community Member

Sorry I didn't see that the results were coming from another WS call. You will have to load the data into the Datadom then parse from there. The code can be a little complicated, if you send the form and some sample XML from the 2nd WS call I will see if I can get it to work for you.

You can send it to LiveCycle8@gmail.com

Include a brief descritpion of the issue please.

Paul

Avatar

Former Community Member

Paul,

Thank you again for your help. I have outlined your fix below.

Originally I was trying to do .addItem to the table, not thinking that it was used for added to a drop down or list.  What Paul found was that I should have been using .rawValue instead.  Once I tested tried it everything worked fine!

Paul saves the day again!

Thanks,

John