Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Populate List Box From XML

Avatar

Level 1

I have a table that is populated with data from a XML file.

There is a series of columns for each row which have buttons in them. When any one of the buttons is clicked I would like to re-populate a listbox further down the page with a series of options derived from the XML file that generated the table data.

Here is an example of what the XML looks like:

<table>

     <row>

          <column>

               <option>Col 1 Item 1</option>

               <option>Col 1 Item 2</option>

               <option>Col 1 Item 3</option>

          </column>

           <column>

               <option>Col 2 Item 1</option>

               <option>Col 2 Item 2</option>

               <option>Col 2 Item 3</option>

               <option>Col 2 Item 4</option>

          </column>

     </row>

</table>

Do I need to change the binding for the listbox dynamically using JavaScript? If so how?

Thanks!

1 Reply

Avatar

Former Community Member

You cannot change binding dynamically. If it needs to change you have will to read the Datadom and populate the DD yourself.

Paul