另一种方式是从Jquery + Struts2 jquery插件中充值+ Grid +

时间:2014-01-22 15:27:23

标签: jquery grid reload struts2-jquery-grid struts2-jquery-plugin

我有一个很好的代码...只需点击下面的按钮重新加载网格

                <s:url id="remoteurl" action="lisaluXCodYNom" namespace="/"/>
                <sjg:grid
                    id="gridtable"
                    dataType="json"
                    href="%{remoteurl}"
                    pager="true"
                    gridModel="clientes"
                    reloadTopics="reloadMyGrid"
                    rowList="10,15,20"
                    rowNum="5"
                    rownumbers="true"
                    formIds="mcp"
                    onCellSelectTopics="cellselect"
                    >
                    <sjg:gridColumn name="codcli" index="codcli" title="Codigo" sortable="false"/>
                    <sjg:gridColumn name="nomcom" index="nomcom" title="Alumno" sortable="false" width="300"/>
                    <sjg:gridColumn name="facultad.desfacres" index="desfacres" title="Facultad" sortable="false"/>
                    <sjg:gridColumn name="escuela.desesc" index="desesc" title="Escuela" sortable="false"/>
                </sjg:grid>


                <s:form id="mcp" action="lisaluXCodYNom" theme="simple">
                    <s:textfield name="cliente.codcli"/>
                    <s:textfield name="cliente.nomcom"/>
                    <sj:a 
                        button="true" 
                        onClickTopics="reloadMyGrid">
                        Search</sj:a>
                </s:form>   

现在......我想重新加载其他方式的网格。现在我想从javascript而不是按钮重新加载网格,从这里或像这样:

                $(document).on('change', 'select#combo2' , function() {
                    var valor = $(this).val();

                $.getJSON('lisaluXCodYNom.action?cliente.codcli='+valor, function(datos){
        -- What should I write here to have the same functionality as the button?

                    });
                });

0 个答案:

没有答案