You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by iv...@apache.org on 2006/11/10 08:40:33 UTC

svn commit: r473228 - in /incubator/wicket/trunk/wicket/src/main/java/wicket: ./ annot/ markup/html/internal/ protocol/http/ request/target/component/ request/target/resource/

Author: ivaynberg
Date: Thu Nov  9 23:40:32 2006
New Revision: 473228

URL: http://svn.apache.org/viewvc?view=rev&rev=473228
Log:
removed annotations, leaving reflection utils there in case they are needed in the future

Removed:
    incubator/wicket/trunk/wicket/src/main/java/wicket/annot/
Modified:
    incubator/wicket/trunk/wicket/src/main/java/wicket/Component.java
    incubator/wicket/trunk/wicket/src/main/java/wicket/MarkupContainer.java
    incubator/wicket/trunk/wicket/src/main/java/wicket/Page.java
    incubator/wicket/trunk/wicket/src/main/java/wicket/markup/html/internal/HeaderContainer.java
    incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/FilePageStore.java
    incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/HttpSessionStore.java
    incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/WebRequestCycle.java
    incubator/wicket/trunk/wicket/src/main/java/wicket/request/target/component/BookmarkablePageRequestTarget.java
    incubator/wicket/trunk/wicket/src/main/java/wicket/request/target/component/PageRequestTarget.java
    incubator/wicket/trunk/wicket/src/main/java/wicket/request/target/resource/ComponentResourceRequestTarget.java

Modified: incubator/wicket/trunk/wicket/src/main/java/wicket/Component.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/main/java/wicket/Component.java?view=diff&rev=473228&r1=473227&r2=473228
==============================================================================
--- incubator/wicket/trunk/wicket/src/main/java/wicket/Component.java (original)
+++ incubator/wicket/trunk/wicket/src/main/java/wicket/Component.java Thu Nov  9 23:40:32 2006
@@ -28,11 +28,6 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import wicket.annot.AnnotationUtils;
-import wicket.annot.OnAfterRender;
-import wicket.annot.OnAttach;
-import wicket.annot.OnBeforeRender;
-import wicket.annot.OnDetach;
 import wicket.authorization.Action;
 import wicket.authorization.AuthorizationException;
 import wicket.authorization.IAuthorizationStrategy;
@@ -712,13 +707,13 @@
 
 	/**
 	 * Gets the markup fragment associated with the component. Except for Pages,
-	 * Panels and Borders, it is assumed that the first markup element of the 
+	 * Panels and Borders, it is assumed that the first markup element of the
 	 * fragment is a tag.
 	 * <p>
-	 * If the markup fragment has been determined previously, the transient cache
-	 * of the Component is returned. Else, the parent container will be asked to 
-	 * provide the markup for its child and the object returned will be cached
-	 * for later re-use.
+	 * If the markup fragment has been determined previously, the transient
+	 * cache of the Component is returned. Else, the parent container will be
+	 * asked to provide the markup for its child and the object returned will be
+	 * cached for later re-use.
 	 * 
 	 * @return markup fragment.
 	 */
@@ -799,7 +794,6 @@
 		if (getId().startsWith(AUTO_COMPONENT_PREFIX))
 		{
 			internalAttach();
-			AnnotationUtils.invokeOnAttachListeners(this);
 			render();
 		}
 		else
@@ -1695,7 +1689,6 @@
 			{
 				// Call implementation to render component
 				onBeforeRender();
-				AnnotationUtils.invokeOnBeforeRenderListeners(this);
 				try
 				{
 					onRender(markupStream);
@@ -1703,7 +1696,6 @@
 				finally
 				{
 					onAfterRender();
-					AnnotationUtils.invokeOnAfterRenderListeners(this);
 				}
 
 				// Component has been rendered
@@ -1788,7 +1780,6 @@
 						{
 							((IFeedback)component).updateFeedback();
 							component.internalAttach();
-							AnnotationUtils.invokeOnAttachListeners(component);
 							return IVisitor.CONTINUE_TRAVERSAL;
 						}
 					});
@@ -1825,13 +1816,11 @@
 
 				// Render the component and all its children
 				onBeforeRender();
-				AnnotationUtils.invokeOnBeforeRenderListeners(this);
 				render(markupStream);
 			}
 			finally
 			{
 				onAfterRender();
-				AnnotationUtils.invokeOnAfterRenderListeners(this);
 			}
 		}
 	}
