public int doStartTag() throws JspException { memRecordSet = new MemRecordSet(); if (StringUtil.isNullOrEmpty(id)) { id = genKey(); } return super.doStartTag(); }
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)); } } } }
private String genKey() { md5key++; return "f" + StringUtil.MD5("" + md5key); }