com.raritantechnologies.quickstart.taglibrary.forms
Class ResultAnnotatorRenderer
java.lang.Object
com.raritantechnologies.searchApp.taglibrary.BasicResultRenderer
com.raritantechnologies.quickstart.taglibrary.forms.ResultAnnotatorRenderer
- All Implemented Interfaces:
- IConfigurable, IPreferencesBeanInfo, IResultRenderer, ISessionDataHandler
- public class ResultAnnotatorRenderer
- extends BasicResultRenderer
- implements ISessionDataHandler, IResultRenderer
Enables annotation of results by creating a TextArea input that is updated to a database
when its "save" control is clicked.
Similar to CheckboxResultRenderer: requires a <form> that encloses the results.
Uses the com.raritantechologies.quickstart.userInterface.SetPersistentParameterServlet to
upload changes to the annotation which are then persisted to the database.
XML Configuration Template:
<ResultRenderer
rendererClass="com.raritantechnologies.quickstart.taglibrary.ResultAnnotatorRenderer"
connectionManager="[ name of Database ConnectionManager ]"
annotationTable="[ name of table with annotations ]"
annotationDBField="[ name of DB column with annotations ]"
annotationResultField="[ name of result field containing annotation ]"
formName="[ name of html form containing the annotation field ]"
inputType="[ TEXT | TEXTAREA ]"
inputWidth="[ size or columns ]"
inputHeight="[ rows (for TEXTAREA ) ]" >
<!-- List of fields used to construct the database key -->
<KeyFields>
<Field ID="[ name of result field ]" type="[ TEXT | INTEGER ]" />
<!-- etc... -->
</KeyFields>
</ResultRenderer>
Developed by
Raritan Technologies Inc..
- Author:
- Ted Sullivan
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResultAnnotatorRenderer
public ResultAnnotatorRenderer()
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
registerDataHandler
public void registerDataHandler(ISessionDataManager manager,
java.util.Map params)
- Description copied from interface:
ISessionDataHandler
- Register this SessionDataHandler with a SessionDataManager.
- Specified by:
registerDataHandler in interface ISessionDataHandler
- Parameters:
manager - The ISessionDataManager that this handler should register with by
calling manager.addSessionDataHandler( "handler name", this );params - Initialization parameters for this handler (typically obtained from
the Configuration layer.
handleSessionData
public void handleSessionData(java.util.Map sessionDataMap,
RaritanPageContext pageContext)
- Updates the annotation in the DB: gets the current value of the annotation and the
keyField data from the sessionDataMap ( ).
- Specified by:
handleSessionData in interface ISessionDataHandler
- Parameters:
sessionDataMap - The entire param=value map cached for the current user session. The
handler should update any of its params based on the current page
context.pageContext - The current page context. Contains request parameters that the
handler should use to update its and/or the SessionData's context.
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