Dynamic detail table from external source with REST

I am trying to create a dynamic detail table with the table items coming from a datamapper and the table code from an external source in JSON. I have got it to display the table and it fills one row but it does not create more rows if there are more records in the detail table. This is de table code I am using.

<table class="table-grid" data-column-resize="" data-detail="item" id="table_items" style="width:100%;" title="item">
    <thead>
        <tr>
            <td class="ItemNumber">ItemNumber</td>
            <td class="ItemDescription">ItemDescription</td>
            <td class="ItemUnitPrice">ItemUnitPrice</td>
            <td class="ItemOrdered">ItemOrdered</td>
            <td class="ItemShipped">ItemShipped</td>
            <td class="ItemBackOrder">ItemBackOrder</td>
            <td class="ItemTotal">ItemTotal</td>
        </tr>
    </thead>
    <tbody>
        <tr data-repeat="">
            <td class="data ItemNumber">@I1@</td>
            <td class="data ItemDescription">@I2@</td>
            <td class="data ItemUnitPrice">@I3@</td>
            <td class="data ItemOrdered">@I4@</td>
            <td class="data ItemShipped">@I5@</td>
            <td class="data ItemBackOrder">@I6@</td>
            <td class="data ItemTotal">@I7@</td>
        </tr>
    </tbody>
</table>

Hi SvenSlijkoord,

Just from your DOM structure is really hard to know what is going bad with your table, can you take a screenshot of your “Data Model”, and another one of one of your item scripts?,

Best regards,

Juan

Hi,

This is the DataModel i’m using

These are the text scripts:

And this is the output the print template produces:

I am retrieving the content of the page in JSON from an external source. Then I append the content to the page. I think the problem has something to do with the designer processing tables before any other scripts, thus missing out on the newly added table. If I manually add a second row it does process the second item in de detail table but it will not create new rows.

Kind Regards,

Sven Slijkoord

Hi Sven Slijkoord,

Did you check on your html that your element table is like:

i cannot see on your html that you are not using your table_items id.

Best regards,

Juan

I am using the following code for the table:

<table class="table-grid" data-column-resize="" data-detail="item" id="table_items" style="width:100%;" title="item">

Hi Sven Slijkoord,

It seems that everything is ok on the screen shots, at this point to have a more understanding of your particular case and take a look in to your files, I suggest that you report your issue at http://planetpress.objectiflune.com/en/resources/support

Best Regards,

Juan

Hi Juan,

I think I have found the problem. Dynamic tables are only repeated if they are in the source or come from an internal snippet.
I have tried snippets located on my hard disk, snippets located on a network address, snippets located on a remote server, retrieving JSON from a web service, retrieving JSON from a web service via the Workflow and then passed to the designer but none seem to work.

Because I am an intern I cannot get in touch with support but I will check with my manager about contacting them with this issue.

Just thought to let everybody know who had the same problem.

Kind Regards,
Sven Slijkoord