public abstract class AbstractTransformerBehavior extends Behavior implements ITransformer
Behavior
which can be added to any component. It allows to post-process (transform) the
markup generated by the component.AbstractOutputTransformerContainer
,
Serialized FormConstructor and Description |
---|
AbstractTransformerBehavior() |
Modifier and Type | Method and Description |
---|---|
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 |
detach(Component component)
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.
|
bind, canCallListenerInterface, getStatelessHint, isEnabled, isTemporary, onComponentTag, onConfigure, onEvent, onException, onRemove, renderHead, unbind
protected BufferedWebResponse newResponse(WebResponse originalResponse)
originalResponse
- the original web response or null
if it isn't a WebResponse
public void beforeRender(Component component)
Behavior
beforeRender
in class Behavior
component
- the component that has this behavior coupledpublic void afterRender(Component component)
Behavior
afterRender
in class Behavior
component
- the component that has this behavior coupledpublic void detach(Component component)
Behavior
public abstract CharSequence transform(Component component, CharSequence output) throws Exception
ITransformer
transform
in interface ITransformer
component
- The associated Wicket componentoutput
- The markup generated by the child componentsException
Copyright © 2006–2014 Apache Software Foundation. All rights reserved.