<div xmlns="http://www.w3.org/1999/xhtml" 
       xmlns:py="http://genshi.edgewall.org/"
       id="${id}" class="${css_class}">
    <script type="text/javascript">
    	var cmu = [
		<py:for each="i, col in enumerate(columns)">
            {
               header: "${col.title}",
               dataIndex: '${col.name}',
               dataType:'string'
            }<py:if test="(i+1) &lt; len(columns)">,</py:if>
		</py:for>];
		var data = [
		<py:for each="i, row in enumerate(value)">
            {
               <py:for each="i2, col in enumerate(columns)">
			   "${col.name}": "${col.get_field(row, displays_on='genshi')}"<py:if test="(i2+1) &lt; len(columns)">,</py:if>
			   </py:for>
            }<py:if test="(i+1) &lt; len(value)">,</py:if>
		</py:for>];
		window.addEvent('domready', function () {
			datagrid = new omniGrid('${id}', {
				columnModel: cmu,
				showHeader: true,
				alternaterows: true,
				sortHeader:true,
				resizeColumns:true,
				multipleSelection:true
			});
			datagrid.setData(data);
		});		
    </script>
</div>