Esempio n. 1
0
 public int doStartTag() throws JspException {
   memRecordSet = new MemRecordSet();
   if (StringUtil.isNullOrEmpty(id)) {
     id = genKey();
   }
   return super.doStartTag();
 }
Esempio n. 2
0
 public void execute(RecordProvider provider) {
   ServletRequest request = pageContext.getRequest();
   if (provider.getId().indexOf("_dd_") == -1) {
     TagService.getInstance().queryForObject(memRecordSet, provider, request);
   } else {
     TagService.getInstance().query(memRecordSet, provider, request);
   }
   MemRecord record = memRecordSet.firstRecord();
   if (record != null && !StringUtil.isNullOrEmpty(provider.getOutParam())) {
     String[] outparam = provider.getOutParam().split("\\|");
     for (String name : outparam) {
       if (record.field(name) != null) {
         pageContext.setAttribute(name, record.field(name));
       }
     }
   }
 }
Esempio n. 3
0
 private String genKey() {
   md5key++;
   return "f" + StringUtil.MD5("" + md5key);
 }