@@ -1945,7 +1934,7 @@
 	{
 		// Tell the page that the component rendered
 		getPage().componentRendered(this);
-		
+
 		// notify the behaviors that component has been rendered
 		if (behaviors != null)
 		{
@@ -1954,7 +1943,7 @@
 				behavior.rendered(this);
 			}
 		}
-	}	
+	}
 
 	/**
 	 * Print to the web response what ever the component wants to contribute to
@@ -2830,10 +2819,7 @@
 
 	/**
 	 * Called just after a component is rendered.
-	 * 
-	 * @deprecated use {@link OnAfterRender} instead
 	 */
-	@Deprecated
 	protected void onAfterRender()
 	{
 		// Clear the component's markup cache and allow changes to locale,
@@ -2849,22 +2835,17 @@
 	 * this will be tightened in Wicket 1.3 when we will add the guarantee that
 	 * onAttach() be called before any framework use of a Component (in the
 	 * implementation of request targets).
-	 * 
-	 * @deprecated - use {@link OnAttach} instead
 	 */
-	@Deprecated
 	protected void onAttach()
 	{
 	}
 
 	/**
 	 * Called just before a component is rendered.
-	 * 
-	 * @deprecated use {@link OnBeforeRender} instead
 	 */
-	@Deprecated
 	protected void onBeforeRender()
 	{
+
 	}
 
 	/**
@@ -2898,10 +2879,7 @@
 	 * of this will be tightened in Wicket 1.3 when we will add the guarantee
 	 * that onDetach() be called after all framework use of a Component (in the
 	 * implementation of request targets).
-	 * 
-	 * @deprecated - use {@link OnDetach} instead
 	 */
-	@Deprecated
 	protected void onDetach()
 	{
 	}

Modified: incubator/wicket/trunk/wicket/src/main/java/wicket/MarkupContainer.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/main/java/wicket/MarkupContainer.java?view=diff&rev=473228&r1=473227&r2=473228
==============================================================================
--- incubator/wicket/trunk/wicket/src/main/java/wicket/MarkupContainer.java (original)
+++ incubator/wicket/trunk/wicket/src/main/java/wicket/MarkupContainer.java Thu Nov  9 23:40:32 2006
@@ -28,8 +28,6 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import wicket.annot.AnnotationUtils;
-import wicket.annot.OnAfterRender;
 import wicket.feedback.IFeedback;
 import wicket.markup.ComponentTag;
 import wicket.markup.MarkupElement;
@@ -366,7 +364,6 @@
 		try
 		{
 			super.internalAttach();
-			AnnotationUtils.invokeOnAttachListeners(this);
 
 			// Loop through child components
 			final int size = children_size();
@@ -408,7 +405,6 @@
 	{
 		// Handle end request for the container itself
 		super.internalDetach();
-		AnnotationUtils.invokeOnDetachListeners(this);
 
 		// Loop through child components
 		for (Component child : this)
@@ -843,13 +839,12 @@
 
 		return this.associatedMarkup;
 	}
-	
+
 	/**
 	 * Make sure changes to the locale and style are handled properly
 	 * 
 	 * @see wicket.Component#onAfterRender()
 	 */
-	@OnAfterRender
 	protected void onAfterRender()
 	{
 		this.associatedMarkup = null;
@@ -869,7 +864,8 @@
 	protected void onAssociatedMarkupLoaded(final MarkupFragment markup)
 	{
 		// Call all register load listeners
-		for (IMarkupLoadListener listener : getApplication().getMarkupSettings().getMarkupLoadListeners())
+		for (IMarkupLoadListener listener : getApplication().getMarkupSettings()
+				.getMarkupLoadListeners())
 		{
 			listener.onAssociatedMarkupLoaded(this, markup);
 		}

Modified: incubator/wicket/trunk/wicket/src/main/java/wicket/Page.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/main/java/wicket/Page.java?view=diff&rev=473228&r1=473227&r2=473228
==============================================================================
--- incubator/wicket/trunk/wicket/src/main/java/wicket/Page.java (original)
+++ incubator/wicket/trunk/wicket/src/main/java/wicket/Page.java Thu Nov  9 23:40:32 2006
@@ -17,19 +17,12 @@
  */
 package wicket;
 
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import wicket.annot.AnnotationUtils;
 import wicket.authorization.UnauthorizedActionException;
 import wicket.feedback.FeedbackMessages;
 import wicket.feedback.IFeedback;
-import wicket.markup.MarkupException;
 import wicket.markup.MarkupFragment;
 import wicket.markup.MarkupStream;
 import wicket.markup.html.WebPage;
@@ -37,12 +30,10 @@
 import wicket.model.IModel;
 import wicket.request.RequestParameters;
 import wicket.session.pagemap.IPageMapEntry;
-import wicket.settings.IDebugSettings;
 import wicket.settings.IPageSettings;
 import wicket.util.lang.Classes;
 import wicket.util.lang.Objects;
 import wicket.util.string.StringValue;
-import wicket.util.value.Count;
 import wicket.version.IPageVersionManager;
 import wicket.version.undo.Change;
 import wicket.version.undo.UndoPageVersionManager;
@@ -1126,7 +1117,6 @@
 			{
 				((IFeedback)component).updateFeedback();
 				component.internalAttach();
-				AnnotationUtils.invokeOnAttachListeners(component);
 				return IVisitor.CONTINUE_TRAVERSAL;
 			}
 		});

Modified: incubator/wicket/trunk/wicket/src/main/java/wicket/markup/html/internal/HeaderContainer.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/main/java/wicket/markup/html/internal/HeaderContainer.java?view=diff&rev=473228&r1=473227&r2=473228
==============================================================================
--- incubator/wicket/trunk/wicket/src/main/java/wicket/markup/html/internal/HeaderContainer.java (original)
+++ incubator/wicket/trunk/wicket/src/main/java/wicket/markup/html/internal/HeaderContainer.java Thu Nov  9 23:40:32 2006
@@ -24,8 +24,6 @@
 import wicket.Component;
 import wicket.MarkupContainer;
 import wicket.Page;
-import wicket.annot.OnBeforeRender;
-import wicket.annot.OnDetach;
 import wicket.markup.html.IHeaderResponse;
 import wicket.markup.html.WebMarkupContainer;
 
@@ -70,7 +68,7 @@
 		// including the page does have a <head> or <wicket:head> tag.
 		setRenderBodyOnly(true);
 	}
-	
+
 	/**
 	 * Ask all child components of the Page if they have something to contribute
 	 * to the &lt;head&gt; section of the HTML output. Every component
@@ -139,9 +137,10 @@
 	 * 
 	 * @see wicket.Component#onBeforeRender()
 	 */
-	@OnBeforeRender
+	@Override
 	protected void onBeforeRender()
 	{
+		super.onBeforeRender();
 		// not needed anymore, which is why it can be transient
 		this.componentsPerScope = null;
 	}
@@ -149,10 +148,11 @@
 	/**
 	 * @see wicket.Component#onDetach()
 	 */
-	@OnDetach
+	@Override
 	protected void onDetach()
 	{
 		this.componentsPerScope = null;
 		this.headerResponse = null;
+		super.onDetach();
 	}
 }

