com.raritantechnologies.quickstart.taglibrary.ajax
Class AjaxDisplayForm

java.lang.Object
  extended byBodyTagSupport
      extended bycom.raritantechnologies.searchApp.taglibrary.DisplayForm
          extended bycom.raritantechnologies.quickstart.taglibrary.ajax.AjaxDisplayForm
All Implemented Interfaces:
IConfigurable, ICustomTag

public class AjaxDisplayForm
extends DisplayForm

Implements an Asynchronous Javascript - XML (AJAX) based search DisplayForm. Initiates a SearchDispatcher to monitor the progress of the search. Creates a hidden <iframe> that contains a request to a com.raritantechnologies.quickstart.taglibrary.ajax.SearchServlet which will provide status information and data page refreshes in coordination with the SearchDispatcher.

JSP Custom Tag options
   <ajax:AjaxDisplayForm
           dispatcherName="[ unique name of the cached SearchDispatcher instance ]" 
           proxyDispatcherName="[ optional name of secondary or proxy SearchDispatcher ]"
           refreshInterval="[ page refresh interval (in milliseconds) ]"
           needsEnable="[ true|false(default) - if true http request must include 'enableAJAX=true' if not enabled acts as normal DisplayForm ]"
           sourceType="[ optional fixed source type ]"
           sourceCategory="[ search source category (for single source applications ) ]"
           displayFormRendererName="[ name of the DisplayForm in the main Configuration XML ]"
           fieldFormatterName="[ name of the IFieldFormatter system object in the main Configuration XML ]"
           numFormatThreads="[ number of threads to devote to formatting (default = 1) ]"
           formatNeedsEnable="[ true|false(default) - if true http request must include 'enableFormat=true' to turn formatting on ]"
           servletName="[ optional name of AjaxServlet that will handle updates (default is 'AjaxServlet') must be coordinated with web.xml ]"
           resultSetProcessorName="[ name of IResultSetProcessor system object used to filter result sets ]"
           cachedResultsName="[ optional name of cached result set ]"
           requestParams="[ comma separated list of http request params that should be forwarded to the SearchDispatcher ]"
           pageSize="10"
           minimumDisplayStatus="[ 0 - 5 sets minimum display status for result display (default is RESULTS_AVAILABLE = 2)]"
           maximumDisplayStatus="[ maximum SearchDispatcher status for result display (optional) -used to override default if redisplay on formatting is needed ]"
           statusPageRenderers="[ comma separated list of status number = page renderer name ]"
           activeDisplayParam="[ request parameter used to determine if the display form is active ]"
           activeDisplayKey="[ valid value of activeDisplayparam or 'NULL' if activeDisplayParam should be absent ]"
           pageLinkFormLocation="[ location of page link form (top | bottom) ]"
           pageAction="[ base hyperlink action (jsp page) for page links ]"
           ignoreFormTypes="[ comma separated list of formType requests that should be ignored by redisplaying previous results ]" />

 

Proxy SearchDispatcher


Developed by Raritan Technologies Inc..

Author:
Ted Sullivan
See Also:
Serialized Form

Field Summary
static java.lang.String disableAJAX
           
static java.lang.String enableAJAX
           
static java.lang.String enableFormat
           
 
Fields inherited from class com.raritantechnologies.searchApp.taglibrary.DisplayForm
activeDisplayKey, activeDisplayParam, categoryParam, DEFAULT_PAGE_SIZE, formName, ignoreFormTypes, noResultString, pageNum, pageNumParam, pageSize, queryFieldFilters, resultSetKey, searchFormTypes, searchParameters, sourceTypeParam, userQueryParams
 
Constructor Summary
AjaxDisplayForm()
           
 
Method Summary
 java.lang.String getBody(RaritanPageContext rpc)
          Renders the results display form given a search request encoded within the RaritanPageContext.
 IFieldFormatter getFieldFormatter()
           
 IResultSetFilter getResultSetFilter()
           
 IResultSetProcessor getResultSetProcessor()
           
