$ .Fn.serializeObject failure to attribute to disabled

Symptoms:

  When Charles localhost log production under tomcat, found that today's record, many times are reported org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne (), but found: 15005 The abnormal.

problem analysis:

  The investigation abnormal trajectory is seen to pass a query parameter is null led to a full-table query, after the reverse search page request entry, navigate to a page in the case of the condition of this request to be executed during initialization background; the request parameters transmitted is processed result form form serialized obtained, it can be determined that the parameter is not the result of a sequence of values returned; and binding the page to view input the contents of the parameter is found to be disabled attribute, this guessing the sequence of processing of the failure of the disabled; then look how this parameter sequence is performed, this method is js rewrite the content of the fine processing, substantially unchanged ; pages added in the circulation a print log, the name to see through the operation name is not found the desired print, it can be confirmed that a further step var a = this.serializeArray () this method returns the result is not desirable; the global search method found through the jQuery-1.11 .1, js js file within this native, reading written here, we will know within serializeArray method for the disabled property It was filtered, then the desired results in the field there will be worth it.

Open question:

  After the above investigation through, that the contents of the js serializeArray method will weed out the disabled property, causes the contents of $ .fn.serializeObject serialized object returned form parameters are also disabled free property.

Adjustment:

  The type can be set to readonly property to input the contents hidden.

 

Guess you like

Origin www.cnblogs.com/xStarMoony/p/11345012.html