org.apache.wicket.behavior
Class AbstractBehavior

java.lang.Object
  extended by org.apache.wicket.behavior.Behavior
      extended by org.apache.wicket.behavior.AbstractBehavior
All Implemented Interfaces:
java.io.Serializable, IClusterable, IComponentAwareEventSink, IComponentAwareHeaderContributor

Deprecated. extend Behavior instead

@Deprecated
public abstract class AbstractBehavior
extends Behavior

Adapter implementation of Behavior. It is recommended to extend from this class instead of directly implementing Behavior as this class has an extra cleanup() call.

Author:
Ralf Ebert, Eelco Hillenius
See Also:
Serialized Form

Constructor Summary
AbstractBehavior()
          Deprecated. Construct.
 
Method Summary
 void afterRender(Component component)
          Deprecated. Called when a component that has this behavior coupled was rendered.
 void cleanup()
          Deprecated. This method is called either by onRendered(Component) or onHandleException(Component, RuntimeException) AFTER they called their respective template methods.
 void onException(Component component, java.lang.RuntimeException exception)
          Deprecated. In case an unexpected exception happened anywhere between onComponentTag() and rendered(), onException() will be called for any behavior.
 void onHandleException(Component component, java.lang.RuntimeException exception)
          Deprecated. In case an unexpected exception happened anywhere between onComponentTag() and rendered(), onException() will be called for any behavior.
 void onRendered(Component component)
          Deprecated. Called when a component that has this behavior coupled was rendered.
 
Methods inherited from class org.apache.wicket.behavior.Behavior
beforeRender, bind, canCallListenerInterface, detach, getStatelessHint, isEnabled, isTemporary, onComponentTag, onConfigure, onEvent, renderHead, unbind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractBehavior

public AbstractBehavior()
Deprecated. 
Construct.

Method Detail

cleanup

public void cleanup()
Deprecated. 
This method is called either by onRendered(Component) or onHandleException(Component, RuntimeException) AFTER they called their respective template methods. Override this template method to do any necessary cleanup.


onException

public final void onException(Component component,
                              java.lang.RuntimeException exception)
Deprecated. 
Description copied from class: Behavior
In case an unexpected exception happened anywhere between onComponentTag() and rendered(), onException() will be called for any behavior. Typically, if you clean up resources in Behavior.afterRender(Component), you should do the same in the implementation of this method.

Overrides:
onException in class Behavior
Parameters:
component - the component that has a reference to this behavior and during which processing the exception occurred
exception - the unexpected exception
See Also:
Behavior.onException(org.apache.wicket.Component, java.lang.RuntimeException)

onHandleException

public void onHandleException(Component component,
                              java.lang.RuntimeException exception)
Deprecated. 
In case an unexpected exception happened anywhere between onComponentTag() and rendered(), onException() will be called for any behavior.

Parameters:
component - the component that has a reference to this behavior and during which processing the exception occurred
exception - the unexpected exception

onRendered

public void onRendered(Component component)
Deprecated. 
Called when a component that has this behavior coupled was rendered.

Parameters:
component - the component that has this behavior coupled

afterRender

public final void afterRender(Component component)
Deprecated. 
Description copied from class: Behavior
Called when a component that has this behavior coupled was rendered.

Overrides:
afterRender in class Behavior
Parameters:
component - the component that has this behavior coupled
See Also:
Behavior.afterRender(org.apache.wicket.Component)


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