Modified: incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/FilePageStore.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/FilePageStore.java?view=diff&rev=473228&r1=473227&r2=473228
==============================================================================
--- incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/FilePageStore.java (original)
+++ incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/FilePageStore.java Thu Nov  9 23:40:32 2006
@@ -29,7 +29,6 @@
 
 import wicket.Application;
 import wicket.Page;
-import wicket.annot.AnnotationUtils;
 import wicket.protocol.http.SecondLevelCacheSessionStore.IPageStore;
 import wicket.util.lang.Objects;
 
@@ -151,7 +150,6 @@
 		// TODO check can this be called everytime at this place? Putting should
 		// be called after the rendering so it should be ok.
 		page.internalDetach();
-		AnnotationUtils.invokeOnDetachListeners(page);
 		byte[] bytes = Objects.objectToByteArray(page);
 		FileOutputStream fos = null;
 		try

Modified: incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/HttpSessionStore.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/HttpSessionStore.java?view=diff&rev=473228&r1=473227&r2=473228
==============================================================================
--- incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/HttpSessionStore.java (original)
+++ incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/HttpSessionStore.java Thu Nov  9 23:40:32 2006
@@ -33,7 +33,6 @@
 import wicket.Request;
 import wicket.Session;
 import wicket.WicketRuntimeException;
