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 17:07:15 UTC

svn commit: r516087 - /incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/customresourceloading/PageWithCustomLoading.java

Author: ehillenius
Date: Thu Mar  8 08:07:14 2007
New Revision: 516087

URL: http://svn.apache.org/viewvc?view=rev&rev=516087
Log:
extended example

Modified:
    incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/customresourceloading/PageWithCustomLoading.java

Modified: incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/customresourceloading/PageWithCustomLoading.java
URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/customresourceloading/PageWithCustomLoading.java?view=diff&rev=516087&r1=516086&r2=516087
==============================================================================
--- incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/customresourceloading/PageWithCustomLoading.java (original)
+++ incubator/wicket/branches/wicket-1.x/wicket-examples/src/main/java/wicket/examples/customresourceloading/PageWithCustomLoading.java Thu Mar  8 08:07:14 2007
@@ -1,18 +1,18 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
  * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
  */
 package wicket.examples.customresourceloading;
 
@@ -35,7 +35,8 @@
  */
 public class PageWithCustomLoading extends WicketExamplePage
 		implements
-			IMarkupResourceStreamProvider
+			IMarkupResourceStreamProvider,
+			IMarkupCacheKeyProvider
 {
 	/**
 	 * Constructor
@@ -70,6 +71,21 @@
 		}
 
 		// no resource was not found
+		return null;
+	}
+
+	/**
+	 * Prevent the markup from ever be cached. This is optionally - components
+	 * that don't implement {@link IMarkupCacheKeyProvider} will just have their
+	 * markup cached - but is useful when markup varies. If you don't need such
+	 * dynamic loading, it is advisible to not implement
+	 * {@link IMarkupCacheKeyProvider}.
+	 * 
+	 * @see wicket.markup.IMarkupCacheKeyProvider#getCacheKey(wicket.MarkupContainer,
+	 *      java.lang.Class)
+	 */
+	public CharSequence getCacheKey(MarkupContainer container, Class containerClass)
+	{
 		return null;
 	}
 }