如何使用OpenSocial模板在社交应用程序中呈现从JSON接收的数据!

时间:2010-03-18 18:52:26

标签: templates opensocial json

我以JSON的形式在Social App中获取数据。我正在使用OpenSocial v0.9模板在应用程序中使用标记呈现数据,但问题是我想以表格形式呈现数据,但是它会连续重复项目,所以有可能![/ p>

此致 阿布舍克巴克

1 个答案:

答案 0 :(得分:0)

你看过< os:Repeat> 标签了吗?也许你可以这样做:

<script type="text/os-template" require="mytable">
    <table>
        <os:Repeat expression="${mytable.rows}">
            <tr>
                <td>${Cur.cell1}</td>
                <td>${Cur.cell2}</td>
            </tr>
        </os:Repeat>
    </table>
 </script>
相关问题