|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectBodyTagSupport
com.raritantechnologies.searchApp.taglibrary.SearchForm
JSP Custom Tag that displays configurable Search HTML search input form. This is the "wrapper"
class for all RTI search forms. Search forms are rendered by a delegate
class of type ISearchFormRenderer.
<search:SearchForm formName="[ name of SearchForm ( use same value as name attribute in configuration XML below) ]"
categoryName="[ source category of SearchForm (use same value as category attribute in XML below) ]"
hiddenFields="[ set of hidden fields to be added to form formatted 'field:value,field2:value2' ]"
XML Configuration Template:
<SearchForm name="formName"
category="form category"
rendererClass="[ class of ISearchFormRenderer ]"
autoSourceSelect="true|false" >
<!-- details needed by someRendererClass -->
<!-- alternatively, if a BasicSearchFormRenderer is intended, list the fields -->
<Field ID="AU" type="text" width="50" name="Author" />
<Field ID="TI" type="text" width="50" name="Title" >
<FieldOp ID="TIBOOL" type="select" />
</Field>
<Field ID="KY" type="text" width="50" name="Keywords" >
<FieldOp ID="KYBOOL" type="select" />
</Field>
<Field ID="PageSize" type="radio" name="Page Size" >
<Choice value="10" name="10" default="on" />
<Choice value="20" name="20" />
<Choice value="50" name="50" />
</Field>
</SearchForm>
| Field Summary | |
protected java.lang.String |
activeDisplayKey
|
protected java.lang.String |
activeDisplayParam
|
| Constructor Summary | |
SearchForm()
|
|
| Method Summary | |
int |
doAfterBody()
|
int |
doStartTag()
|
java.lang.String |
getBody(RaritanPageContext rpc)
Returns the tag body. |
protected ISearchFormRenderer |
getSearchFormRenderer(RaritanPageContext rPageContext)
|
static ISearchFormRenderer |
getSearchFormRenderer(java.lang.String searchFormName,
java.lang.String categoryName,
RaritanPageContext rPageContext)
returns an ISearchFormRenderer given a search form name and category name. |
void |
initialize(org.w3c.dom.Element elem)
Initializes the object from an XML tag or element. |
void |
initialize(java.util.Map initParams)
|
void |
setAction(java.lang.String action)
Sets the form action attribute (as in the HTML <form action="someAction.jsp"). |
void |
setActiveDisplayKey(java.lang.String displayKey)
|
void |
setActiveDisplayParam(java.lang.String displayParam)
|
void |
setCategoryName(java.lang.String categoryName)
Sets the search form category as defined in the Application Configuration XML. |
void |
setFormInitArgs(java.lang.String formInitArgs)
Additional arguments (name=value attributes) to the <form> tag. |
void |
setFormMethod(java.lang.String formMethod)
|
void |
setFormName(java.lang.String searchFormName)
Name of the search form as defined in the Application Configuration XML. |
void |
setHiddenFields(java.lang.String hiddenFields)
Sets form hidden fields. |
void |
setInitialFields(java.lang.String initialFields)
Additional form fields that are added 'as-is' to the <form> element. |
void |
setTarget(java.lang.String target)
Sets the target window for the form submit results. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.lang.String activeDisplayParam
protected java.lang.String activeDisplayKey
| Constructor Detail |
public SearchForm()
| Method Detail |
public void setFormName(java.lang.String searchFormName)
Name of the search form as defined in the Application Configuration XML. This key enables the SearchForm to find the appropriate SearchFormRenderer.
searchFormName - The name of the <SearchForm> tag in the Application configuration XML
that should be used to render this search form.public void setCategoryName(java.lang.String categoryName)
Sets the search form category as defined in the Application Configuration XML. Used for dynamic switching of search forms.
The categoryName is linked to a Search Source or sources through the application source map configuration. If search form elements are to set the search source category independently, the categoryName should be set to empty string or "null".
categoryName - The name of the search source category to use with this form. The categoryName
is an alias or key that is used by the application SourceMap to resolve a
SearchSource name.public void setHiddenFields(java.lang.String hiddenFields)
hiddenFields - A packed string of the format field:value,field2:value2 where field/value pairs are
separated by a comma and field is separated from value by a colon.public void setInitialFields(java.lang.String initialFields)
initialFields - A string that will be included in the form tag, "as-is".public void setAction(java.lang.String action)
action - Used to set the <form> action attribute value.public void setFormInitArgs(java.lang.String formInitArgs)
formInitArgs - Additional arguments (complete name=value attributes) to be added to the
<form> tag.public void setTarget(java.lang.String target)
public void setActiveDisplayKey(java.lang.String displayKey)
public void setActiveDisplayParam(java.lang.String displayParam)
public void setFormMethod(java.lang.String formMethod)
public int doStartTag()
throws JspException
JspExceptionpublic java.lang.String getBody(RaritanPageContext rpc)
ICustomTag
getBody in interface ICustomTagrpc - Platform-neutral page context ( can be used in non J2EE environments such as ASP).
protected ISearchFormRenderer getSearchFormRenderer(RaritanPageContext rPageContext)
public static ISearchFormRenderer getSearchFormRenderer(java.lang.String searchFormName,
java.lang.String categoryName,
RaritanPageContext rPageContext)
public int doAfterBody()
throws JspException
JspExceptionpublic void initialize(org.w3c.dom.Element elem)
IConfigurable
initialize in interface IConfigurablepublic void initialize(java.util.Map initParams)
initialize in interface ICustomTag
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||