wicket-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ivaynb...@apache.org
Subject svn commit: r781265 - in /wicket/trunk/wicket-devutils/src/main/java/org/apache/wicket/devutils: inspector/InspectorPage.java inspector/PageMapView.java stateless/StatelessChecker.java
Date Wed, 03 Jun 2009 05:31:59 GMT
Author: ivaynberg
Date: Wed Jun  3 05:31:59 2009
New Revision: 781265

URL: http://svn.apache.org/viewvc?rev=781265&view=rev
Log:
WICKET-2305  [devutils] Can only inspect pages in same pagemap as the inspector

Modified:
    wicket/trunk/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/InspectorPage.java
    wicket/trunk/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/PageMapView.java
    wicket/trunk/wicket-devutils/src/main/java/org/apache/wicket/devutils/stateless/StatelessChecker.java

Modified: wicket/trunk/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/InspectorPage.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/InspectorPage.java?rev=781265&r1=781264&r2=781265&view=diff
==============================================================================
--- wicket/trunk/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/InspectorPage.java
(original)
+++ wicket/trunk/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/InspectorPage.java
Wed Jun  3 05:31:59 2009
@@ -50,12 +50,18 @@
 		IPageMapEntry entry = null;
 		try
 		{
-			entry = getPageMap().getEntry(parameters.getInt("pageId"));
+			entry = Session.get().pageMapForName(
+					parameters.getString("pageMap").equals("") ? null : parameters.getString("pageMap"),
+					false).getEntry(parameters.getInt("pageId"));
 		}
 		catch (StringValueConversionException e)
 		{
 			// Ignore
 		}
+		catch (NullPointerException e)
+		{
+		        // Ignore
+		}
 		add(new PageView("page", entry == null ? null : entry.getPage()));
 		add(new Image("bug"));
 		add(new BookmarkablePageLink<Void>("allsessions", LiveSessionsPage.class));

Modified: wicket/trunk/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/PageMapView.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/PageMapView.java?rev=781265&r1=781264&r2=781265&view=diff
==============================================================================
--- wicket/trunk/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/PageMapView.java
(original)
+++ wicket/trunk/wicket-devutils/src/main/java/org/apache/wicket/devutils/inspector/PageMapView.java
Wed Jun  3 05:31:59 2009
@@ -92,6 +92,7 @@
 				IPageMapEntry entry = pageMap.getEntry(access.getId());
 				PageParameters parameters = new PageParameters();
 				parameters.put("pageId", "" + entry.getNumericId());
+				parameters.put("pageMap", pageMap.getName() == null ? "" : pageMap.getName());
 				Link<?> link = new BookmarkablePageLink<Void>("link", InspectorPage.class,
parameters);
 				link.add(new Label("id", "" + entry.getNumericId()));
 				listItem.add(link);

Modified: wicket/trunk/wicket-devutils/src/main/java/org/apache/wicket/devutils/stateless/StatelessChecker.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-devutils/src/main/java/org/apache/wicket/devutils/stateless/StatelessChecker.java?rev=781265&r1=781264&r2=781265&view=diff
==============================================================================
--- wicket/trunk/wicket-devutils/src/main/java/org/apache/wicket/devutils/stateless/StatelessChecker.java
(original)
+++ wicket/trunk/wicket-devutils/src/main/java/org/apache/wicket/devutils/stateless/StatelessChecker.java
Wed Jun  3 05:31:59 2009
@@ -95,7 +95,7 @@
 				final Object o = ((MarkupContainer)component).visitChildren(visitor);
 				if (o != null)
 				{
-					throw new IllegalArgumentException(msg + " Offending component: " + o);
+				    throw new IllegalArgumentException(msg + " Offending component: " + o);
 				}
 			}
 



Mime
View raw message