org.apache.wicket.devutils.stateless
Class StatelessChecker

java.lang.Object
  extended by org.apache.wicket.devutils.stateless.StatelessChecker
All Implemented Interfaces:
IComponentOnBeforeRenderListener

public class StatelessChecker
extends Object
implements IComponentOnBeforeRenderListener

Stateless checker. Checks if components with StatelessComponent annotation are really stateless. This is a utility that is intended for use primarily during development. If you add an instance of this class to your application, it will check all components or pages marked with the StatelessComponent annotation to make sure that they are stateless as you intended. This is useful when trying to maintain stateless pages since it is very easy to inadvertantly add a component to a page that internally uses stateful links, etc.

Author:
Marat Radchenko
See Also:
StatelessComponent

Constructor Summary
StatelessChecker()
           
 
Method Summary
protected  boolean mustCheck(Component component)
          Returns true if checker must check given component, false otherwise.
 void onBeforeRender(Component component)
          Called when the component is about to be rendered
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatelessChecker

public StatelessChecker()
Method Detail

mustCheck

protected boolean mustCheck(Component component)
Returns true if checker must check given component, false otherwise.

Parameters:
component - component to check.
Returns:
true if checker must check given component.

onBeforeRender

public void onBeforeRender(Component component)
Description copied from interface: IComponentOnBeforeRenderListener
Called when the component is about to be rendered

Specified by:
onBeforeRender in interface IComponentOnBeforeRenderListener
Parameters:
component - the component that is about to be rendered
See Also:
IComponentOnBeforeRenderListener.onBeforeRender(org.apache.wicket.Component)


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.