2012-11-24 3 views
0

그리드에 레코드를 추가 할 때 POST를 사용하여 "create"URL이 히트되지만 httpd 로그를 체크인하면 POST 매개 변수가 비어 있습니다. 궁금KendoUI Grid/Datasource. "create", 빈 POST 요청, 매개 변수 없음

$(function() { 
      $("#grid").kendoGrid({ 
       dataSource: { 
        transport:{ 
         read:"libyMsg.php?way=getUsrMsgList", 
         create:{ 
          url :"libyMsg.php?way=createMsg", 
          type:"POST" 
         }, 
         update:{ 
          url :"libyMsg.php?way=updateeMsg", 
          type:"POST" 
         }, 
         destroy:{ 
          url :"libyMsg.php?way=destroyMsg", 
          type:"POST" 
         } 
        }, 
        batch: true, 
        pageSize: 10, 
        schema: { 
         data: "data", 
         model: { 
          id: "msg_id", 
          fields: { 
           msg_id: { editable: false, nullable: true }, 
           msg_title: { validation: { required: true } }, 
           msg_content: { validation: { required: true } }, 
           msg_type: { type: "number", validation: { min: 0, required: true }}, 
           msg_date: { type: "date", validation: { required: true } }, 
           msg_status: { type: "number", validation: { min: 0, required: true } } 
          } 
         } 
        } 
       }, 
       columns: [{ field: "msg_id", width: 40,title: "ID" }, 
        { field: "msg_title",width: 230, title: "Title" }, 
        { field: "msg_content", width: 370,title: "Content" }, 
        { field: "msg_type", width: 40,title: "Type" }, 
        { field: "msg_date", width: 300,title: "Date" }, 
        { field: "msg_status", width: 40,title: "Status" }], 
       scrollable: true, 
       sortable: true, 
       editable:"popup", 
       pageable: { 
        refresh: true, 
        pageSizes: true 
       }, 
       toolbar: ["create", "save", "cancel"], 
      }); 
     }); 

왜, 내가 새 레코드를 추가 할 때, 그것은 실제로 POST를하지만 매개 변수 withouht :

이 내 그리드 & 데이터 소스 정의입니다.
아이디어가 있으십니까? Thanx/M

답변

1

안녕하세요. 붙여 넣은 코드가 잘 작동하고 있습니다. Here은 그것을 증명하는 JsBin입니다. 저는 브라우저의 네트워크 탭에서 값을 이와 같이 보냅니다.

models[0][msg_id]:23 
models[0][msg_title]:foo 
models[0][msg_content]:bar 
models[0][msg_type]:2323 
models[0][msg_date]:Sun Nov 25 2012 01:05:03 GMT+0200 (FLE Standard Time) 
models[0][msg_status]:563 

아마도 서버에서이 값에 액세스하는 방법은 옳지 않습니다. 나는 당신이 당신의 서버 코드를 공유하도록 제안 할 것이다.

+0

Ty Pechka, 내 PHP yii에 문제가있었습니다. – Martha