com.raritantechnologies.searchApp.sourceMap.taglibrary
Class SourceMapTreeCheckboxSelector

java.lang.Object
  extended bycom.raritantechnologies.searchApp.sourceMap.taglibrary.SourceMapTreeCheckboxSelector
All Implemented Interfaces:
IConfigurable, ISearchElementRenderer

public class SourceMapTreeCheckboxSelector
extends java.lang.Object
implements ISearchElementRenderer

Triggers a source selection(s) using a set of checkboxes. Provides a list of sources suitable for processing by a ISourceMap. Works in coordination with the application SourceMap XML where category names are mapped to one or more search sources.

Should be used within a JSP SearchForm tag where the categoryName attribute is absent, because this renderer will set the category name HTTP request parameter.

XML Configuration Template:
   <SearchElementRenderer class="com.raritantechnologies.searchApp.sourceMap.taglibrary.SourceMapTreeCheckboxSelector"
                             fieldID="category(default)"
                             sourceMapName="[ name of source map ]"
                             sourceMapType="[ type of source map ]"
                             sourceMapTreeName="[ type of source map ]"
                             submitOnChange="true|false(default)"
                             allKeys"true|false(default) - select getAllSourceKeys method"
                             securityCheck="true|false(default) - check category names for user access (false if these are aliases)"
                             showDescription="left|right|top|bottom|flyover"
                             parentClass="[ css class of tree Root node ]"
                             childClass="[ css class of child node(s) ]"  >

      <TreeRenderer class="[ class of com.raritantechnologies.utils.tree.taglibrary.ITreeRenderer ]" >

      </TreeRenderer>

      <LabelRenderers sourceNameParam="[ parameter name to pass display name to renderer via RaritanPageContext ]" >

        <!-- One or more LabelRenderers -->
        <LabelRenderer class="[ class of com.raritantechnologies.searchApp.ICustomTag ]"
                          sourceNames="[ ALL | comma separated list of source names to use this label renderer with ]" >

        </LabelRenderer>

      </LabelRenderers>

   </SearchElementRenderer>
 

Developed by Raritan Technologies .

Author:
Ted Sullivan

Constructor Summary
SourceMapTreeCheckboxSelector()
           
 
Method Summary
 java.lang.String getBody(ISearchFormRenderer parent, RaritanPageContext pageContext)
          Builds a set of checkboxes that will cause an immediate source selection OR a source selection when the parent form is submitted.
 java.lang.String getConfigurationXML()
           
 void getConfigurationXML(java.io.Writer writer)
           
 ISearchElementRenderer getRenderer(java.lang.String name)
          Returns ISearchElementRenderer of this render or a nested renderer matching the name given or null if no match is found.
protected  ISourceMapTreeNode getSourceMapTree(RaritanPageContext pContext)
           
 void initialize(org.w3c.dom.Element elem)
          Initialize renderer-specific parameters from the configuration XML tag.
 boolean isHidden(ISearchFormRenderer parent, RaritanPageContext pageContext)
           
 void setDescription(java.lang.String sourceName, java.lang.String description)
           
 void setEnable(boolean enabled)
          Enable/Disable the renderer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceMapTreeCheckboxSelector

public SourceMapTreeCheckboxSelector()
Method Detail

initialize

public void initialize(org.w3c.dom.Element elem)
Description copied from interface: ISearchElementRenderer
Initialize renderer-specific parameters from the configuration XML tag.

Specified by:
initialize in interface ISearchElementRenderer

getBody

public java.lang.String getBody(ISearchFormRenderer parent,
                                RaritanPageContext pageContext)
Builds a set of checkboxes that will cause an immediate source selection OR a source selection when the parent form is submitted. Adds sourceMap parameters to the search form (dependent on the type of ISourceMap used by the application.)

Specified by:
getBody in interface ISearchElementRenderer

isHidden

public boolean isHidden(ISearchFormRenderer parent,
                        RaritanPageContext pageContext)
Specified by:
isHidden in interface ISearchElementRenderer

getSourceMapTree

protected ISourceMapTreeNode getSourceMapTree(RaritanPageContext pContext)

setEnable

public void setEnable(boolean enabled)
Enable/Disable the renderer. Disabled renderers are not included in the html output of an ISearchFormRenderer.

Specified by:
setEnable in interface ISearchElementRenderer

getRenderer

public ISearchElementRenderer getRenderer(java.lang.String name)
Returns ISearchElementRenderer of this render or a nested renderer matching the name given or null if no match is found.

Specified by:
getRenderer in interface ISearchElementRenderer

getConfigurationXML

public void getConfigurationXML(java.io.Writer writer)
                         throws java.io.IOException
Throws:
java.io.IOException

getConfigurationXML

public java.lang.String getConfigurationXML()

setDescription

public void setDescription(java.lang.String sourceName,
                           java.lang.String description)