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

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

    • DateTag

      public DateTag()
  • Method Details

    • writeDateJavascript

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

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

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