protected  java.lang.String getSourceCategory(RaritanPageContext pageContext)
           
protected  java.lang.String getSourceType(RaritanPageContext pageContext)
           
 void setCachedResultsName(java.lang.String cachedResultsName)
           
 void setCategory(java.lang.String category)
           
 void setDispatcherName(java.lang.String searchName)
           
 void setDisplayFormRendererName(java.lang.String displayFormRendererName)
           
 void setFieldFormatterName(java.lang.String fieldFormatterName)
           
 void setFormatNeedsEnable(java.lang.String needsEnableSt)
          formatNeedsEnable enables format switching with a request parameter 'enableFormat='true'
 void setFormName(java.lang.String formName)
          formName is the name specified in the <DisplayForm> tag of the configuration XML
 void setGetContent(java.lang.String getContentSt)
          Set the getContent flag - if 'true' getBody will return the current formatted results.
 void setIntermediatePageTemplateFile(java.lang.String intermediatePageTemplateFile)
          sets a file path to a file with an HTML template for intermediate results.
 void setMaximumDisplayStatus(java.lang.String maximumDisplayStatus)
           
 void setMinimumDisplayStatus(java.lang.String minimumDisplayStatus)
           
 void setNeedsEnable(java.lang.String needsEnableSt)
          Determines if use of AJAX needs to be enabled by a request parameter 'enableAJAX=true'
 void setNumFormatThreads(java.lang.String nFormatters)
           
 void setPageAction(java.lang.String pageAction)
           
 void setPageLinkFormLocation(java.lang.String pageLinkFormLocation)
           
 void setPageLoadVariables(java.lang.String pageLoadVariables)
          Comma separated list of javascript variables that need to be copied to the main window.
 void setProxyDispatcherName(java.lang.String proxyDispatcherName)
          Sets the name of the Proxy SearchDispatcher.
 void setRefreshInterval(java.lang.String refreshIvl)
           
 void setRequestParams(java.lang.String requestParams)
          Set the list of request parameters that should be sent to the AjaxServlet..
 void setResultSetFilterName(java.lang.String resultSetFilterName)
           
 void setResultSetProcessorName(java.lang.String resultSetProcessorName)
           
 void setServletName(java.lang.String ajaxServletName)
           
 void setSourceType(java.lang.String sourceType)
           
 void setStatusPageRenderers(java.lang.String pageImportRenderers)
          Sets the page import renderers map for different status levels.
 
Methods inherited from class com.raritantechnologies.searchApp.taglibrary.DisplayForm
doAfterBody, doStartTag, getBody, getCachedResultSet, getCachedResultSet, getDisplayFormRenderer, getDisplayFormRenderer, getDisplayRenderer, getFormName, getInstance, getNewResultSet, getPageNum, getPageNum, getPageNum, getPageNum, getpageSize, getPageSize, getPageSize, getResults, getResults, getResults, getResults, getResultSetKey, getResultSetKey, getResultSetKey, getResultSetKey, getSearchFormName, getSessionData, ignoreFormType, initialize, initialize, setActiveDisplayKey, setActiveDisplayParam, setCachedResultSet, setCategoryParam, setIgnoreFormTypes, setNoResultsMessage, setPageNumParam, setPageSize, setResultSetKey, setResultSetKey, setSearchFormName, setSearchFormTypes, setSearchParameters, setSourceTypeParam, setUseCache, setUserQueryParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

enableAJAX

public static java.lang.String enableAJAX

enableFormat

public static java.lang.String enableFormat

disableAJAX

public static java.lang.String disableAJAX
Constructor Detail

AjaxDisplayForm

public AjaxDisplayForm()
Method Detail

setDispatcherName

public void setDispatcherName(java.lang.String searchName)

setSourceType

public void setSourceType(java.lang.String sourceType)

setCategory

public void setCategory(java.lang.String category)

setNumFormatThreads

public void setNumFormatThreads(java.lang.String nFormatters)

setRequestParams

