sp;public class Person {
private String name;
private Integer id;
pirvate String address;
public void set(){……}
public String get(){……}
}
下面用 DWRUtil.addRows();
/**************************************************************************************/
/****************** 胡国清***********fzfx88@hotmail.com********************************/
/**************************************************************************************/
function userList(data){
//var delButton = "<input type=''button''/>";
//var editButton = "<input type=''button''/>";
var cellfuncs = [
function(data){return data.id;},
function(data){return data.userName;},
function(data){return data.userTrueName;},
function(data){return data.birthday;},
function(data){
var idd = data.id;
var delButton = document.createElement("<INPUT TYPE=''button'' onclick=''delPerson("+ idd +")''>");
delButton.setAttribute("id","delete");
delButton.setAttribute("value","delete");
return delButton;
},
function(data){
var idd = data.id;
var editButton = document.createElement("<INPUT TYPE=''button'' onclick=''editPerson("+ idd +")''>");
editButton.setAttribute("name","edit");
editButton.setAttribute("value","edit");
return editButton;