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:
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
-
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 outputvoid
setRegion(java.lang.String region)
Set the region that we are expecting the number to be fromvoid
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
-
-
-
-
Field Detail
-
REVISION
public static final java.lang.String REVISION
- See Also:
- Constant Field Values
-
-
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 interfacejavax.servlet.jsp.tagext.IterationTag
- Overrides:
doAfterBody
in classjavax.servlet.jsp.tagext.BodyTagSupport
- Throws:
javax.servlet.jsp.JspException
-
doEndTag
public int doEndTag() throws javax.servlet.jsp.JspException
- Specified by:
doEndTag
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
doEndTag
in classjavax.servlet.jsp.tagext.BodyTagSupport
- Throws:
javax.servlet.jsp.JspException
-
-