Class XsltOutputTransformerContainer
java.lang.Object
org.apache.wicket.Component
org.apache.wicket.MarkupContainer
org.apache.wicket.markup.transformer.AbstractOutputTransformerContainer
org.apache.wicket.markup.transformer.XsltOutputTransformerContainer
- All Implemented Interfaces:
Serializable
,Iterable<Component>
,IEventSink
,IEventSource
,IFeedbackContributor
,IConverterLocator
,IMetadataContext<Serializable,
,Component> IHeaderContributor
,ITransformer
,IRequestableComponent
,IHierarchical<Component>
,IClusterable
A container which output markup will be processes by a XSLT processor prior to writing the output
into the web response. The *.xsl resource must be located in the same path as the nearest parent
with an associated markup and must have a filename equal to the component's id.
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.
Similar to this container, a IBehavior
is available which does the same, but does
not require an additional Container.
- Author:
- Juergen Donnerstag
- See Also:
-
Field Summary
Fields inherited from class org.apache.wicket.Component
ENABLE, FLAG_INITIALIZED, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER, RFLAG_CONTAINER_DEQUEING, RFLAG_CONTAINER_HAS_REMOVALS
-
Constructor Summary
ConstructorDescriptionConstructXsltOutputTransformerContainer
(String id, IModel<?> model) ConstructXsltOutputTransformerContainer
(String id, IModel<?> model, String xslFilePath) Instead of using the default mechanism to determine the associated XSL file, it is given by the user. -
Method Summary
Modifier and TypeMethodDescriptiontransform
(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.markup.transformer.AbstractOutputTransformerContainer
newResponse, onComponentTagBody, onRender, setTransformBodyOnly
Methods inherited from class org.apache.wicket.MarkupContainer
add, addDequeuedComponent, addOrReplace, autoAdd, canDequeueTag, contains, dequeue, dequeue, dequeuePreamble, findChildComponent, findComponentToDequeue, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, getRegionMarkup, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onDetach, onInitialize, queue, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, stream, streamChildren, toString, toString, visitChildren, visitChildren
Methods inherited from class org.apache.wicket.Component
add, addStateChange, beforeRender, canCallListener, canCallListenerAfterExpiry, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, clearOriginalDestination, configure, continueToOriginalDestination, createConverter, debug, detach, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessages, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMarkupTag, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnModelChanged, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isInitialized, isRenderAllowed, isRendering, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onAfterRender, onBeforeRender, onComponentTag, onConfigure, onEvent, onModelChanged, onModelChanging, onReAdd, onRemove, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderPart, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlForListener, urlForListener, visitParents, visitParents, warn, wrap
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
XsltOutputTransformerContainer
Instead of using the default mechanism to determine the associated XSL file, it is given by the user.- Parameters:
id
- the wicket:idmodel
- the model (unused)xslFilePath
- XSL input file path- See Also:
-
XsltOutputTransformerContainer
Construct- Parameters:
id
- the wicket:idmodel
- the model (unused)- See Also:
-
XsltOutputTransformerContainer
Construct- Parameters:
id
- the wicket:id- See Also:
-
-
Method Details
-
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
- Specified by:
transform
in classAbstractOutputTransformerContainer
- 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
-