You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by jr...@apache.org on 2010/11/02 17:24:06 UTC
svn commit: r1030109 -
/wicket/branches/wicket-1.4.x/wicket-devutils/src/main/java/org/apache/wicket/devutils/stateless/StatelessChecker.java
Author: jrthomerson
Date: Tue Nov 2 16:24:05 2010
New Revision: 1030109
URL: http://svn.apache.org/viewvc?rev=1030109&view=rev
Log:
make it possible to extend StatelessChecker with a custom strategy for determining what must be stateless
Modified:
wicket/branches/wicket-1.4.x/wicket-devutils/src/main/java/org/apache/wicket/devutils/stateless/StatelessChecker.java
Modified: wicket/branches/wicket-1.4.x/wicket-devutils/src/main/java/org/apache/wicket/devutils/stateless/StatelessChecker.java
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket-devutils/src/main/java/org/apache/wicket/devutils/stateless/StatelessChecker.java?rev=1030109&r1=1030108&r2=1030109&view=diff
==============================================================================
--- wicket/branches/wicket-1.4.x/wicket-devutils/src/main/java/org/apache/wicket/devutils/stateless/StatelessChecker.java (original)
+++ wicket/branches/wicket-1.4.x/wicket-devutils/src/main/java/org/apache/wicket/devutils/stateless/StatelessChecker.java Tue Nov 2 16:24:05 2010
@@ -44,7 +44,7 @@ public class StatelessChecker implements
* component to check.
* @return <code>true</code> if checker must check given component.
*/
- private static boolean mustCheck(final Component component)
+ protected boolean mustCheck(final Component component)
{
final StatelessComponent ann = component.getClass().getAnnotation(StatelessComponent.class);
return ann != null && ann.enabled();
@@ -55,13 +55,13 @@ public class StatelessChecker implements
*/
public void onBeforeRender(final Component component)
{
- if (StatelessChecker.mustCheck(component))
+ if (mustCheck(component))
{
final IVisitor<Component> visitor = new Component.IVisitor<Component>()
{
public Object component(final Component comp)
{
- if (component instanceof Page && StatelessChecker.mustCheck(comp))
+ if (component instanceof Page && mustCheck(comp))
{
// Do not go deeper, because this component will be checked by checker
// itself.