com.raritantechnologies.searchApp.sourceMap.taglibrary
Class SourceMapDropdownSelector

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

public class SourceMapDropdownSelector
extends java.lang.Object
implements ISearchElementRenderer

Triggers a source selection(s) using a dropdown list. 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.SourceMapDropdownSelector"
                             fieldID="category(default)"
                             sourceMapName="[ name of source map ]"
                             sourceMapType="[ type of source map ]"
                             multiSelect="true|false(default)"
                             size="[ number of selections to show ]"
                             submitOnChange="true|false(default)" 
                              allKeys"true|false(default) - select getAllSourceKeys method"
                             securityCheck="true|false(default) - check category names for user access (true if these are sourceNames)"  />
 

Developed by Raritan Technologies .

Author:
Ted Sullivan

Constructor Summary
SourceMapDropdownSelector()
           
 
Method Summary
 java.lang.String getBody(ISearchFormRenderer parent, RaritanPageContext pageContext)
          Builds a dropdown list of sources 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)
           
 java.lang.String getFieldID()
           
 boolean getMultiSelect()
           
 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.
 int getSize()
           
 java.lang.String getSourceMapName()
           
 java.lang.String getSourceMapType()
           
 boolean getSubmitOnChange()
           
 void initialize(org.w3c.dom.Element elem)
          Initialize renderer-specific parameters from the configuration XML tag.
 boolean isHidden(ISearchFormRenderer parent, RaritanPageContext pageContext)
           
 void setEnable(boolean enabled)
          Enable/Disable the renderer.
 void setFieldID(java.lang.String fieldID)
           
 void setMultiSelect(boolean multiSelect)
           
 void setSize(int size)
           
 void setSourceMapName(java.lang.String sourceMapName)
           
 void setSourceMapType(java.lang.String sourceMapType)
           
 void setSubmitOnChange(boolean submitOnChange)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceMapDropdownSelector

public SourceMapDropdownSelector()
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 dropdown list of sources 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

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

isHidden

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

setSourceMapName

public void setSourceMapName(java.lang.String sourceMapName)

getSourceMapName

public java.lang.String getSourceMapName()

setSourceMapType

public void setSourceMapType(java.lang.String sourceMapType)

getSourceMapType

public java.lang.String getSourceMapType()

setFieldID

public void setFieldID(java.lang.String fieldID)

getFieldID

public java.lang.String getFieldID()

setMultiSelect

public void setMultiSelect(boolean multiSelect)

getMultiSelect

public boolean getMultiSelect()

setSubmitOnChange

public void setSubmitOnChange(boolean submitOnChange)

getSubmitOnChange

public boolean getSubmitOnChange()

setSize

public void setSize(int size)

getSize

public int getSize()

getConfigurationXML

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

getConfigurationXML

public java.lang.String getConfigurationXML()