【问题标题】:Clear all model fields before validation in FireFox and IE10在 FireFox 和 IE10 中验证前清除所有模型字段
【发布时间】:2013-07-02 23:37:45
【问题描述】:

我正在使用 spring webflow,但在将字段从 spring 表单绑定到我的模型时遇到了问题。 所以我有一个模型:

   public class MyModel implements Serializable {
private long senderAccountId;
private String senderId = "";

private String documentId = "";
private String performDateView = ""
   //......
  }

在jsp中我有:

            <portlet:actionURL var="actionURL" portletMode="view">
                   <portlet:param name="execution" value="${flowExecutionKey}"/>
           </portlet:actionURL>

        <form:form id="creationForm" modelAttribute="payment" action="${actionURL}"
            method="post">

     <form:input path="senderId" size="18"/>
      //............

在我的 webflow xml 中:

          //....
         <transition on="saveAsDraft" to="decisionActionResult" validate="true">
         //......

在 IE10 和 FireFox 中: 当我在验证对象中时,我的所有模型字段都被清除并设置为空。 但在谷歌浏览器中运行正常。只是我的问题吗?

【问题讨论】:

  • 您不需要在标题中添加标签。我为你删除了它们;-)

标签: java jsp spring-webflow


【解决方案1】:

问题出在:$('form').submit(); 必须是:$('#form').submit();并将 id 添加到表单中,仅此而已,但在 Google Chrome 中它运行良好!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-12-01
    • 2017-09-14
    • 2011-03-10
    • 2016-12-03
    • 1970-01-01
    • 2013-08-30
    • 2015-01-15
    相关资源
    最近更新 更多