public class StatelessChecker extends Object implements IComponentOnBeforeRenderListener
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 inadvertently add
a component to a page that internally uses stateful links, etc.StatelessComponent
Constructor and Description |
---|
StatelessChecker() |
Modifier and Type | Method and Description |
---|---|
protected void |
fail(StatelessCheckFailureException e)
The given component claims to be stateless but isn't.
|
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
|
protected boolean mustCheck(Component component)
true
if checker must check given component, false
otherwise.component
- component to check.true
if checker must check given component.protected void fail(StatelessCheckFailureException e)
e
- StatelessCheckFailureExceptionpublic void onBeforeRender(Component component)
IComponentOnBeforeRenderListener
onBeforeRender
in interface IComponentOnBeforeRenderListener
component
- the component that is about to be renderedIComponentOnBeforeRenderListener.onBeforeRender(org.apache.wicket.Component)
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.