我是grails的新手,我想将html表'cart_table'(当前位于shoppingcart.gsp)中的内容写入_carttemplate.gsp并在另一个gsp中显示此表(如摘要.gsp)通过包含这个新模板。gsp模板中的渲染内容
目前我已经在shoppingcart.gsp定义的表如下:
<table id="newTable" style="display:none">
<thead><th>item name</th><th>desc</th><th>business justification</th><th>start date</th><th>end date</th></thead>
<tbody></tbody>
</table>
,我填充体,如下
$("#confirmbutton").click(function(){
var ntr='',//to store html for new table row
rows=[],//to collect new rows
$tbl=$("#table_rolecart tbody"),//original table
l=$("tr", $tbl).length;//length of rows in original table's tbody section
var row, brow, drow;
:
: /* getting rows from other tables */
}
$("#newTable tbody").append(rows.join(''));
如何把表到template.gsp?并在确认页面中如何显示表格?
这听起来很正确的,感谢您的帮助... – 2011-12-15 16:45:51