Module org.apache.wicket.devutils
Class StatelessChecker
- java.lang.Object
-
- org.apache.wicket.devutils.stateless.StatelessChecker
-
- All Implemented Interfaces:
org.apache.wicket.application.IComponentOnBeforeRenderListener
public class StatelessChecker extends Object implements org.apache.wicket.application.IComponentOnBeforeRenderListener
Stateless checker. Checks if components withStatelessComponentannotation 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 inadvertently add a component to a page that internally uses stateful links, etc.- Author:
- Marat Radchenko
- See Also:
StatelessComponent
-
-
Constructor Summary
Constructors Constructor Description StatelessChecker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfail(StatelessCheckFailureException e)The given component claims to be stateless but isn't.protected booleanmustCheck(org.apache.wicket.Component component)Returnstrueif checker must check given component,falseotherwise.voidonBeforeRender(org.apache.wicket.Component component)
-
-
-
Method Detail
-
mustCheck
protected boolean mustCheck(org.apache.wicket.Component component)
Returnstrueif checker must check given component,falseotherwise.- Parameters:
component- component to check.- Returns:
trueif checker must check given component.
-
fail
protected void fail(StatelessCheckFailureException e)
The given component claims to be stateless but isn't.- Parameters:
e- StatelessCheckFailureException
-
onBeforeRender
public void onBeforeRender(org.apache.wicket.Component component)
- Specified by:
onBeforeRenderin interfaceorg.apache.wicket.application.IComponentOnBeforeRenderListener- See Also:
IComponentOnBeforeRenderListener.onBeforeRender(org.apache.wicket.Component)
-
-