You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by ta...@apache.org on 2011/11/12 03:26:04 UTC

svn commit: r1201166 - in /tapestry/tapestry5/branches/5.3/tapestry-core/src: main/java/org/apache/tapestry5/corelib/components/ test/groovy/org/apache/tapestry5/integration/app1/ test/resources/org/apache/tapestry5/integration/app1/pages/

Author: tawus
Date: Sat Nov 12 02:26:03 2011
New Revision: 1201166

URL: http://svn.apache.org/viewvc?rev=1201166&view=rev
Log:
TAP5-1748: Added support for informal parameters to Alerts

Modified:
    tapestry/tapestry5/branches/5.3/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java
    tapestry/tapestry5/branches/5.3/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy
    tapestry/tapestry5/branches/5.3/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/AlertsDemo.tml

Modified: tapestry/tapestry5/branches/5.3/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.3/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java?rev=1201166&r1=1201165&r2=1201166&view=diff
==============================================================================
--- tapestry/tapestry5/branches/5.3/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java (original)
+++ tapestry/tapestry5/branches/5.3/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Alerts.java Sat Nov 12 02:26:03 2011
@@ -23,6 +23,7 @@ import org.apache.tapestry5.annotations.
 import org.apache.tapestry5.annotations.Parameter;
 import org.apache.tapestry5.annotations.RequestParameter;
 import org.apache.tapestry5.annotations.SessionState;
+import org.apache.tapestry5.annotations.SupportsInformalParameters;
 import org.apache.tapestry5.BindingConstants;
 import org.apache.tapestry5.ioc.annotations.Inject;
 import org.apache.tapestry5.json.JSONObject;
@@ -37,6 +38,7 @@ import org.apache.tapestry5.services.jav
  * @tapestrydoc
  * @since 5.3
  */
+@SupportsInformalParameters
 public class Alerts implements ClientElement
 {
 
@@ -64,6 +66,7 @@ public class Alerts implements ClientEle
         clientId = javaScriptSupport.allocateClientId(resources);
 
         writer.element("div", "id", clientId);
+        resources.renderInformalParameters(writer);
         writer.end();
 
         JSONObject spec = new JSONObject("id", clientId,

Modified: tapestry/tapestry5/branches/5.3/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.3/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy?rev=1201166&r1=1201165&r2=1201166&view=diff
==============================================================================
--- tapestry/tapestry5/branches/5.3/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy (original)
+++ tapestry/tapestry5/branches/5.3/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/AlertsTests.groovy Sat Nov 12 02:26:03 2011
@@ -109,4 +109,11 @@ class AlertsTests extends SeleniumTestCa
         assertTrue isElementPresent("link=Zenbu Kesu")
     }
 
+    @Test
+    void check_informal_parameters()
+    {
+        openLinks "Alerts Demo"
+        assertTrue isElementPresent("//div[@class='alert-class']")
+    }
+
 }

Modified: tapestry/tapestry5/branches/5.3/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/AlertsDemo.tml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.3/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/AlertsDemo.tml?rev=1201166&r1=1201165&r2=1201166&view=diff
==============================================================================
--- tapestry/tapestry5/branches/5.3/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/AlertsDemo.tml (original)
+++ tapestry/tapestry5/branches/5.3/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/AlertsDemo.tml Sat Nov 12 02:26:03 2011
@@ -26,5 +26,5 @@
     ]
 </p>
 
-<t:alerts dismissText="Zenbu Kesu"/>
+<t:alerts class='alert-class' dismissText="Zenbu Kesu"/>
 </html>