org.apache.wicket.util.template
Class JavaScriptTemplate

java.lang.Object
  extended by org.apache.wicket.util.resource.AbstractResourceStream
      extended by org.apache.wicket.util.resource.AbstractStringResourceStream
          extended by org.apache.wicket.util.template.TextTemplate
              extended by org.apache.wicket.util.template.TextTemplateDecorator
                  extended by org.apache.wicket.util.template.JavaScriptTemplate
All Implemented Interfaces:
java.io.Closeable, java.io.Serializable, IClusterable, IResourceStream, IStringResourceStream, IModifiable

public final class JavaScriptTemplate
extends TextTemplateDecorator

Decorates a TextTemplate 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
JavaScriptTemplate(TextTemplate textTemplate)
          Constructor.
 
Method Summary
 java.lang.String getAfterTemplateContents()
          Retrieves the String to put after the actual template contents, for example:
 java.lang.String getBeforeTemplateContents()
          Retrieves the String to put before the actual template contents, for example:
 java.lang.String getString()
          Retrieves the String resource.
 TextTemplate interpolate(java.util.Map<java.lang.String,?> variables)
          This class decorates another TextTemplate 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 - a TextTemplate to decorate
Method Detail

getBeforeTemplateContents

public java.lang.String getBeforeTemplateContents()
Description copied from class: TextTemplateDecorator
Retrieves the String to put before the actual template contents, for example:
    <script type="text/javascript">
 

Specified by:
getBeforeTemplateContents in class TextTemplateDecorator
Returns:
the String to put before the actual template contents
See Also:
TextTemplateDecorator.getBeforeTemplateContents()

getAfterTemplateContents

public java.lang.String getAfterTemplateContents()
Description copied from class: TextTemplateDecorator
Retrieves the String to put after the actual template contents, for example:
    </script>
 

Specified by:
getAfterTemplateContents in class TextTemplateDecorator
Returns:
the String to put after the actual template contents
See Also:
TextTemplateDecorator.getAfterTemplateContents()

interpolate

public TextTemplate interpolate(java.util.Map<java.lang.String,?> variables)
This class decorates another TextTemplate class and so does not allow interpolation.

Specified by:
interpolate in class TextTemplate
Parameters:
variables - ignored
Returns:
this, for chaining purposes

getString

public java.lang.String getString()
Description copied from class: TextTemplate
Retrieves the String resource.

Overrides:
getString in class TextTemplateDecorator
Returns:
the String resource
See Also:
TextTemplate.getString()


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.