kendoui php,kendoui,json_kendoui treelist error Request failed!,kendoui,json,ajax - phpStudy
kendoui treelist error Request failed!
备注:
treelist初始化代码中url地址写的是本地的json数据:
read: {
url:"json/userTest.json"
}
请求类型都是用“post”
chrome控制台看到的userTest.json数据返回值如下:
现在的问题是json数据请求成功了,控制台并没有报错。这是json数据的问题还是别的什么原因?
附上json文件:
[{"id":1,"EmployeeId":0001,"ReportsTo":80010001,"FirstName":"zhang","LastName":"San","HireDate":"2016-02-08 20:08:08","Phone":"huawei","HireDate":"2015-08-09 11:11:11","BirthDate":"1968-01-09 02:19:02","Extension":"1123223123","Position":"上边"},
{"id":1,"EmployeeId":0001,"ReportsTo":80010001,"FirstName":"zhang","LastName":"San","HireDate":"2016-02-08 20:08:08","Phone":"huawei","HireDate":"2015-08-09 11:11:11","BirthDate":"1968-01-09 02:19:02","Extension":"1123223123","Position":"上边"},
{"id":1,"EmployeeId":0001,"ReportsTo":80010001,"FirstName":"zhang","LastName":"San","HireDate":"2016-02-08 20:08:08","Phone":"huawei","HireDate":"2015-08-09 11:11:11","BirthDate":"1968-01-09 02:19:02","Extension":"1123223123","Position":"上边"}]
kendoui-treelist-初始化代码如下:
$(document).ready(function () {
var crudServiceBaseUrl = "",
dataSource = new kendo.data.TreeListDataSource({
transport: {
read: {
url:"json/userTest.json"
},
update: {
url: "index/test/update",
type: "POST",
},
destroy: {
url: "index/test/del",
type: "POST",
},
create: {
url: "index/test/add",
type: "POST",
},
parameterMap: function(options, operation) {
if (operation !== "read" && options.models) {
// return {models: kendo.stringify(options.models)};
console.info(options.models[0]);
return options.models[0];
}else{
var parameter = {
page: options.page,
pageSize: options.pageSize,
};
console.info(kendo.stringify(parameter));
return parameter;
}
}
},
batch: true,
pageSize: 20,
serverPaging:true,
schema: {
model: {
id:"id",
parentId:"ReportsTo",
fields: {
EmployeeId: { type: "number", editable: false, nullable: false },
ReportsTo: { nullable: true, type: "number" },
FirstName: { validation: { required: true } },
LastName: { validation: { required: true } },
HireDate: { type: "date" },
Phone: { type: "string" },
HireDate: { type: "date" },
BirthDate: { type: "date" },
Extension: { type: "number", validation: { min: 0, required: true } },
Position: { type: "string" }
},
expanded: true
}
}
});
$("#toolbar").kendoToolBar({
items: [
{ name:"create",type: "button", text: "新增", overflow: "never",click: buttonClickHandler },]
});
$("#treelist").kendoTreeList({
dataSource: dataSource,
editable: "inline",
height: 540,
columns: [
{ field: "FirstName", expandable: true, title: "First Name", width: 220 },
{ field: "LastName", title: "Last Name", width: 100 },
{ field: "Position" },
{ field: "HireDate", title: "Hire Date", format: "{0:MMMM d, yyyy}" },
{ field: "Phone", title: "Phone" },
{ field: "Extension", title: "Ext", format: "{0:#}" },
{ title: "Edit", command: [ "edit", "destroy" ], width: 250,
attributes: {
style: "text-align: center;"
}
}
]
});
});
相关阅读:
css请求阻塞网页加载,如何找到请求源。
华为cmpp2.0开发包开发短信
StackEdit 的项目上为什么缺少 MathJax.js
求一个日历效果
有哪些Linux发行版的思想很奇特
CSS Sprites虽然增加了图片的字节,但是很好地减少网页的http请求,从而大大的提高页面的性能
新版firefox下css设置overflow出现的问题?
SF的消息系统怎么设计的
如何动态修改directive templateUrl的值
flask项目部署到SAE的时候静态文件都404
服务器与内网节点的端口映射
编程菜鸟如何规划自己的编程学习之路?
浏览器发送了两次请求给服务器,服务器只返回后一次请求的内容
qq浏览器里的微信调试工具的服务器端调试有人用过吗?
如何获取自定义meta标签信息?
重写init方法后,属性声明后为什么不为nil?
js 怎么实现调用本地录音设备,实现在线录音功能
markdown语言中如何添加背景图片?
win8.1远程桌面连接win2008 server时报错“由于协议错误, 会话将被中断,请重新连接到远程计算机”
pandas如何将生日按星座分组
kendoui php,kendoui,json_kendoui treelist error Request failed!,kendoui,json,ajax - phpStudy相关推荐
- axios请求报Uncaught (in promise) Error: Request failed with status code 404
使用axios处理请求时,出现的问题解决 当url是远程接口链接时,会报404的错误: Uncaught (in promise) Error: Request failed with status ...
- ERROR Request failed with status code 404 :at createError (node_modules\axios\lib\core\createError.
npm run dev运行vue项目时出现ERROR Request failed with status code 404 排查baseurl是否有误-->无误 排查后端程序是否有误--&g ...
- axios请求415错误Uncaught (in promise) Error: Request failed with status code 415
Uncaught (in promise) Error: Request failed with status code 415 错误如下图 前端代码(vue): var data = {userna ...
- Error: Request failed with status code 429
出现 Error: Request failed with status code 429错误的原因 请求的次数过多 导致在某个循环中运行上面的代码行,导致Axios同时触发所有请求. 解决方法通过等 ...
- proxy代理报错: Uncaught (in promise) Error: Request failed with status code 500
POST http://localhost:8013/check/login 500 (Internal Server Error) createError.js:16 Uncaught (in pr ...
- 社区版IDEA创建SpringBoot项目及报错Error: Request failed with status code 404解决
社区版IDEA创建SpringBoot项目 IDEA创建由于社区版没有创建SpringBoot的工具,我们一般使用插件进行创建 搜索插件spring assistant 进行下载 下载后我们进行项目创 ...
- Flask werkzeug.exceptions.BadRequest: 400 Bad Request: Failed to decode JSON object: None
今天在部署flask服务的时候发现了下面的问题: param = dict(args=request.args, post=request.json)File "/root/anaconda ...
- 为subclipse配置http代理,解决“RA layer request failed, Unable to connect to a repository at URL ... 错误
工作环境是通过http代理连接上网的,安装subclipse检出某公共代码仓库时报:RA layer request failed svn: Unable to connect to a reposi ...
- Uncaught (in promise) Error: Request failed with status code 500
分享一些状态码400 404 500等原因: 出错: 前端: // 获取所有的导航菜单async getMenuList(){const {data:res} = await this.$http.g ...
最新文章
- 【实习】京东搜索相关性算法部门
- java安全地生成128,256,512bit随机数
- altium designer PCB把板子翻过来看
- xp系统怎么连接云服务器,xp系统怎么连接云服务器
- DeepLearning:pydot安装的使用和安装
- 熊猫烧香演神话——在Windows mobile手机中运行
- leaflet调用mysql_Leaflet地图框架使用手册——L.Path
- 中英文字体名字对应表
- 大学四年, 专业心得
- HDU 4407 Sum(容斥原理+状态压缩)
- mysql怎么连接数据连接池_Mysql数据库连接池
- 计算机四级网络工程师(计算机网络单选)- 知识点
- dqo变换_基于dqO变换的电压暂降检测方法研究
- cr3格式是什么意思_佳能rp的cr3如何打开?修图为什么要用raw格式?转码又是什么?...
- 【iOS越狱开发】iOS越狱步骤1之环境搭建
- 弹弹堂弹道模拟程序——第一帖
- AbstractApplicationContext#refresh
- 挂号信经过几次签收最终送达收件人?
- Java算法:华为机试算法(下),华为算法Java版,牛客网华为算法73~108题
- Mac 安装depot_tools