com.raritantechnologies.searchApp.query.taglibrary
Class MultipleFieldQueriesSearchElementRenderer

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

public class MultipleFieldQueriesSearchElementRenderer
extends java.lang.Object
implements ISearchElementRenderer

Displays a Saved Query Form element that works in conjunction with one or more configurable IReadQueryModule SearchElementRenderers.

XML Configuration Template:
   <SearchElementRenderer 
         class="com.raritantechnologies.searchApp.query.taglibrary.MultipleFieldQueriesSearchElementRenderer"
         applicationName="[ application name ]"
         nameField="[ field to use for display name]"
         fieldSize="[ size of the field ]"
         buttonPos="[ button position left|right ]"
         showSave="[true|false]"
         preProcess="[true|false]"
         roleEnable="[true|false]"
         sortBy="[NAME|DATE|RESULTS]"
         sortDir="[asc|desc]"
         queryReaderName="[ name of IQueryResultSetReader system object ]" 
         queryWriterName="[ name of IQueryResultSetWriter system object]"
         fieldClass="[ css class of fields ]"
         headerClass="[ css class of header ]"
         tableInfo="[ table information ]"
         tableClass="[ css class of table ]"
         resultTableProps="[ result table attributes string]"
         outerTableProps="[ table attributes string or outer table]" >

     <!-- Alternate to using 'queryReaderName' attribute: describe query result set reader here -->
     <QueryReader class="[ class of com.raritantechnologies.searchApp.query.IQueryResultSetReader ]" >
        <!-- configuration parameters of IQueryResultSetReader -->
     </QueryReader>

     <!-- Alternate to using 'queryWriterName' attribute: describe query result set writer here -->
     <QueryWriter class="[ class of com.raritantechnologies.searchApp.query.IQueryResultSetWriter ]" >
        <!-- configuration parameters of IQueryResultSetWriter -->
     </QueryWriter>

     <!-- Set of request parameters that will be used to look up the saved queries -->
     <SearchParams>
       <!-- one or more Param elements -->
       <Param ID="[ param ID ]" />
     </SearchParams>

     <!-- One or more IReadQueryModules -->
     <DisplayField class="[ class of com.raritantechnologies.searchApp,query.taglibrary.IReadQueryModule]" >
       <!-- configuration parameters for display field module -->
     </DisplayField>

   </SearchElementRenderer>
 

Developed by Raritan Technologies Inc..

Author:
Chris Peterson

Field Summary
protected  java.lang.String action
           
static java.lang.String deSelectedQParam
           
protected  java.lang.String fieldClass
           
protected  java.lang.String headerClass
           
protected  java.lang.String outerTableProps
           
protected  boolean preProcess
           
static java.lang.String qSourcesParam
           
protected  java.lang.String queryField
           
protected  java.lang.String resultsTableProps
           
protected  boolean roleEnable
           
static java.lang.String selectedQParam
           
protected  boolean showSave
           
protected  java.lang.String tableClass
           
protected  java.lang.String tableInfo
           
 
Constructor Summary
MultipleFieldQueriesSearchElementRenderer()
           
 
Method Summary
 java.lang.String getBody(ISearchFormRenderer parent, RaritanPageContext pageContext)
          Returns the element html fragment.
protected  java.lang.String getHttpQuery(QueryResultBean qrb)
           
protected  IQueryResultSetReader getQueryResultSetReader()
           
 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.
 void initialize(org.w3c.dom.Element elem)
          Initialize renderer-specific parameters from the configuration XML tag.
 boolean isHidden(ISearchFormRenderer parent, RaritanPageContext pageContext)
           
protected  java.lang.String processResults(ISearchFormRenderer parent, java.util.Iterator it, RaritanPageContext pageContext)
           
 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
 

Field Detail

action

protected java.lang.String action

selectedQParam

public static final java.lang.String selectedQParam
See Also:
Constant Field Values

deSelectedQParam

public static final java.lang.String deSelectedQParam
See Also:
Constant Field Values

qSourcesParam

public static final java.lang.String qSourcesParam
See Also:
Constant Field Values

fieldClass

protected java.lang.String fieldClass

headerClass

protected java.lang.String headerClass

tableInfo

protected java.lang.String tableInfo

tableClass

protected java.lang.String tableClass

resultsTableProps

protected java.lang.String resultsTableProps

outerTableProps

protected java.lang.String outerTableProps

showSave

protected boolean showSave

preProcess

protected boolean preProcess

roleEnable

protected boolean roleEnable

queryField

protected java.lang.String queryField
Constructor Detail

MultipleFieldQueriesSearchElementRenderer

public MultipleFieldQueriesSearchElementRenderer()
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)
Description copied from interface: ISearchElementRenderer
Returns the element html fragment.

Specified by:
getBody in interface ISearchElementRenderer

isHidden

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

processResults

protected java.lang.String processResults(ISearchFormRenderer parent,
                                          java.util.Iterator it,
                                          RaritanPageContext pageContext)

getHttpQuery

protected java.lang.String getHttpQuery(QueryResultBean qrb)

getQueryResultSetReader

protected IQueryResultSetReader getQueryResultSetReader()

setEnable

public void setEnable(boolean enabled)
Description copied from interface: ISearchElementRenderer
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)
Description copied from interface: ISearchElementRenderer
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