|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.behavior.AbstractBehavior
public abstract class AbstractBehavior
Adapter implementation of IBehavior
. It is recommended to
extend from this class instead of directly implementing
IBehavior
as this class has an extra cleanup()
call.
Constructor Summary | |
---|---|
AbstractBehavior()
Construct. |
Method Summary | |
---|---|
void |
afterRender(Component component)
Called when a component that has this behavior coupled was rendered. |
void |
beforeRender(Component component)
Called when a component is about to render. |
void |
bind(Component component)
Bind this handler to the given component. |
void |
cleanup()
This method is called either by onRendered(Component) or
onException(Component, RuntimeException) AFTER they called their respective template
methods. |
void |
detach(Component component)
Allows the behavior to detach any state it has attached during request processing. |
void |
detachModel(Component component)
Deprecated. replaced by detach(Component) |
void |
exception(Component component,
RuntimeException exception)
In case an unexpected exception happened anywhere between onComponentTag() and rendered(), onException() will be called for any behavior. |
boolean |
getStatelessHint(Component component)
This method returns false if the behavior generates a callback url (for example ajax behaviors) |
boolean |
isEnabled(Component component)
Called when a components is rendering and wants to render this behavior. |
boolean |
isTemporary()
Specifies whether or not this behavior is temporary. |
void |
onComponentTag(Component component,
ComponentTag tag)
Called any time a component that has this behavior registered is rendering the component tag. |
void |
onConfigure(Component component)
Called immediately after the onConfigure method in a component. |
void |
onException(Component component,
RuntimeException exception)
In case an unexpected exception happened anywhere between onComponentTag() and rendered(), onException() will be called for any behavior. |
void |
onRendered(Component component)
Called when a component that has this behavior coupled was rendered. |
void |
rendered(Component component)
Deprecated. replaced by afterRender(Component) |
void |
renderHead(IHeaderResponse response)
Render to the web response whatever the component wants to contribute to the head section. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractBehavior()
Method Detail |
---|
public void beforeRender(Component component)
IBehavior
beforeRender
in interface IBehavior
component
- the component that has this behavior coupledIBehavior.beforeRender(org.apache.wicket.Component)
public void bind(Component component)
IBehavior
bind
in interface IBehavior
component
- the component to bind toIBehavior.bind(org.apache.wicket.Component)
public void cleanup()
onRendered(Component)
or
onException(Component, RuntimeException)
AFTER they called their respective template
methods. Override this template method to do any necessary cleanup.
public void detach(Component component)
IBehavior
detach
in interface IBehavior
component
- the component that initiates the detachment of this behaviorIBehavior.detach(Component)
public final void exception(Component component, RuntimeException exception)
IBehavior
IBehavior.afterRender(Component)
, you should do the same in the implementation of this method.
exception
in interface IBehavior
component
- the component that has a reference to this behavior and during which processing
the exception occurredexception
- the unexpected exceptionIBehavior.exception(org.apache.wicket.Component,
java.lang.RuntimeException)
public boolean getStatelessHint(Component component)
IBehavior
getStatelessHint
in interface IBehavior
component
- the component that has this behavior coupled.
IBehavior.getStatelessHint(org.apache.wicket.Component)
public void onComponentTag(Component component, ComponentTag tag)
IBehavior
onComponentTag
in interface IBehavior
component
- the component that renders this tag currentlytag
- the tag that is renderedIBehavior.onComponentTag(org.apache.wicket.Component,
org.apache.wicket.markup.ComponentTag)
public void onException(Component component, RuntimeException exception)
component
- the component that has a reference to this behavior and during which processing
the exception occurredexception
- the unexpected exceptionpublic void onRendered(Component component)
component
- the component that has this behavior coupledpublic final void afterRender(Component component)
IBehavior
afterRender
in interface IBehavior
component
- the component that has this behavior coupledIBehavior.afterRender(org.apache.wicket.Component)
public void renderHead(IHeaderResponse response)
IHeaderContributor
renderHead
in interface IHeaderContributor
response
- Response objectIHeaderContributor.renderHead(org.apache.wicket.markup.html.IHeaderResponse)
public boolean isEnabled(Component component)
IBehavior
isEnabled
in interface IBehavior
component
- the component that has this behavior coupled
IBehavior.isEnabled(Component)
public boolean isTemporary()
IBehavior
isTemporary
in interface IBehavior
IBehavior.isTemporary()
public void onConfigure(Component component)
IComponentConfigurationBehavior
onConfigure
in interface IComponentConfigurationBehavior
component
- the component being configuredorg.apache.wicket.behavior.IComponentConfigurationBehavior#postConfigure(org.apache.wicket.Component)
@Deprecated public final void detachModel(Component component)
detach(Component)
component
- @Deprecated public final void rendered(Component component)
afterRender(Component)
component
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |