Class NonCachingImage
- java.lang.Object
-
- org.apache.wicket.Component
-
- org.apache.wicket.markup.html.WebComponent
-
- org.apache.wicket.markup.html.image.Image
-
- org.apache.wicket.markup.html.image.NonCachingImage
-
- All Implemented Interfaces:
Serializable
,IEventSink
,IEventSource
,IFeedbackContributor
,IConverterLocator
,IMetadataContext<Serializable,Component>
,IRequestListener
,IHeaderContributor
,IRequestableComponent
,IHierarchical<Component>
,IClusterable
public class NonCachingImage extends Image
A subclass ofImage
that always adds random noise to the url every request to prevent the browser from caching the image.- Author:
- Igor Vaynberg (ivaynberg)
- See Also:
Image.shouldAddAntiCacheParameter()
, Serialized Form
-
-
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
Constructors Constructor Description NonCachingImage(String id)
Construct.NonCachingImage(String id, String string)
Construct.NonCachingImage(String id, IModel<?> model)
Construct.NonCachingImage(String id, IResource imageResource)
Construct.NonCachingImage(String id, ResourceReference resourceReference)
Construct.NonCachingImage(String id, ResourceReference resourceReference, PageParameters resourceParameters)
Construct.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
shouldAddAntiCacheParameter()
Overridden to prevent caching.-
Methods inherited from class org.apache.wicket.markup.html.image.Image
addAntiCacheParameter, buildSizesAttribute, buildSrcAttribute, buildSrcSetAttribute, canCallListener, getCrossOrigin, getImageResource, getImageResourceReference, getStatelessHint, initModel, onComponentTag, onComponentTagBody, onRequest, removeSizes, removeXValues, rendersPage, setCrossOrigin, setDefaultModel, setImageResource, setImageResourceReference, setImageResourceReference, setImageResourceReferences, setImageResources, setSizes, setXValues
-
Methods inherited from class org.apache.wicket.markup.html.WebComponent
getWebApplication, getWebPage, getWebRequest, getWebResponse, getWebSession, onRender
-
Methods inherited from class org.apache.wicket.Component
add, addStateChange, beforeRender, canCallListenerAfterExpiry, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, clearOriginalDestination, configure, continueToOriginalDestination, createConverter, debug, detach, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, get, 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, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, internalInitialize, internalOnModelChanged, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isInitialized, isRenderAllowed, isRendering, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onAfterRender, onBeforeRender, onConfigure, onDetach, onEvent, onInitialize, 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, toString, toString, urlFor, urlFor, urlFor, urlForListener, urlForListener, visitParents, visitParents, warn, wrap
-
-
-
-
Constructor Detail
-
NonCachingImage
public NonCachingImage(String id, IModel<?> model)
Construct.- Parameters:
id
-model
-- See Also:
Image(String, IModel)
-
NonCachingImage
public NonCachingImage(String id, IResource imageResource)
Construct.- Parameters:
id
-imageResource
-- See Also:
Image(String, IResource, IResource...)
-
NonCachingImage
public NonCachingImage(String id, ResourceReference resourceReference, PageParameters resourceParameters)
Construct.- Parameters:
id
-resourceReference
-resourceParameters
-- See Also:
Image(String, ResourceReference, PageParameters, ResourceReference...)
-
NonCachingImage
public NonCachingImage(String id, ResourceReference resourceReference)
Construct.- Parameters:
id
-resourceReference
-- See Also:
Image(String, ResourceReference, ResourceReference...)
-
NonCachingImage
public NonCachingImage(String id, String string)
Construct.- Parameters:
id
-string
-- See Also:
Image(String, String)
-
NonCachingImage
public NonCachingImage(String id)
Construct.- Parameters:
id
-- See Also:
Image(String)
-
-
Method Detail
-
shouldAddAntiCacheParameter
protected boolean shouldAddAntiCacheParameter()
Overridden to prevent caching.- Overrides:
shouldAddAntiCacheParameter
in classImage
- Returns:
- always
true
-
-