|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.behavior.AbstractBehavior
org.apache.wicket.markup.transformer.AbstractTransformerBehavior
public abstract class AbstractTransformerBehavior
A IBehavior which can be added to any component. It allows to post-process (transform) the markup generated by the component.
AbstractOutputTransformerContainer
,
Serialized FormConstructor Summary | |
---|---|
AbstractTransformerBehavior()
Construct. |
Method Summary | |
---|---|
void |
beforeRender(Component component)
Called when a component is about to render. |
void |
cleanup()
This method is called either by AbstractBehavior.onRendered(Component) or
AbstractBehavior.onException(Component, RuntimeException) AFTER they called their respective template
methods. |
protected Response |
newResponse()
Create a new response object which is used to store the markup generated by the child objects. |
void |
onComponentTag(Component component,
ComponentTag tag)
Called any time a component that has this behavior registered is rendering the component tag. |
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. |
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.AbstractBehavior |
---|
afterRender, bind, detach, detachModel, exception, getStatelessHint, isEnabled, isTemporary, onConfigure, rendered, renderHead |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractTransformerBehavior()
Method Detail |
---|
protected Response newResponse()
public void onComponentTag(Component component, ComponentTag tag)
IBehavior
onComponentTag
in interface IBehavior
onComponentTag
in class AbstractBehavior
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 beforeRender(Component component)
IBehavior
beforeRender
in interface IBehavior
beforeRender
in class AbstractBehavior
component
- the component that has this behavior coupledAbstractBehavior.beforeRender(org.apache.wicket.Component)
public void onRendered(Component component)
AbstractBehavior
onRendered
in class AbstractBehavior
component
- the component that has this behavior coupledAbstractBehavior.onRendered(org.apache.wicket.Component)
public void cleanup()
AbstractBehavior
AbstractBehavior.onRendered(Component)
or
AbstractBehavior.onException(Component, RuntimeException)
AFTER they called their respective template
methods. Override this template method to do any necessary cleanup.
cleanup
in class AbstractBehavior
AbstractBehavior.cleanup()
public void onException(Component component, RuntimeException exception)
AbstractBehavior
onException
in class AbstractBehavior
component
- the component that has a reference to this behavior and during which processing
the exception occurredexception
- the unexpected exceptionAbstractBehavior.onException(org.apache.wicket.Component,
java.lang.RuntimeException)
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 components
Exception
ITransformer.transform(org.apache.wicket.Component,
CharSequence)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |