public class XsltTransformerBehavior extends AbstractTransformerBehavior
The containers tag will be the root element of the xml data applied for transformation to ensure
the xml data are well formed (single root element). In addition the attribute
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd is added
to the root element to allow the XSL processor to handle the wicket namespace.
The reason why the transformer can not be used to XSLT the ListViews output is because of the ListViews markup being reused for each ListItem. Please use a XsltOutputTransformerContainer instead. Note: if the ListView is used to print a list of <tr> tags, than the transformer container must enclose the <table> tag as well to be HTML compliant.
AbstractOutputTransformerContainer,
XsltOutputTransformerContainer,
Serialized Form| Constructor and Description |
|---|
XsltTransformerBehavior()
Construct.
|
XsltTransformerBehavior(String xslFilePath) |
| Modifier and Type | Method and Description |
|---|---|
void |
bind(Component component)
Bind this handler to the given component.
|
void |
onComponentTag(Component component,
ComponentTag tag)
Called any time a component that has this behavior registered is rendering the component tag.
|
CharSequence |
transform(Component component,
CharSequence output)
Will be invoked after all child components have been processed to allow for transforming the
markup generated.
|
afterRender, beforeRender, detach, newResponsecanCallListenerInterface, getStatelessHint, isEnabled, isTemporary, onConfigure, onEvent, onException, onRemove, renderHead, unbindpublic XsltTransformerBehavior()
public XsltTransformerBehavior(String xslFilePath)
xslFilePath - XsltTransformer.XsltTransformer(String)public void onComponentTag(Component component, ComponentTag tag)
BehavioronComponentTag in class Behaviorcomponent - the component that renders this tag currentlytag - the tag that is renderedpublic CharSequence transform(Component component, CharSequence output) throws Exception
ITransformertransform in interface ITransformertransform in class AbstractTransformerBehaviorcomponent - The associated Wicket componentoutput - The markup generated by the child componentsExceptionpublic void bind(Component component)
BehaviorCopyright © 2006–2014 Apache Software Foundation. All rights reserved.