Module org.apache.wicket.core
Class AbstractTransformerBehavior
java.lang.Object
org.apache.wicket.behavior.Behavior
org.apache.wicket.markup.transformer.AbstractTransformerBehavior
- All Implemented Interfaces:
Serializable
,IComponentAwareEventSink
,IComponentAwareHeaderContributor
,ITransformer
,IClusterable
- Direct Known Subclasses:
XsltTransformerBehavior
A
Behavior
which can be added to any component. It allows to post-process (transform) the
markup generated by the component.- Author:
- Juergen Donnerstag
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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
Allows the behavior to detach any state it has attached during request processing.protected BufferedWebResponse
newResponse
(WebResponse originalResponse) Create a new response object which is used to store the markup generated by the child objects.abstract CharSequence
transform
(Component component, CharSequence output) Will be invoked after all child components have been processed to allow for transforming the markup generated.Methods inherited from class org.apache.wicket.behavior.Behavior
bind, canCallListener, getStatelessHint, isEnabled, isTemporary, onAttribute, onComponentTag, onConfigure, onEvent, onException, onRemove, onTag, renderHead, unbind
-
Constructor Details
-
AbstractTransformerBehavior
public AbstractTransformerBehavior()
-
-
Method Details
-
newResponse
Create a new response object which is used to store the markup generated by the child objects.- Parameters:
originalResponse
- the original web response ornull
if it isn't aWebResponse
- Returns:
- Response object. Must not be null
-
beforeRender
Description copied from class:Behavior
Called when a component is about to render.- Overrides:
beforeRender
in classBehavior
- Parameters:
component
- the component that has this behavior coupled
-
afterRender
Description copied from class:Behavior
Called when a component that has this behavior coupled was rendered.- Overrides:
afterRender
in classBehavior
- Parameters:
component
- the component that has this behavior coupled
-
detach
Description copied from class:Behavior
Allows the behavior to detach any state it has attached during request processing. -
transform
Description copied from interface:ITransformer
Will be invoked after all child components have been processed to allow for transforming the markup generated.- Specified by:
transform
in interfaceITransformer
- Parameters:
component
- The associated Wicket componentoutput
- The markup generated by the child components- Returns:
- The output which will be appended to the original response
- Throws:
Exception
-