com.raritantechnologies.quickstart.taglibrary
Class MimeTypeFieldRenderer
java.lang.Object
com.raritantechnologies.searchApp.taglibrary.BasicResultRenderer
com.raritantechnologies.quickstart.taglibrary.MimeTypeFieldRenderer
- All Implemented Interfaces:
- IConfigurable, IPreferencesBeanInfo, IResultRenderer
- public class MimeTypeFieldRenderer
- extends BasicResultRenderer
- implements IResultRenderer
Renders an image in place of a mime-type. Requires that the images for each mime-type are loaded into an
application 'images' directory.
XML Configuration Template:
<ResultRenderer
rendererClass="com.raritantechnologies.quickstart.taglibrary.MimeTypeFieldRenderer" >
<Field ID="Mime-Type" class="fontMed" />
</ResultRenderer>
The <Field> tag is used to specify which field in the result is to be used to provide the
value for the renderer.
Sample HTML output:
<img align="absmiddle" src="icon-pdf" >
Developed by
Raritan Technologies Inc..
- Author:
- Kepler Gelotte
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MimeTypeFieldRenderer
public MimeTypeFieldRenderer()
initialize
public void initialize(org.w3c.dom.Element elem)
- Description copied from interface:
IResultRenderer
- IResultRenderers are XML configurable.
- Specified by:
initialize in interface IResultRenderer- Overrides:
initialize in class BasicResultRenderer
doRenderResult
protected java.lang.String doRenderResult(IResult result,
int firstResult,
int lastResult,
int resultNum,
RaritanPageContext pageContext)
- Specified by:
doRenderResult in class BasicResultRenderer
setFieldID
public void setFieldID(java.lang.String fieldID)
getFieldID
public java.lang.String getFieldID()
setCssClass
public void setCssClass(java.lang.String cssClass)
getCssClass
public java.lang.String getCssClass()
getConfigurationXML
public void getConfigurationXML(java.io.Writer writer)
throws java.io.IOException
- Throws:
java.io.IOException
getConfigurationXML
public java.lang.String getConfigurationXML()
- Specified by:
getConfigurationXML in interface IResultRenderer
getConfigurationXML
public java.lang.String getConfigurationXML(java.lang.String configurationTemplate)
- Specified by:
getConfigurationXML in interface IResultRenderer