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 52A3CDF15 for ; Thu, 11 Oct 2012 10:07:12 +0000 (UTC) Received: (qmail 98174 invoked by uid 500); 11 Oct 2012 10:07:12 -0000 Delivered-To: apmail-struts-commits-archive@struts.apache.org Received: (qmail 98011 invoked by uid 500); 11 Oct 2012 10:07:11 -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 97968 invoked by uid 99); 11 Oct 2012 10:07:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Oct 2012 10:07:11 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Oct 2012 10:07:10 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 20E44238896F for ; Thu, 11 Oct 2012 10:06:27 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1396971 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Reset.java Date: Thu, 11 Oct 2012 10:06:27 -0000 To: commits@struts.apache.org From: lukaszlenart@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121011100627.20E44238896F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: lukaszlenart Date: Thu Oct 11 10:06:26 2012 New Revision: 1396971 URL: http://svn.apache.org/viewvc?rev=1396971&view=rev Log: WW-3425 Improves if tests to simple test just one time Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Reset.java Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Reset.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Reset.java?rev=1396971&r1=1396970&r2=1396971&view=diff ============================================================================== --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Reset.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Reset.java Thu Oct 11 10:06:26 2012 @@ -36,7 +36,7 @@ import javax.servlet.http.HttpServletRes *
  • input: renders as html <input type="reset"...>
  • *
  • button: renders as html <button type="reset"...>
  • * - * Please note that the button type has advantages by adding the possibility to seperate the submitted value from the + * Please note that the button type has advantages by adding the possibility to separate the submitted value from the * text shown on the button face, but has issues with Microsoft Internet Explorer at least up to 6.0 * * @@ -50,7 +50,7 @@ import javax.servlet.http.HttpServletRes * *
      * 
    - * Render an button reset:
    + * Render a reset button:
      * <s:reset type="button" key="reset"/>
      * 
      * 
    @@ -85,12 +85,8 @@ public class Reset extends FormButton { } public void evaluateParams() { - if ((key == null) && (value == null)) { - value = "Reset"; - } - - if (((key != null)) && (value == null)) { - this.value = "%{getText('"+key +"')}"; + if (value == null) { + value = (key != null ? "%{getText('"+key+"')}" : "Reset"); } super.evaluateParams(); } @@ -98,7 +94,7 @@ public class Reset extends FormButton { /** * Indicate whether the concrete button supports the type "image". * - * @return false to indicate type image is supported. + * @return false to indicate type image is not supported. */ protected boolean supportsImageType() { return false;