easy ui怎么把table中的值提价到后台啊?

框架是Struts2,点击add,添加一行,然后我在后台定义了全局变量code,但是表单提交过去后,没有接到任何的值.
谁知道这是咋回事?

下面是原型demo,哪位大神帮我改下,改成能提交到后台的,因为我怀疑是我写的问题

 <!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Row Editing in DataGrid - jQuery EasyUI Demo</title>
    <link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="../../themes/icon.css">
    <link rel="stylesheet" type="text/css" href="../demo.css">
    <script type="text/javascript" src="../../jquery.min.js"></script>
    <script type="text/javascript" src="../../jquery.easyui.min.js"></script>
</head>
<body>
    <table id="dg" class="easyui-datagrid">   
    <thead>   
        <tr>   
            <th data-options="field:'code'">编码</th>   
            <th data-options="field:'name'">名称</th>   
            <th data-options="field:'price'">价格</th>   
        </tr>   
    </thead>   
    <tbody>   
        <tr>   
            <td>001</td><td>name1</td><td>2323</td>   
        </tr>   
        <tr>   
            <td>002</td><td>name2</td><td>4612</td>   
        </tr>   
    </tbody>   
</table>
<a class="easyui-linkbutton" onclick="add()">add</a>
<script type="text/javascript">
    function add(){
        $('#dg').datagrid('appendRow',{
            code:'003',
            name:'name3',
            price:'300'
        });
    }
</script>
</body>
</html>

关于easyui的使用,可参考 : http://git.oschina.net/wangkang/llsfw

希望能够帮到你.

http://blog.csdn.net/lishehe/article/details/16848497
http://ju.outofmemory.cn/entry/23873

设置个多选框,根据选中情况,利用easyui的方法提前所有选中的行,然后按需发请求给后台就行了