jquery datatable的使用及editable
exoTable = $('#examples').dataTable({ bJQueryUI: true,"bServerSide": true,"sAjaxSource": "XXXX.action?"+"xxx="+params,"sPaginationType": "full_numbers",[b]"aoColumns": [ { "sName": "XXX", "bSearchable": false, "bSortable": false, "bVisible": false }, { "sName": "COMPANY_NAME" }, { "sName": "ADDRESS"}, { "sName": "TOWN" }][/b]}).makeEditable({sUpdateURL : "XXXX.action?prescCode="+par,[b]"aoColumns": [ { //Empty object is used for the default editable settings indicator: 'Saving...', tooltip: 'Click to edit', loadtext: 'loading...', type: 'text', onblur: 'submit' }, //null,//null for read-only columns { //Empty object is used for the default editable settings indicator: 'Saving...', tooltip: 'Click to edit', loadtext: 'loading...', type: 'text', onblur: 'submit' }, { indicator: 'Saving...', tooltip: 'Click to select town', loadtext: 'loading...', type: 'select', onblur: 'submit', data: "{'London':'London','Liverpool':'Liverpool'}" } ],[/b] sAddURL: "XXXX.action", sAddHttpMethod: "GET", [color=red]sDeleteHttpMethod: "GET",[/color]
fnOnEditing: function(input){ input.val(encodeURI(input.val()));return true;},
Map m = ActionContext.getContext().getParameters();String[] editedvalue = (String[]) m.get("value");String editItem = java.net.URLDecoder.decode(editedvalue[0] , "UTF-8");进行解码。