Package org.apache.wicket.util.template
Class JavaScriptTemplate
- java.lang.Object
-
- org.apache.wicket.util.resource.AbstractResourceStream
-
- org.apache.wicket.util.resource.AbstractStringResourceStream
-
- org.apache.wicket.util.template.TextTemplate
-
- org.apache.wicket.util.template.TextTemplateDecorator
-
- org.apache.wicket.util.template.JavaScriptTemplate
-
- All Implemented Interfaces:
Closeable
,Serializable
,AutoCloseable
,IClusterable
,IResourceStream
,IStringResourceStream
,IModifiable
public final class JavaScriptTemplate extends TextTemplateDecorator
Decorates aTextTemplate
with JavaScript tags.- Since:
- 1.2.6
- Author:
- Eelco Hillenius
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.wicket.util.template.TextTemplateDecorator
decorated
-
Fields inherited from class org.apache.wicket.util.resource.AbstractStringResourceStream
DEFAULT_CONTENT_TYPE
-
-
Constructor Summary
Constructors Constructor Description JavaScriptTemplate(TextTemplate textTemplate)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAfterTemplateContents()
Retrieves theString
to put after the actual template contents, for example:String
getBeforeTemplateContents()
Retrieves theString
to put before the actual template contents, for example:String
getString()
Retrieves theString
resource.TextTemplate
interpolate(Map<String,?> variables)
This class decorates anotherTextTemplate
class and so does not allow interpolation.-
Methods inherited from class org.apache.wicket.util.template.TextTemplateDecorator
asString, asString, close, equals, getContentType, getInputStream, getLocale, hashCode, lastModifiedTime, setCharset, setLastModified, setLocale, toString
-
Methods inherited from class org.apache.wicket.util.resource.AbstractStringResourceStream
getCharset, length
-
Methods inherited from class org.apache.wicket.util.resource.AbstractResourceStream
getStyle, getVariation, setStyle, setVariation
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.wicket.util.resource.IResourceStream
getStyle, getVariation, setStyle, setVariation
-
-
-
-
Constructor Detail
-
JavaScriptTemplate
public JavaScriptTemplate(TextTemplate textTemplate)
Constructor.- Parameters:
textTemplate
- aTextTemplate
to decorate
-
-
Method Detail
-
getBeforeTemplateContents
public String getBeforeTemplateContents()
Description copied from class:TextTemplateDecorator
Retrieves theString
to put before the actual template contents, for example:<script type="text/javascript">
- Specified by:
getBeforeTemplateContents
in classTextTemplateDecorator
- Returns:
- the
String
to put before the actual template contents - See Also:
TextTemplateDecorator.getBeforeTemplateContents()
-
getAfterTemplateContents
public String getAfterTemplateContents()
Description copied from class:TextTemplateDecorator
Retrieves theString
to put after the actual template contents, for example:</script>
- Specified by:
getAfterTemplateContents
in classTextTemplateDecorator
- Returns:
- the
String
to put after the actual template contents - See Also:
TextTemplateDecorator.getAfterTemplateContents()
-
interpolate
public TextTemplate interpolate(Map<String,?> variables)
This class decorates anotherTextTemplate
class and so does not allow interpolation.- Specified by:
interpolate
in classTextTemplate
- Parameters:
variables
- ignored- Returns:
this
, for chaining purposes
-
getString
public String getString()
Description copied from class:TextTemplate
Retrieves theString
resource.- Overrides:
getString
in classTextTemplateDecorator
- Returns:
- the
String
resource
-
-