首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Ajax >

ajax应验+iframe提交

2012-09-01 
ajax验证+iframe提交import java.util.ArrayListimport java.util.HashMapimport java.util.Listimport

ajax验证+iframe提交



import java.util.ArrayList;import java.util.HashMap;import java.util.List;import java.util.Map;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import org.apache.commons.lang.StringUtils;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;import com.paic.pafa.app.lwc.service.databinding.BindException;import com.paic.pafa.app.web.servlet.ModelAndView;import com.paic.pafa.app.web.servlet.mvc.SimpleFormController;import com.pingan.nts.extrading.invest.dto.FundAcctDTO;public class FundAcctController extends SimpleFormController {private static final Log LOG = LogFactory.getLog(FundAcctController.class);@Overrideprotected ModelAndView onSubmit(HttpServletRequest request,HttpServletResponse response, Object command, BindException errors)throws Exception {response.setContentType("text/html; charset=utf-8");LOG.info("ENTER.....");FundAcctDTO fundAcctDTO = (FundAcctDTO)command;Map<String, Object> model = new HashMap<String, Object>();if (StringUtils.isEmpty(fundAcctDTO.getFundNo())) {model.put("ERR", "账号编码不能为空!");return new ModelAndView(getFormView(), model);}model.put("RES", "RES");if (StringUtils.isEmpty(fundAcctDTO.getFundName())) {List<String> account = new ArrayList<String>();account.add("校长");account.add("老师");account.add("同学");model.put("account", account);}return new ModelAndView(getSuccessView(), model);}}

热点排行