Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vue.js/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
jqgrid-导航器编辑_Jqgrid_Edit_Navigator - Fatal编程技术网

jqgrid-导航器编辑

jqgrid-导航器编辑,jqgrid,edit,navigator,Jqgrid,Edit,Navigator,我正在尝试使用navigator在jqgrid中编辑一条记录(尝试调用服务器)。然而,当我点击提交时,我得到了错误状态:“未找到”。错误代码:404 这是密码 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <%@ taglib uri="http://java.sun.com/jsp/jstl/core"

我正在尝试使用navigator在jqgrid中编辑一条记录(尝试调用服务器)。然而,当我点击提交时,我得到了错误状态:“未找到”。错误代码:404

这是密码

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<c:url value="/main/csList" var="csListUrl"/>
<c:url value="/main/editVevaIndividual" var="editUrl"/>
<c:url value="/main/hostListByApp" var="hostListUrl"/>
<c:url value="/users/create" var="addUrl"/>
<c:url value="/users/update" var="editUrl"/>
<c:url value="/users/delete" var="deleteUrl"/>
<html>
<head>
    <title>Individual Records </title>
    <!--  
<script src="/sam/resources/jqueryMenu/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="/sam/resources/jqueryMenu/createMenu.js" type="text/javascript"></script>
<link rel="stylesheet" href="/sam/resources/jqueryMenu/menu.css"/>
-->
<script type='text/javascript' src='<c:url value="/resources/jqueryMenu/jquery-1.3.2.min.js"/>'></script>
<script src= '<c:url value="/resources/jqueryMenu/createMenu.js"/>'></script>
<link rel="stylesheet" href= '<c:url value="/resources/jqueryMenu/menu.css"/>'/>

<script>
$(document).ready(function(){  
    createMenu($("#content"));
});
</script>

   <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/themes/redmond/jquery-ui.css" />
    <link rel="stylesheet" type="text/css" href='<c:url value="/resources/ui.jqgrid.css"/>' />
    <script type="text/javascript" src= "http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
    <script type="text/javascript" src= "http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
    <script type="text/javascript" src= '<c:url value="/resources/grid.locale-en.js"/>'></script>


    <script type="text/javascript">
        $.jgrid.no_legacy_api = true;
        $.jgrid.useJSON = true;
    </script>
<script type="text/javascript" src='<c:url value="/resources/jquery.jqGrid.src.js"/>'></script>

    <script type="text/javascript">
 //<![CDATA[
        $(document).ready(function () {
            var mydata = [
                 ],
                grid = $("#list");

            grid.jqGrid({
               url:'${csListUrl}',
                datatype: 'json',
                ignoreCase: true,
                mtype: 'GET',
                colNames:['INDIVIDUAL ID','LAST NAME','FIRST NAME','VENDOR ID','INACTIVE REASON  CODE','INACTIVE DATE'],
            colModel:[
                    {name:'individualId',index:'individualId', width:50 },
                    {name:'lastName',index:'lastName', width:50,editable:true, editrules:{required:true}, editoptions:{size:10} },
                    {name:'firstName',index:'firstName', width:50,editable:true, editrules:{required:true}, editoptions:{size:10} },
                    {name:'vendorID',index:'vendorID', width:30,} ,
                    {name:'inactiveReasonCode',index:'inactiveReasonCode', width:30} ,
                    {name:'inactiveDate',index:'inactiveDate', width:30} 
            ],
                postData: {},
                rowNum:10,
                rowList:[10,20,40,60],
                height: 'auto',
                autowidth: true,
                rownumbers: true,
                pager: '#pager',
                sortname: 'individualId',
                viewrecords: true,
                sortorder: "asc",
                editurl:'${editUrl}',
                caption:" individual Records",
                emptyrecords: "Empty records",
                loadonce: true,
                loadComplete: function() {},
                jsonReader : {
                    root: "rows",
                    page: "page",
                    total: "total",
                    records: "records",
                    repeatitems: false,
                    cell: "cell",
                    id: "individualId"
                }

    });


            $("#search").click(function() {
                var searchFiler = $("#filter").val(), f;

                if (searchFiler.length === 0) {
                    grid[0].p.search = false;
                    $.extend(grid[0].p.postData,{filters:""});
                }
                f = {groupOp:"OR",rules:[]};
                f.rules.push({field:"lastName",op:"cn",data:searchFiler});
                f.rules.push({field:"firstName",op:"cn",data:searchFiler});
                grid[0].p.search = true;
                $.extend(grid[0].p.postData,{filters:JSON.stringify(f)});
                grid.trigger("reloadGrid",[{page:1,current:true}]);
            });

            grid.jqGrid('navGrid','#pager',
                    {edit:true, add:false, del:false,refresh:true,view:true},
                    {}, {}, {}, 
                    {   // search
                        sopt:['cn', 'eq', 'ne', 'lt', 'gt', 'bw', 'ew'],
                        closeOnEscape: true, 
                        multipleSearch: true, 
                        closeAfterSearch: true
                    },
                    {   // vew options
                        beforeShowForm: function(form) {
                            $("tr#trv_id",form[0]).show();
                        },
                        afterclickPgButtons: function(whichbutton, form, rowid) {
                            $("tr#trv_id",form[0]).show();
                        }
                    });



        });
    //]]>
    </script>





 </head>
<body>

<div style="position:relative; z-index:3;" id="content"></div>

<br></br>

    <fieldset >
        <input type="text" id="filter"/>
        <button type="button" id="search">Search</button>
    </fieldset>

  <div style="position:relative; z-index:1;">
        <table id="list"><tr><td></td></tr></table>
        <div  id="pager"></div>
    </div>


</body>
</html>

个人记录
$(文档).ready(函数(){
创建菜单($(“#内容”);
});
$.jgrid.no_legacy_api=true;
$.jgrid.useJSON=true;
//


搜寻
您是否验证了HTTP POST上的
'${editUrl}'
(请参阅
editUrl
)答案?您可以使用、Firebug或开发人员工具验证jqGrid是否将数据发布到
'${editUrl}'
。谢谢。editUrl没有指向正确的url。我很高兴能帮助您。不客气!