Class AbstractTransformerBehavior
- java.lang.Object
-
- org.apache.wicket.behavior.Behavior
-
- org.apache.wicket.markup.transformer.AbstractTransformerBehavior
-
- All Implemented Interfaces:
java.io.Serializable,IComponentAwareEventSink,IComponentAwareHeaderContributor,ITransformer,org.apache.wicket.util.io.IClusterable
- Direct Known Subclasses:
XsltTransformerBehavior
public abstract class AbstractTransformerBehavior extends Behavior implements ITransformer
ABehaviorwhich can be added to any component. It allows to post-process (transform) the markup generated by the component.- Author:
- Juergen Donnerstag
- See Also:
AbstractOutputTransformerContainer, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractTransformerBehavior()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidafterRender(Component component)Called when a component that has this behavior coupled was rendered.voidbeforeRender(Component component)Called when a component is about to render.voiddetach(Component component)Allows the behavior to detach any state it has attached during request processing.protected BufferedWebResponsenewResponse(org.apache.wicket.request.http.WebResponse originalResponse)Create a new response object which is used to store the markup generated by the child objects.abstract java.lang.CharSequencetransform(Component component, java.lang.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
-
-
-
-
Method Detail
-
newResponse
protected BufferedWebResponse newResponse(org.apache.wicket.request.http.WebResponse originalResponse)
Create a new response object which is used to store the markup generated by the child objects.- Parameters:
originalResponse- the original web response ornullif it isn't aWebResponse- Returns:
- Response object. Must not be null
-
beforeRender
public void beforeRender(Component component)
Description copied from class:BehaviorCalled when a component is about to render.- Overrides:
beforeRenderin classBehavior- Parameters:
component- the component that has this behavior coupled
-
afterRender
public void afterRender(Component component)
Description copied from class:BehaviorCalled when a component that has this behavior coupled was rendered.- Overrides:
afterRenderin classBehavior- Parameters:
component- the component that has this behavior coupled
-
detach
public void detach(Component component)
Description copied from class:BehaviorAllows the behavior to detach any state it has attached during request processing.
-
transform
public abstract java.lang.CharSequence transform(Component component, java.lang.CharSequence output) throws java.lang.Exception
Description copied from interface:ITransformerWill be invoked after all child components have been processed to allow for transforming the markup generated.- Specified by:
transformin 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:
java.lang.Exception
-
-