zoukankan      html  css  js  c++  java
  • JEECG中表单提交的中断

    JEECG平台中基于form表单封装了<t:formvalid>标签,对应实现的类为FormValidationTag.java文件。

    很多时候在正式向后台提交数据前想要做判断处理,若通过判断则继续提交,若未通过则给予相应提示并停止本次提交,这就用到了表单的中断与手动提交。

    中断提交:

    只需在beforeSubmit方法中返回false,即可中断提交。

    <t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="gdsxController.do?doUpdate" tiptype="1" beforeSubmit="gdsxUpdateBeforeSubmit">
            <input id="id" name="id" type="hidden" value="${gdsxPage.id }">
            <input id="createName" name="createName" type="hidden" value="${gdsxPage.createName }">
            <input id="createBy" name="createBy" type="hidden" value="${gdsxPage.createBy }">
            <input id="createDate" name="createDate" type="hidden" value="${gdsxPage.createDate }">
            <input id="updateName" name="updateName" type="hidden" value="${gdsxPage.updateName }">
            <input id="updateBy" name="updateBy" type="hidden" value="${gdsxPage.updateBy }">
            <input id="updateDate" name="updateDate" type="hidden" value="${gdsxPage.updateDate }">
            <t:tabs width="680" id="tt" iframe="false" tabPosition="top" fit="false">
                <t:tab href="gdsxController.do?goHtjyUpdate&id=${gdsxPage.id }" icon="icon-search" title="合同简要" id="hejy"></t:tab>
                <t:tab href="gdsxController.do?goGdxxUpdate&id=${gdsxPage.id }" icon="icon-search" title="供地信息" id="gdxx"></t:tab>
                <t:tab href="gdsxController.do?goCjmjUpdate&id=${gdsxPage.id }" icon="icon-search" title="村居面积" id="cjmj"></t:tab>
            </t:tabs>
        </t:formvalid>
    function gdsxUpdateBeforeSubmit()
    {
      //下面三行代码将form表单提交的数据加载中遮罩层取消
       var infoTable = subDlgIndex.DOM.t.parent().parent().parent();
       infoTable.parent().css('display','none');
       infoTable.parent().parent().children("#ldg_lockmask").attr("hidden","true");
       return false;
    }
  • 相关阅读:
    jenkins 参数化构建,获取git分支
    maven 历史版本下载
    spring mybatis 多个数据源配置
    springmvc 加载静态文件失败
    java服务覆盖率统计 jacoco ant
    testng监听ISuiteListener
    记录一下这几天遇到的坑(.netcore 代理问题)
    Js获取客户端用户Ip地址
    如何获取AWS的Access Key ID 和 Secret Access Key (Unable to find credentials)
    记录一个EF连接查询的异常:the entity or complex type 'x' cannot be constructed in a linq to entities query
  • 原文地址:https://www.cnblogs.com/shuilangyizu/p/10148361.html
Copyright © 2011-2022 走看看