Package org.deltava.taglib.content
Class BrowserFilterTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.deltava.taglib.BrowserInfoTag
org.deltava.taglib.content.BrowserFilterTag
- All Implemented Interfaces:
Serializable
,IterationTag
,JspTag
,Tag
A JSP tag to filter content based on the browser type.
- Since:
- 1.0
- Version:
- 10.0
- Author:
- Luke
- See Also:
-
Field Summary
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
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
-
Method Summary
Modifier and TypeMethodDescriptionint
doEndTag()
Closes the tag and releases state.int
Determines whether the enclosed content should be rendered to the JSP output stream.void
release()
void
setHtml4
(boolean showHTML4) Marks this content as visible to HTML4 users.void
setHtml5
(boolean showHTML5) Marks this content as visible to HTML5 users.void
setHuman
(boolean showHuman) Marks this content as only visible to humans.void
setMozilla
(boolean showMoz) Marks this content as visible to Mozilla/Firefox users.void
setOpera
(boolean showOpera) Marks this content as visible to Opera users.void
setWebKit
(boolean showWebKit) Marks this content as visible to WebKit/Safari/Chrome users.Methods inherited from class org.deltava.taglib.BrowserInfoTag
getBrowserContext
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
-
Constructor Details
-
BrowserFilterTag
public BrowserFilterTag()
-
-
Method Details
-
setWebKit
public void setWebKit(boolean showWebKit) Marks this content as visible to WebKit/Safari/Chrome users.- Parameters:
showWebKit
- TRUE if the content should be shown to WebKit users, otherwise FALSE
-
setOpera
public void setOpera(boolean showOpera) Marks this content as visible to Opera users.- Parameters:
showOpera
- TRUE if content should be shown to Opera users, otherwise FALSE
-
setMozilla
public void setMozilla(boolean showMoz) Marks this content as visible to Mozilla/Firefox users.- Parameters:
showMoz
- TRUE if the content should be shown to Mozilla users, otherwise FALSE
-
setHtml4
public void setHtml4(boolean showHTML4) Marks this content as visible to HTML4 users.- Parameters:
showHTML4
- TRUE if the content should be shown to HTML4 users, otherwise FALSE
-
setHtml5
public void setHtml5(boolean showHTML5) Marks this content as visible to HTML5 users.- Parameters:
showHTML5
- TRUE if the content should be shown to HTML5 users, otherwise FALSE
-
setHuman
public void setHuman(boolean showHuman) Marks this content as only visible to humans.- Parameters:
showHuman
- TRUE if not visible to bots, otherwise FALSE
-
doStartTag
public int doStartTag()Determines whether the enclosed content should be rendered to the JSP output stream.- Specified by:
doStartTag
in interfaceTag
- Overrides:
doStartTag
in classTagSupport
- Returns:
- TagSupport.EVAL_BODY_INCLUDE or TagSupport.SKIP_BODY
-
doEndTag
Closes the tag and releases state.- Specified by:
doEndTag
in interfaceTag
- Overrides:
doEndTag
in classTagSupport
- Returns:
- TagSupport.EVAL_PAGE
- Throws:
JspException
- never
-
release
public void release()- Specified by:
release
in interfaceTag
- Overrides:
release
in classTagSupport
-