You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by eh...@apache.org on 2007/03/08 23:05:06 UTC

svn commit: r516191 - in /incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/ajax/builtin: LinksPage.html LinksPage.java

Author: ehillenius
Date: Thu Mar  8 14:05:03 2007
New Revision: 516191

URL: http://svn.apache.org/viewvc?view=rev&rev=516191
Log:
extra example (throw exception from ajax request)

Modified:
    incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/ajax/builtin/LinksPage.html
    incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/ajax/builtin/LinksPage.java

Modified: incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/ajax/builtin/LinksPage.html
URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/ajax/builtin/LinksPage.html?view=diff&rev=516191&r1=516190&r2=516191
==============================================================================
--- incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/ajax/builtin/LinksPage.html (original)
+++ incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/ajax/builtin/LinksPage.html Thu Mar  8 14:05:03 2007
@@ -29,4 +29,7 @@
 break out of ajax and redirect to a new page: <a href="#" wicket:id="set-response-page">redirect</a>
 <br/>
 <br/>
+test exception handling (should display an error page): <a href="#" wicket:id="exception">exception</a>
+<br/>
+<br/>
 </wicket:extend>

Modified: incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/ajax/builtin/LinksPage.java
URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/ajax/builtin/LinksPage.java?view=diff&rev=516191&r1=516190&r2=516191
==============================================================================
--- incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/ajax/builtin/LinksPage.java (original)
+++ incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/ajax/builtin/LinksPage.java Thu Mar  8 14:05:03 2007
@@ -181,7 +181,15 @@
 		{
 			public void onClick(AjaxRequestTarget target)
 			{
-				setResponsePage(LinksPage.class);
+				setResponsePage(new LinksPage());
+			}
+		});
+		
+		add(new AjaxLink("exception")
+		{
+			public void onClick(AjaxRequestTarget target)
+			{
+				throw new RuntimeException("test whether the exception handling works");
 			}
 		});
 	}