Return-Path: X-Original-To: apmail-struts-commits-archive@minotaur.apache.org Delivered-To: apmail-struts-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 460E71810C for ; Thu, 28 Jan 2016 09:59:09 +0000 (UTC) Received: (qmail 26212 invoked by uid 500); 28 Jan 2016 09:59:09 -0000 Delivered-To: apmail-struts-commits-archive@struts.apache.org Received: (qmail 26174 invoked by uid 500); 28 Jan 2016 09:59:09 -0000 Mailing-List: contact commits-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list commits@struts.apache.org Received: (qmail 26165 invoked by uid 99); 28 Jan 2016 09:59:09 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jan 2016 09:59:09 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D3D92E006B; Thu, 28 Jan 2016 09:59:08 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: cnenning@apache.org To: commits@struts.apache.org Message-Id: <564f1c62bdf848159dcf2a02855dfe9d@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: struts git commit: updated comments Date: Thu, 28 Jan 2016 09:59:08 +0000 (UTC) Repository: struts Updated Branches: refs/heads/master 6fb870d38 -> d0baa7060 updated comments Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/d0baa706 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/d0baa706 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/d0baa706 Branch: refs/heads/master Commit: d0baa7060dd502b8a2eadb3916623461a7099f51 Parents: 6fb870d Author: cnenning Authored: Thu Jan 28 10:58:44 2016 +0100 Committer: cnenning Committed: Thu Jan 28 10:58:44 2016 +0100 ---------------------------------------------------------------------- .../src/main/webapp/WEB-INF/validation/ajaxFormSubmit.jsp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/struts/blob/d0baa706/apps/showcase/src/main/webapp/WEB-INF/validation/ajaxFormSubmit.jsp ---------------------------------------------------------------------- diff --git a/apps/showcase/src/main/webapp/WEB-INF/validation/ajaxFormSubmit.jsp b/apps/showcase/src/main/webapp/WEB-INF/validation/ajaxFormSubmit.jsp index c327802..f30403f 100644 --- a/apps/showcase/src/main/webapp/WEB-INF/validation/ajaxFormSubmit.jsp +++ b/apps/showcase/src/main/webapp/WEB-INF/validation/ajaxFormSubmit.jsp @@ -63,7 +63,7 @@ *******************************************************************/ /** - * Validates given form per AJAX. To be called as onSubmit handler. + * Validates form per AJAX. To be called as onSubmit handler. * * @param event onSubmit event */ @@ -141,7 +141,6 @@ function _removeValidationErrors() { * * @param form Form containing errors. * @param errors Errors from server. - * @returns {Boolean} True if form can be submitted. */ function _handleValidationResult(form, errors) { // action errors @@ -150,7 +149,7 @@ function _handleValidationResult(form, errors) { var errorContainer = $('ul.errorMessage'); $.each(errors.errors, function(index, errorMsg) { var li = $('
  • '); - li.text(errorMsg); + li.text(errorMsg); // use text() for security reasons errorContainer.append(li); }); } @@ -161,7 +160,7 @@ function _handleValidationResult(form, errors) { var td = $('td[data-error-for-fieldname="' + fieldName + '"]'); if (td) { var div = $('
    '); - div.text(errorMsg); + div.text(errorMsg); // use text() for security reasons td.append(div); } });