在做退订用户时,用户可以多选栏目进行退订,用的是checkbox控件,
处理时用split()分成数组,
[code] public void DxDzUserTD(Object vo){
DX_DzUserYw po = (DX_DzUserYw)vo;
String[] ywdhs = po.getYwdh().split(",");
for(int i=0;i<ywdhs.length;i++){
String[] temp = ywdhs[i].split(";");
po.setYwdh(temp[0].trim());
po.setSftd(temp[1].trim());
dzDAO.userTd(po);
}
}[/code]
用trim(),不然ywdh前有空格,用System.out.println也看不出
处理时用split()分成数组,
[code] public void DxDzUserTD(Object vo){
DX_DzUserYw po = (DX_DzUserYw)vo;
String[] ywdhs = po.getYwdh().split(",");
for(int i=0;i<ywdhs.length;i++){
String[] temp = ywdhs[i].split(";");
po.setYwdh(temp[0].trim());
po.setSftd(temp[1].trim());
dzDAO.userTd(po);
}
}[/code]
用trim(),不然ywdh前有空格,用System.out.println也看不出