Package org.appng.taglib.search
Class Searchable
- java.lang.Object
-
- javax.servlet.jsp.tagext.TagSupport
-
- javax.servlet.jsp.tagext.BodyTagSupport
-
- org.appng.taglib.search.Searchable
-
- 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 Searchable extends javax.servlet.jsp.tagext.BodyTagSupport
This class represents a Searchable Tag.
This tag is used to mark areas of a JSP as indexable/searchable. It can also be used to exclude certain areas form indexing/searching, for example the navigation of page. During indexing, aDocument
is being created from each indexed JSP. Attributes:- index - whether the body content should be indexed
- visible (true) - whether or not the body content should be displayed
- field - the name of the field
Document
can be set:- "title" - the title
- "contents" - the content
- "image" - a preview image
- "teaser" - a teaser text
- "date" - the date
<!-- set the 'title' field for this document --> <appNG:searchable index="true" field="title" visible="false">The Hitchhiker's Guide to the Galaxy</appNG:searchable> <!-- set the 'contents' field for this document --> <appNG:searchable index="true" field="contents" visible="true"> <div>The Hitchhiker's Guide to the Galaxy is a comedy science fiction series created by Douglas Adams.</div> <!-- skip some content --> <appNG:searchable index="false">content to be skipped...</appNG:searchable> </appNG:searchable>
- Author:
- Matthias Herlitzius
- See Also:
Document
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Searchable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
doAfterBody()
String
getField()
Boolean
getIndex()
Boolean
getVisible()
void
release()
void
setField(String field)
void
setIndex(Boolean index)
void
setVisible(Boolean visible)
-
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doEndTag, doInitBody, doStartTag, getBodyContent, getPreviousOut, setBodyContent
-
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
-
-
-
-
Method Detail
-
doAfterBody
public int doAfterBody()
- Specified by:
doAfterBody
in interfacejavax.servlet.jsp.tagext.IterationTag
- Overrides:
doAfterBody
in classjavax.servlet.jsp.tagext.BodyTagSupport
-
release
public void release()
- Specified by:
release
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
release
in classjavax.servlet.jsp.tagext.BodyTagSupport
-
getIndex
public Boolean getIndex()
-
setIndex
public void setIndex(Boolean index)
-
getVisible
public Boolean getVisible()
-
setVisible
public void setVisible(Boolean visible)
-
getField
public String getField()
-
setField
public void setField(String field)
-
-