All Implemented Interfaces:
Serializable, BodyTag, IterationTag, JspTag, Tag

public class TimeTag extends BodyTagSupport
Author:
AO Industries, Inc.
See Also:
  • Constructor Details

    • TimeTag

      public TimeTag()
  • Method Details

    • writeTimeJavascript

      public static void writeTimeJavascript(long date, Sequence sequence, Union_Palpable_Phrasing<?> content, Appendable scriptOut) throws IOException
      Writes a JavaScript script tag that a time in the user's locale.

      Because this needs to modify the DOM it can lead to poor performance or large data sets. To provide more performance options, the JavaScript is written to scriptOut. This could then be buffered into one long script to execute at once or using body.onload.

      The provided sequence should start at one for any given HTML page because parts of the script will only be written when the sequence is equal to one.

      Throws:
      IOException
      See Also:
    • writeTimeJavascript

      public static void writeTimeJavascript(Long date, Sequence sequence, Union_Palpable_Phrasing<?> content, Appendable scriptOut) throws IOException
      Writes a JavaScript script tag that a time in the user's locale. Prints nothing when the date is null.

      Because this needs to modify the DOM it can lead to poor performance or large data sets. To provide more performance options, the JavaScript is written to scriptOut. This could then be buffered into one long script to execute at once or using body.onload.

      The provided sequence should start at one for any given HTML page because parts of the script will only be written when the sequence is equal to one.

      Throws:
      IOException
      See Also:
    • writeTimeJavascript

      public static void writeTimeJavascript(Date date, Sequence sequence, Union_Palpable_Phrasing<?> content, Appendable scriptOut) throws IOException
      Writes a JavaScript script tag that a time in the user's locale. Prints nothing when the date is null.

      Because this needs to modify the DOM it can lead to poor performance or large data sets. To provide more performance options, the JavaScript is written to scriptOut. This could then be buffered into one long script to execute at once or using body.onload.

      The provided sequence should start at one for any given HTML page because parts of the script will only be written when the sequence is equal to one.

      Throws:
      IOException
      See Also:
    • doStartTag

      public int doStartTag() throws JspException
      Specified by:
      doStartTag in interface Tag
      Overrides:
      doStartTag in class BodyTagSupport
      Throws:
      JspException
    • doEndTag

      public int doEndTag() throws JspException
      Specified by:
      doEndTag in interface Tag
      Overrides:
      doEndTag in class BodyTagSupport
      Throws:
      JspException