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 DF08997B2 for ; Fri, 6 Apr 2012 15:57:10 +0000 (UTC) Received: (qmail 9764 invoked by uid 500); 6 Apr 2012 15:57:10 -0000 Delivered-To: apmail-struts-commits-archive@struts.apache.org Received: (qmail 9728 invoked by uid 500); 6 Apr 2012 15:57:10 -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 9719 invoked by uid 99); 6 Apr 2012 15:57:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Apr 2012 15:57:10 +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; Fri, 06 Apr 2012 15:57:07 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 5B57923888EA for ; Fri, 6 Apr 2012 15:56:46 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1310417 - in /struts/struts2/trunk/core/src: main/java/org/apache/struts2/components/UIBean.java test/java/org/apache/struts2/views/freemarker/FreeMarkerResultTest.java test/resources/org/apache/struts2/views/freemarker/dynaAttributes.ftl Date: Fri, 06 Apr 2012 15:56:46 -0000 To: commits@struts.apache.org From: lukaszlenart@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120406155646.5B57923888EA@eris.apache.org> Author: lukaszlenart Date: Fri Apr 6 15:56:45 2012 New Revision: 1310417 URL: http://svn.apache.org/viewvc?rev=1310417&view=rev Log: WW-3174 additional test case for Dynamic Attributes support Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/freemarker/FreeMarkerResultTest.java struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/freemarker/dynaAttributes.ftl Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java?rev=1310417&r1=1310416&r2=1310417&view=diff ============================================================================== --- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java (original) +++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java Fri Apr 6 15:56:45 2012 @@ -1203,7 +1203,7 @@ public abstract class UIBean extends Com public void setDynamicAttributes(Map dynamicAttributes) { this.dynamicAttributes.putAll(dynamicAttributes); -} + } @Override /** @@ -1221,7 +1221,7 @@ public abstract class UIBean extends Com } } } - + protected Set getStandardAttributes() { Class clz = getClass(); Set standardAttributes = standardAttributesMap.get(clz); Modified: struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/freemarker/FreeMarkerResultTest.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/freemarker/FreeMarkerResultTest.java?rev=1310417&r1=1310416&r2=1310417&view=diff ============================================================================== --- struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/freemarker/FreeMarkerResultTest.java (original) +++ struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/freemarker/FreeMarkerResultTest.java Fri Apr 6 15:56:45 2012 @@ -214,7 +214,9 @@ public class FreeMarkerResultTest extend Dispatcher dispatcher = Dispatcher.getInstance(); ActionMapping mapping = dispatcher.getContainer().getInstance(ActionMapper.class).getMapping(request, dispatcher.getConfigurationManager()); dispatcher.serviceAction(request, response, servletContext, mapping); - assertEquals("", stringWriter.toString()); + String expected = "" + + ""; + assertEquals(expected, stringWriter.toString()); } protected void setUp() throws Exception { Modified: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/freemarker/dynaAttributes.ftl URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/freemarker/dynaAttributes.ftl?rev=1310417&r1=1310416&r2=1310417&view=diff ============================================================================== --- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/freemarker/dynaAttributes.ftl (original) +++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/freemarker/dynaAttributes.ftl Fri Apr 6 15:56:45 2012 @@ -20,4 +20,5 @@ * under the License. */ --> -<@s.textfield name="test" dynamicAttributes={"placeholder":"input","foo":"bar"}/> \ No newline at end of file +<@s.textfield name="test" dynamicAttributes={"placeholder":"input","foo":"bar"}/> +<@s.textfield name="test" placeholder="input" foo="bar"/> \ No newline at end of file