You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2011/08/11 18:19:58 UTC
svn commit: r1156660 - in /tapestry/tapestry5/trunk/tapestry-core/src/test:
java/org/apache/tapestry5/integration/app1/pages/ComponentInsideBlockDemo.java
resources/org/apache/tapestry5/integration/app1/pages/ComponentInsideBlockDemo.tml
Author: hlship
Date: Thu Aug 11 16:19:57 2011
New Revision: 1156660
URL: http://svn.apache.org/viewvc?rev=1156660&view=rev
Log:
TAP5-1600: Revised test case to match client's specific case, bug still not valid
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/ComponentInsideBlockDemo.java
tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/ComponentInsideBlockDemo.tml
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/ComponentInsideBlockDemo.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/ComponentInsideBlockDemo.java?rev=1156660&r1=1156659&r2=1156660&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/ComponentInsideBlockDemo.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/ComponentInsideBlockDemo.java Thu Aug 11 16:19:57 2011
@@ -1,8 +1,10 @@
package org.apache.tapestry5.integration.app1.pages;
+import org.apache.tapestry5.Block;
import org.apache.tapestry5.EventConstants;
import org.apache.tapestry5.alerts.AlertManager;
import org.apache.tapestry5.annotations.OnEvent;
+import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.ioc.annotations.Inject;
public class ComponentInsideBlockDemo
@@ -10,14 +12,34 @@ public class ComponentInsideBlockDemo
@Inject
private AlertManager mgr;
+ @Persist
+ private boolean which;
+
+ @Inject
+ private Block zen, never;
+
+ public Block getBlockToRender()
+ {
+ return which ? never : zen;
+ }
+
+ void pageReset()
+ {
+ which = false;
+ }
+
void onActionFromGoForBroke()
{
mgr.info("Go For Broke Clicked");
+
+ which = true;
}
@OnEvent(component = "neverForm", value = EventConstants.SUBMIT)
void neverFormSubmitted()
{
- mgr.info("Never Form Submitted. How?");
+ mgr.info("Never Form Submitted");
+
+ which = false;
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/ComponentInsideBlockDemo.tml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/ComponentInsideBlockDemo.tml?rev=1156660&r1=1156659&r2=1156660&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/ComponentInsideBlockDemo.tml (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/ComponentInsideBlockDemo.tml Thu Aug 11 16:19:57 2011
@@ -6,7 +6,7 @@
Test to show that TAP5-1600 is not valid.
</p>
-<t:delegate to="block:zen"/>
+<t:delegate to="blockToRender"/>
<t:block id="zen">