-import wicket.annot.AnnotationUtils;
 import wicket.util.lang.Bytes;
 
 /**
@@ -58,7 +57,6 @@
 			if (value instanceof Page)
 			{
 				((Page)value).internalDetach();
-				AnnotationUtils.invokeOnDetachListeners((Page)value);
 			}
 			String valueTypeName = (value != null ? value.getClass().getName() : "null");
 			try

Modified: incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/WebRequestCycle.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/WebRequestCycle.java?view=diff&rev=473228&r1=473227&r2=473228
==============================================================================
--- incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/WebRequestCycle.java (original)
+++ incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/WebRequestCycle.java Thu Nov  9 23:40:32 2006
@@ -29,7 +29,6 @@
 import wicket.Response;
 import wicket.RestartResponseAtInterceptPageException;
 import wicket.Session;
-import wicket.annot.AnnotationUtils;
 import wicket.markup.html.pages.BrowserInfoPage;
 import wicket.protocol.http.request.WebClientInfo;
 import wicket.request.IRequestCycleProcessor;
@@ -226,7 +225,6 @@
 			// Redirect page can touch its models already (via for example the
 			// constructors)
 			page.internalDetach();
-			AnnotationUtils.invokeOnDetachListeners(page);
 		}
 
 		if (redirectUrl == null)
@@ -293,6 +291,6 @@
 			return super.getRedirect();
 		}
 	}
-	
-	
+
+
 }

Modified: incubator/wicket/trunk/wicket/src/main/java/wicket/request/target/component/BookmarkablePageRequestTarget.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/main/java/wicket/request/target/component/BookmarkablePageRequestTarget.java?view=diff&rev=473228&r1=473227&r2=473228
==============================================================================
--- incubator/wicket/trunk/wicket/src/main/java/wicket/request/target/component/BookmarkablePageRequestTarget.java (original)
+++ incubator/wicket/trunk/wicket/src/main/java/wicket/request/target/component/BookmarkablePageRequestTarget.java Thu Nov  9 23:40:32 2006
@@ -21,7 +21,6 @@
 import wicket.Page;
 import wicket.PageParameters;
 import wicket.RequestCycle;
-import wicket.annot.AnnotationUtils;
 import wicket.request.IRequestCycleProcessor;
 
 /**
@@ -121,7 +120,6 @@
 		if (page != null)
 		{
 			page.internalDetach();
-			AnnotationUtils.invokeOnDetachListeners(page);
 		}
 	}
 

Modified: incubator/wicket/trunk/wicket/src/main/java/wicket/request/target/component/PageRequestTarget.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/main/java/wicket/request/target/component/PageRequestTarget.java?view=diff&rev=473228&r1=473227&r2=473228
==============================================================================
--- incubator/wicket/trunk/wicket/src/main/java/wicket/request/target/component/PageRequestTarget.java (original)
+++ incubator/wicket/trunk/wicket/src/main/java/wicket/request/target/component/PageRequestTarget.java Thu Nov  9 23:40:32 2006
@@ -20,7 +20,6 @@
 
 import wicket.Page;
 import wicket.RequestCycle;
-import wicket.annot.AnnotationUtils;
 
 /**
  * Default implementation of {@link IPageRequestTarget}. Target that denotes a
@@ -84,7 +83,6 @@
 	public void detach(RequestCycle requestCycle)
 	{
 		page.internalDetach();
-		AnnotationUtils.invokeOnDetachListeners(page);
 	}
 
 	/**

Modified: incubator/wicket/trunk/wicket/src/main/java/wicket/request/target/resource/ComponentResourceRequestTarget.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/main/java/wicket/request/target/resource/ComponentResourceRequestTarget.java?view=diff&rev=473228&r1=473227&r2=473228
==============================================================================
--- incubator/wicket/trunk/wicket/src/main/java/wicket/request/target/resource/ComponentResourceRequestTarget.java (original)
+++ incubator/wicket/trunk/wicket/src/main/java/wicket/request/target/resource/ComponentResourceRequestTarget.java Thu Nov  9 23:40:32 2006
@@ -23,7 +23,6 @@
 import wicket.RequestCycle;
 import wicket.RequestListenerInterface;
 import wicket.WicketRuntimeException;
-import wicket.annot.AnnotationUtils;
 
 /**
  * An implemenation of IRequestTarget that is used for the IResourceListener
@@ -82,7 +81,6 @@
 	public void detach(RequestCycle requestCycle)
 	{
 		page.internalDetach();
-		AnnotationUtils.invokeOnDetachListeners(page);
 	}
 
 	/**