com.raritantechnologies.searchApp.taglibrary
Class PopupSearchFormRenderer

java.lang.Object
  extended bycom.raritantechnologies.searchApp.taglibrary.PopupSearchFormRenderer
All Implemented Interfaces:
IConfigurable, ISearchFormRenderer

public class PopupSearchFormRenderer
extends java.lang.Object
implements ISearchFormRenderer

Composite SearchFormRenderer that generates a SearchForm within a Popup Window - communicates with parent window (opener) via SetParams and opener OK and Cancel scripts.

XML Configuration Template:
 <SearchForm rendererClass="com.raritantechnologies.searchApp.taglibrary.PopupSearchFormRenderer" >

    <SearchFormRenderer class="[ class of com.raritantechnologies.searchApp.taglibrary.ISearchFormRenderer ]" >

    </SearchFormRenderer>

 </SearchForm>
 

Developed by Raritan Technologies .

Author:
Ted Sullivan

Field Summary
 
Fields inherited from interface com.raritantechnologies.searchApp.taglibrary.ISearchFormRenderer
CLEAR, PAGE, PAGE_NUM, PAGE_SIZE, RESET, SEARCH
 
Constructor Summary
PopupSearchFormRenderer()
           
 
Method Summary
 void addAfterFormData(java.lang.String afterFormData)
           
 void addFormScript(java.lang.String scriptName, java.lang.String script)
          Adds a section of javascript to the form.
 void addHiddenField(java.lang.String fieldName, java.lang.String fieldValue)
          Adds a hidden field to the form.
 boolean canUpdateSearchParams()
           
 java.lang.String getActionURL()
           
 java.lang.String getBody(java.lang.String searchFormName, java.lang.String categoryName, java.lang.String initialFields, java.lang.String hiddenFields, java.lang.String action, java.lang.String formInitArgs, RaritanPageContext pageContext)
          main form generation method.
 java.lang.String getCategory()
           
 java.lang.String getFormInitArgs()
           
 java.lang.String getFormMethod()
           
 java.lang.String getFormName()
           
 java.lang.String getFormType()
           
 java.lang.String getHiddenFields()
           
 java.lang.String getInitialFields()
           
 java.lang.String getOnSubmitHandler(java.lang.String sessionID)
           
 java.lang.String getSubmitHandlerName()
           
 void initialize(org.w3c.dom.Element elem)
          Initialize the search form renderer from the application Configuration XML.
 void setFormMethod(java.lang.String formMethod)
          sets the form method ( "get" or "post" )
 void setFormName(java.lang.String formName)
          sets the form name - used as a key field in session data management so this should be unique within an application.
 void setFormType(java.lang.String formType)
          new search, paging, search within results, re-sort, etc...
 void setOnSubmitHandler(java.lang.String onSubmitHandler)
           
 void setSubmitHandlerName(java.lang.String submitHandlerName)
           
 void updateSearchParams(RaritanPageContext pageContext, OrderedMap searchParams)
          "callback" loop: SearchFormRenderer responsible for converting requests into one or more query maps.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PopupSearchFormRenderer

public PopupSearchFormRenderer()
Method Detail

initialize

public void initialize(org.w3c.dom.Element elem)
Description copied from interface: ISearchFormRenderer
Initialize the search form renderer from the application Configuration XML.

Specified by:
initialize in interface ISearchFormRenderer

getBody

public java.lang.String getBody(java.lang.String searchFormName,
                                java.lang.String categoryName,
                                java.lang.String initialFields,
                                java.lang.String hiddenFields,
                                java.lang.String action,
                                java.lang.String formInitArgs,
                                RaritanPageContext pageContext)
main form generation method. creates a
...
HTML fragment.

Specified by:
getBody in interface ISearchFormRenderer
Parameters:
searchFormName - Name of search form - Used to lookup a configuration element from application config. Sets the name="" attribute of the HTML form.
categoryName - Category of this search form (used for Source Map applications).
initialFields - Additional search form input fields - assumed to be HTML.
hiddenFields - List of hidden field name=value pairs.
action - Action URL (e.g. JSP or ASP page)
formInitArgs - Initial arguments to be passed in the <form> tag.
pageContext - Wraps the current page context. Contains session ID, session data HTTP request parameters. Can be used to set initial field values.

addAfterFormData

public void addAfterFormData(java.lang.String afterFormData)
Specified by:
addAfterFormData in interface ISearchFormRenderer

setFormType

public void setFormType(java.lang.String formType)
new search, paging, search within results, re-sort, etc...

Specified by:
setFormType in interface ISearchFormRenderer

getFormType

public java.lang.String getFormType()
Specified by:
getFormType in interface ISearchFormRenderer

setFormName

public void setFormName(java.lang.String formName)
Description copied from interface: ISearchFormRenderer
sets the form name - used as a key field in session data management so this should be unique within an application.

Specified by:
setFormName in interface ISearchFormRenderer

getFormName

public java.lang.String getFormName()
Specified by:
getFormName in interface ISearchFormRenderer

setFormMethod

public void setFormMethod(java.lang.String formMethod)
Description copied from interface: ISearchFormRenderer
sets the form method ( "get" or "post" )

Specified by:
setFormMethod in interface ISearchFormRenderer

getFormMethod

public java.lang.String getFormMethod()
Specified by:
getFormMethod in interface ISearchFormRenderer

addHiddenField

public void addHiddenField(java.lang.String fieldName,
                           java.lang.String fieldValue)
Description copied from interface: ISearchFormRenderer
Adds a hidden field to the form.

Specified by:
addHiddenField in interface ISearchFormRenderer

addFormScript

public void addFormScript(java.lang.String scriptName,
                          java.lang.String script)
Description copied from interface: ISearchFormRenderer
Adds a section of javascript to the form. The script should NOT be enclosed by a <script> </script> tag.

Specified by:
addFormScript in interface ISearchFormRenderer

getCategory

public java.lang.String getCategory()
Specified by:
getCategory in interface ISearchFormRenderer

getInitialFields

public java.lang.String getInitialFields()
Specified by:
getInitialFields in interface ISearchFormRenderer

getHiddenFields

public java.lang.String getHiddenFields()
Specified by:
getHiddenFields in interface ISearchFormRenderer

getActionURL

public java.lang.String getActionURL()
Specified by:
getActionURL in interface ISearchFormRenderer

getFormInitArgs

public java.lang.String getFormInitArgs()
Specified by:
getFormInitArgs in interface ISearchFormRenderer

setOnSubmitHandler

public void setOnSubmitHandler(java.lang.String onSubmitHandler)
Specified by:
setOnSubmitHandler in interface ISearchFormRenderer

getOnSubmitHandler

public java.lang.String getOnSubmitHandler(java.lang.String sessionID)
Specified by:
getOnSubmitHandler in interface ISearchFormRenderer

setSubmitHandlerName

public void setSubmitHandlerName(java.lang.String submitHandlerName)
Specified by:
setSubmitHandlerName in interface ISearchFormRenderer

getSubmitHandlerName

public java.lang.String getSubmitHandlerName()
Specified by:
getSubmitHandlerName in interface ISearchFormRenderer

canUpdateSearchParams

public boolean canUpdateSearchParams()
Specified by:
canUpdateSearchParams in interface ISearchFormRenderer

updateSearchParams

public void updateSearchParams(RaritanPageContext pageContext,
                               OrderedMap searchParams)
Description copied from interface: ISearchFormRenderer
"callback" loop: SearchFormRenderer responsible for converting requests into one or more query maps.

Specified by:
updateSearchParams in interface ISearchFormRenderer