Class PhoneTag

  • All Implemented Interfaces:
    java.io.Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

    public class PhoneTag
    extends javax.servlet.jsp.tagext.BodyTagSupport
    Prints a phone number as HTML link, properly formatted with current site and logged member settings. Uses the RFC 3966 ("tel:" uri) as the anchor href, and the international format in the anchor body text.
    Since:
    jcms-9.0
    Version:
    $Revision: 130466 $
    See Also:
    PhoneNumberUtil.getPhoneHtml(String, String), Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String REVISION  
      • Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport

        bodyContent
      • Fields inherited from class javax.servlet.jsp.tagext.TagSupport

        id, pageContext
      • Fields inherited from interface javax.servlet.jsp.tagext.BodyTag

        EVAL_BODY_BUFFERED, EVAL_BODY_TAG
      • Fields inherited from interface javax.servlet.jsp.tagext.IterationTag

        EVAL_BODY_AGAIN
      • Fields inherited from interface javax.servlet.jsp.tagext.Tag

        EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
    • Constructor Summary

      Constructors 
      Constructor Description
      PhoneTag()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int doAfterBody()  
      int doEndTag()  
      void setCss​(java.lang.String css)
      Set the CSS class or classes to use in the generated HTML link.
      void setNumber​(java.lang.String number)
      Set the telephone number to be parsed and displayed properly for HTML output
      void setRegion​(java.lang.String region)
      Set the region that we are expecting the number to be from
      void setTitle​(java.lang.String title)
      Set the title to use (instead of the default value, the number being requested)
      • Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport

        doInitBody, doStartTag, getBodyContent, getPreviousOut, release, setBodyContent
      • Methods inherited from class javax.servlet.jsp.tagext.TagSupport

        findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.servlet.jsp.tagext.Tag

        getParent, setPageContext, setParent
    • Constructor Detail

      • PhoneTag

        public PhoneTag()
    • Method Detail

      • setNumber

        public void setNumber​(java.lang.String number)
        Set the telephone number to be parsed and displayed properly for HTML output
        Parameters:
        number - a telephone number
      • setRegion

        public void setRegion​(java.lang.String region)
        Set the region that we are expecting the number to be from
        Parameters:
        region - the ISO 3166-1 two-letter region code that denotes the region that we are expecting the number to be from. This is only used if the number being parsed is not written in international format.
      • setCss

        public void setCss​(java.lang.String css)
        Set the CSS class or classes to use in the generated HTML link.
        Parameters:
        css - one or more css classes, ignored if null or emtpy
        Since:
        jcms-10.0.2 / JCMS-6896
      • setTitle

        public void setTitle​(java.lang.String title)
        Set the title to use (instead of the default value, the number being requested)
        Parameters:
        title - a string to use a in title attribute of the generated link, ignored if null or emtpy
        Since:
        jcms-10.0.2 / JCMS-6895
      • doAfterBody

        public int doAfterBody()
                        throws javax.servlet.jsp.JspException
        Specified by:
        doAfterBody in interface javax.servlet.jsp.tagext.IterationTag
        Overrides:
        doAfterBody in class javax.servlet.jsp.tagext.BodyTagSupport
        Throws:
        javax.servlet.jsp.JspException
      • doEndTag

        public int doEndTag()
                     throws javax.servlet.jsp.JspException
        Specified by:
        doEndTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doEndTag in class javax.servlet.jsp.tagext.BodyTagSupport
        Throws:
        javax.servlet.jsp.JspException