html:radio 之二--选中问题

来源:互联网 发布:域名 服务器 编辑:程序博客网 时间:2024/06/05 03:27

 public void reset(ActionMapping mapping, HttpServletRequest request) {
   String id = request.getParameter("id");
   ComJob job = new ComJob();
   ComJobDAO jobdao = new ComJobDAO();
   if (id==null||id==""){
    this.setComputer("一般");
    this.setMarrys("无要求");
    this.setShisu("不提供食宿");
    this.setTerm("一个月");
   }else{
    job = jobdao.findById(Integer.valueOf(id));
   
    if(job.getComputer()==null||job.getComputer()==""){
       this.setComputer("一般");
    }else {
     this.setComputer(job.getComputer());
    }
    if (job.getMarrys()==null||job.getMarrys()==""){
     this.setMarrys("无要求");
    }else{
     this.setMarrys(job.getMarrys());
    }
    if (job.getShisu()==null||job.getShisu()==""){
     this.setShisu("自行解决");
    }else{
     this.setShisu(job.getShisu());
    }
    if (job.getTerm()==null||job.getTerm()==""){
     this.setT
    }else{
     this.setTerm(job.getTerm());
    }
   
   }
}

原创粉丝点击