You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by jb...@apache.org on 2007/09/05 15:16:31 UTC

svn commit: r572948 - /wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/source/SourcesPage.java

Author: jbq
Date: Wed Sep  5 06:16:30 2007
New Revision: 572948

URL: http://svn.apache.org/viewvc?rev=572948&view=rev
Log:
WICKET-931 Broken "sources" window for templating example

The target argument of AjaxFallbackLink.onClick() can be null if the request is
not Ajax

Modified:
    wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/source/SourcesPage.java

Modified: wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/source/SourcesPage.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/source/SourcesPage.java?rev=572948&r1=572947&r2=572948&view=diff
==============================================================================
--- wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/source/SourcesPage.java (original)
+++ wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/source/SourcesPage.java Wed Sep  5 06:16:30 2007
@@ -367,8 +367,12 @@
 						public void onClick(AjaxRequestTarget target)
 						{
 							setName(getModelObjectAsString());
-							target.addComponent(codePanel);
-							target.addComponent(filename);
+
+							if (target != null)
+							{
+								target.addComponent(codePanel);
+								target.addComponent(filename);
+							}
 						}
 					};
 					link.add(new Label("name", item.getModelObjectAsString()));