<div xmlns:py="http://genshi.edgewall.org/">
<table py:attrs="w.attrs" ></table>
<div py:if="w.pager_id" id="${w.pager_id}" />
<script type="text/javascript">
$(document).ready(
    function(){
        var opts = ${w.options};
        var grid = $("#${w.attrs['id']}");
        grid.jqGrid(opts);
        if ( 'pager' in opts ) {
            opts['pager_selector'] = opts['pager'];
            opts['pager'] = $(opts['pager'])
            var pager_opts = ${w.pager_options}
            grid.navGrid('#'+opts['pager_selector'], pager_opts);
        }
    }
);
</script>
</div>
