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.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
 
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:
 TextTemplate interpolate(java.util.Map 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, getString, hashCode, lastModifiedTime, length, setCharset, setLastModified, setLocale, toString
 
Methods inherited from class org.apache.wicket.util.resource.AbstractResourceStream
getCharset
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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 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


Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.