repo1.maven.org$maven2@org.apache.wicket$wicket@1.3.6
repo1.maven.org$maven2@org.apache.wicket$wicket@1.3.6@org$apache$wicket$behavior$IBehavior.java
file
oh
o
[]
package org.apache.wicket.behavior;
Behaviors are kind of plug-ins for Components. They allow to be added to a component and get
essential events forwarded by the component. they can be bound to a concrete component (using the
bind method is called when the behavior is attached), but they don't need to. They can modify the
components markup by changing the rendered ComponentTag. Behaviors can have their own models as
well, and they are notified when these are to be detached by the component.
It is recommended that you extend from AbstractBehavior
instead of directly implementing this interface.
Called when a component is about to render.
- Parameters:
component
the component that has this behavior coupled
Called when a component that has this behavior coupled was rendered.
- Parameters:
component
the component that has this behavior coupled
Bind this handler to the given component. This method is called by the host component
immediately after this behavior is added to it. This method is useful if you need to do
initialization based on the component it is attached and you can't wait to do it at render
time. Keep in mind that if you decide to keep a reference to the host component, it is not
thread safe anymore, and should thus only be used in situations where you do not reuse the
behavior for multiple components.
- Parameters:
component
the component to bind to
Allows the behavior to detach any state it has attached during request processing.
- Parameters:
component
the component that initiates the detachment of this 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
afterRender(org.apache.wicket.Component), you should do the same in the implementation of this
method.
- Parameters:
component
the component that has a reference to this behavior and during which processing
the exception occurredexception
the unexpected exception
This method returns false if the behavior generates a callback url (for example ajax
behaviors)
- Parameters:
component
the component that has this behavior coupled.- Returns:
- boolean true or false.
Called when a components is rendering and wants to render this behavior. If false is returned
this behavior will be ignored.
- Parameters:
component
the component that has this behavior coupled- Returns:
- true if this behavior must be executed/rendered
Called any time a component that has this behavior registered is rendering the component tag.
- Parameters:
component
the component that renders this tag currentlytag
the tag that is rendered
Specifies whether or not this behavior is temporary. Temporary behaviors are removed at the
end of request. Such behaviors are useful for modifying component rendering only when it
renders next. Usecases include javascript effects, initial clientside dom setup, etc.
- Returns:
- true if this behavior is temporary