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

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

    • DateTimeTag

      public DateTimeTag()
  • Method Details

    • writeDateTimeJavascript

      public static void writeDateTimeJavascript(long date, Sequence sequence, Union_Palpable_Phrasing<?> content, Appendable scriptOut) throws IOException
      Writes a JavaScript script tag that shows a date and 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:
    • writeDateTimeJavascript

      public static void writeDateTimeJavascript(Long date, Sequence sequence, Union_Palpable_Phrasing<?> content, Appendable scriptOut) throws IOException
      Writes a JavaScript script tag that shows a date and 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:
    • writeDateTimeJavascript

      public static void writeDateTimeJavascript(Date date, Sequence sequence, Union_Palpable_Phrasing<?> content, Appendable scriptOut) throws IOException
      Writes a JavaScript script tag that shows a date and 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