public void setRequestParams(java.lang.String requestParams)
Set the list of request parameters that should be sent to the AjaxServlet..


setGetContent

public void setGetContent(java.lang.String getContentSt)
Set the getContent flag - if 'true' getBody will return the current formatted results. using the current DisplayFormRenderer.


setNeedsEnable

public void setNeedsEnable(java.lang.String needsEnableSt)
Determines if use of AJAX needs to be enabled by a request parameter 'enableAJAX=true'


setFormatNeedsEnable

public void setFormatNeedsEnable(java.lang.String needsEnableSt)
formatNeedsEnable enables format switching with a request parameter 'enableFormat='true'


setPageLoadVariables

public void setPageLoadVariables(java.lang.String pageLoadVariables)
Comma separated list of javascript variables that need to be copied to the main window. Format [hiddenField1]=[parentField1]|[hiddenfield2]=[parentField2]|etc...


setServletName

public void setServletName(java.lang.String ajaxServletName)

setProxyDispatcherName

public void setProxyDispatcherName(java.lang.String proxyDispatcherName)
Sets the name of the Proxy SearchDispatcher. Proxy dispatcher are used to "multiplex" the results of a single SearchDispatcher operation (multiple frames / search event ).


setCachedResultsName

public void setCachedResultsName(java.lang.String cachedResultsName)
Overrides:
setCachedResultsName in class DisplayForm

setMinimumDisplayStatus

public void setMinimumDisplayStatus(java.lang.String minimumDisplayStatus)

setMaximumDisplayStatus

public void setMaximumDisplayStatus(java.lang.String maximumDisplayStatus)

setPageLinkFormLocation

public void setPageLinkFormLocation(java.lang.String pageLinkFormLocation)

setPageAction

public void setPageAction(java.lang.String pageAction)

getBody

public java.lang.String getBody(RaritanPageContext rpc)
Description copied from class: DisplayForm
Renders the results display form given a search request encoded within the RaritanPageContext. Key input parameters:
  • formType - determines whether the input is a "search" command or other (paging etc.)
  • pageSize - determines the current page size for the displayed result set.
  • sourceType - determines (together with category) the type of source map that will be searched.
  • category - determines (together with sourceType) the source that will be searched.

Specified by:
getBody in interface ICustomTag
Overrides:
getBody in class DisplayForm

setFieldFormatterName

public void setFieldFormatterName(java.lang.String fieldFormatterName)

setDisplayFormRendererName

public void setDisplayFormRendererName(java.lang.String displayFormRendererName)

setResultSetFilterName

public void setResultSetFilterName(java.lang.String resultSetFilterName)

setResultSetProcessorName

public void setResultSetProcessorName(java.lang.String resultSetProcessorName)

setStatusPageRenderers

public void setStatusPageRenderers(java.lang.String pageImportRenderers)
Sets the page import renderers map for different status levels. format: [status]=[Page Renderer Name],[status]=[Page Renderer Name],(etc...)


setIntermediatePageTemplateFile

public void setIntermediatePageTemplateFile(java.lang.String intermediatePageTemplateFile)
sets a file path to a file with an HTML template for intermediate results. The template should have {STATUS} and {RESULTS} sections to indicate where the current status section and search results sections should go respectively.


setRefreshInterval

public void setRefreshInterval(java.lang.String refreshIvl)

getFieldFormatter

public IFieldFormatter getFieldFormatter()

getResultSetFilter

public IResultSetFilter getResultSetFilter()

getResultSetProcessor

public IResultSetProcessor getResultSetProcessor()

getSourceCategory

protected java.lang.String getSourceCategory(RaritanPageContext pageContext)
Overrides:
getSourceCategory in class DisplayForm

getSourceType

protected java.lang.String getSourceType(RaritanPageContext pageContext)
Overrides:
getSourceType in class DisplayForm

setFormName

public void setFormName(java.lang.String formName)
Description copied from class: DisplayForm
formName is the name specified in the <DisplayForm> tag of the configuration XML

Overrides:
setFormName in class DisplayForm