Пример #1
0
 public String findByExample() {
   System.out.println("===ResumeAction.findByExample===");
   pageBean = new Page();
   List resumes = resumeService.findByExample(resume);
   if (resumes != null) {
     pageBean.setRoot(resumes);
     pageBean.setTotalProperty(resumes.size());
     pageBean.setSuccess(true);
   } else {
     pageBean.setSuccess(false);
   }
   return SUCCESS;
 }
Пример #2
0
 public String findAllResume() {
   System.out.println("===ResumeAction.findAllResume===");
   String strCondition = getRequest().getParameter("conditions");
   List<String> conditions = new ArrayList<String>();
   MyUtils.addToCollection(conditions, MyUtils.split(strCondition, " ,"));
   List<String> utf8Condition = new ArrayList<String>();
   for (String c : conditions) {
     try {
       utf8Condition.add(new String(c.getBytes("iso-8859-1"), "utf-8"));
     } catch (UnsupportedEncodingException e) {
       e.printStackTrace();
     }
   }
   pageBean = new Page();
   pageBean.setConditions(utf8Condition);
   String start = getRequest().getParameter("start");
   String limit = getRequest().getParameter("limit");
   int startInt = start != null ? Integer.parseInt(start) : 0;
   int limitInt = limit != null ? Integer.parseInt(limit) : 10;
   pageBean.setStart(startInt);
   pageBean.setLimit(limitInt);
   pageBean = resumeService.findByPage(pageBean);
   pageBean.setSuccess(true);
   return SUCCESS;
 }