Package com.jalios.jcms.taglib
Class PhoneTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
com.jalios.jcms.taglib.PhoneTag
- All Implemented Interfaces:
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
- See Also:
-
Field Summary
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContentFields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContextFields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAGFields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintdoEndTag()voidSet the CSS class or classes to use in the generated HTML link.voidSet the telephone number to be parsed and displayed properly for HTML outputvoidSet the region that we are expecting the number to be fromvoidSet 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, setBodyContentMethods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
-
Constructor Details
-
PhoneTag
public PhoneTag()
-
-
Method Details
-
setNumber
Set the telephone number to be parsed and displayed properly for HTML output- Parameters:
number- a telephone number
-
setRegion
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
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
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:
doAfterBodyin interfacejavax.servlet.jsp.tagext.IterationTag- Overrides:
doAfterBodyin classjavax.servlet.jsp.tagext.BodyTagSupport- Throws:
javax.servlet.jsp.JspException
-
doEndTag
public int doEndTag() throws javax.servlet.jsp.JspException- Specified by:
doEndTagin interfacejavax.servlet.jsp.tagext.Tag- Overrides:
doEndTagin classjavax.servlet.jsp.tagext.BodyTagSupport- Throws:
javax.servlet.jsp.JspException
-