2014-10-10 27 views
0

如何僅在客戶端從JQuery JTable獲取json格式的所有記錄。在客戶端獲取JQuery Jtable中的所有記錄

我的要求是我有一個項目信息插入數據庫連同與此項目相關的作者列表。我在JQuery Jtable中維護此列表。

在保存按鈕點擊,我發送所有的表單信息到一個servlet。我還希望JSON格式的作者列表,以便我可以將此發送給servlet。

是否possible.see下面

$('#AuthorTableContainer').jtable({ 
     title: 'Authors', 
     selecting: true, 
     edit: true, 
     selecting: true, //Enable selecting 
     multiselect: true, //Allow multiple selecting 
     selectingCheckboxes: true, //Show checkboxes on first column    
     actions: { 
      deleteAction : function (data) { 
       $('#AuthorTableContainer').jtable('deleteRecord', { 
       key: data.authorId, 
       clientOnly:true 
       }); 
      }}, 
     fields: { 
      authorId: { 
       title: 'authorId', 
       key:true, 
       sorting:true, 
       width: '30%' 
      }, 
      Name: { 
       title: 'Name', 
       width: '30%' 
      }, 
      phone: { 
       title: 'phone', 
       width: '30%' 
      }, 
      Email: { 
       title: 'Email', 
       width: '30%' 
      } 
     } 
    }); 
} 
}; 

我想在客戶端JSON格式的作者名單隻有

回答