|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.portaluiinfrastructure.search.SearchFormFactory
public class SearchFormFactory
Factory class that manufactures a com.plumtree.xpshared.htmlelements.HTMLForm that encodes search requests and submits them to any ActivitySpace that includes a SearchResultModel. Note: If your form is used to find certain types of administrative objects, optionally within certain folders, you should probably call the static method GetObjectSearchForm(); this is the easiest way to make a form that works and satisfies portal UI standards. If you're making any other type of search form, you need to instantiate a SearchFormFactory object and add constraints and HTML elements to it, one at a time. Sample usage: see package com.plumtree.portalpagessample.search
Field Summary | |
---|---|
static java.lang.String |
BANNER_NAME_PREFIX
This is prefix for the Form Name when it is rendered in the Banner Search. |
Constructor Summary | |
---|---|
SearchFormFactory(java.lang.String name,
java.lang.String formID,
AActivitySpace owner)
Constructor. |
|
SearchFormFactory(java.lang.String name,
java.lang.String formID,
AActivitySpace owner,
boolean buildCompleteForm)
Constructor. |
Method Summary | |
---|---|
void |
AddFilterStatement(int operand,
int operatorId,
java.lang.String value)
Add an advanced search-style filter to the search form. |
protected void |
AddInputs(java.lang.String inputNamePrefix,
int settingId,
java.lang.Object settingValue)
Helper method to actually add the setting hidden inputs, called by AddRequiredSetting and AddOptionalSetting |
void |
AddOptionalSetting(java.lang.String optionName,
int settingId,
boolean settingValue)
Add an optional setting that will be set only if the indicated optionName is selected |
void |
AddOptionalSetting(java.lang.String optionName,
int settingId,
int settingValue)
Add an optional setting that will be set only if the indicated optionName is selected |
void |
AddOptionalSetting(java.lang.String optionName,
int settingId,
int[] settingValue)
Add an optional setting that will be set only if the indicated optionName is selected |
void |
AddOptionalSetting(java.lang.String optionName,
int settingId,
java.lang.String settingValue)
Add an optional setting that will be set only if the indicated optionName is selected |
void |
AddRequiredSetting(int settingId,
boolean settingValue)
Add a required setting (constraint) that will be added to all searches generated by this form. |
void |
AddRequiredSetting(int settingId,
int settingValue)
Add a required setting (constraint) that will be added to all searches generated by this form. |
void |
AddRequiredSetting(int settingId,
int[] settingValue)
Add a required setting (constraint) that will be added to all searches generated by this form. |
void |
AddRequiredSetting(int settingId,
java.lang.String settingValue)
Add a required setting (constraint) that will be added to all searches generated by this form. |
void |
AddRequiredSettings(SearchSettingCollection c)
Add a group of required settings (constraint) that will be added to all searches generated by this form. |
protected void |
CreateFilterElements()
Create the hidden inputs for the search form to encode the filter. |
void |
ForceBannerSearchDefaults()
Special flag that forces this search box to have all the user's banner search defaults applied to it. |
void |
ForceSubmitOfEnclosingForm()
Yet another hack special flag. |
void |
ForceTopBestBet()
Special flag for designating the form to be a top best bet search, which requires a special control (the activity space was alterable through other methods, but this was added for setting the control). |
java.lang.String |
GetAnchorOnClick()
Returns the onclick javascript for the HTMLAnchor used as a "submit" button or link |
HTMLForm |
GetForm()
Convenience method. |
java.lang.String |
GetInputBoxName()
Returns the name callers must use for the input box, if it is a banner search then it returns 'q' since it is friendly url parameter for search name. |
java.lang.String |
GetInputBoxOnKeyDown()
Returns the javascript callers should use as the "onKeyDown" attribute of the input box |
java.lang.String |
GetNextSelectName()
Get a new name for a pull-down HTMLSelect. |
HTMLElement |
GetResult()
Returns the search form (if building a complete form) or inputs to be inserted into another form (otherwise). |
static HTMLImg |
GetSearchButton(AActivitySpace m_asOwner)
Static convenience method to return the standard portal search button |
java.lang.String |
GetSingleClassFilterJavascript(java.lang.String optionValue)
|
static HTMLScript |
MakeSearchFormJavascript(java.lang.String name,
AActivitySpace m_asOwner,
java.lang.String inputBoxName)
This is public so it can be used for the "search again" form on the results page; most users of this class should NOT call this method. |
void |
OverrideEnclosingFormAndSubmitToSearchResultPage()
Special flag (== "hack"), buildCompleteForm (passed to the constructor) must be false. |
void |
SetFilterClauseOperator(int oper)
Set the operator for the set of statements in the filter. |
void |
SetPageMode(java.lang.String pageMode)
A special "mode" argument thta is passed along to the results page. |
void |
SetTarget(java.lang.String space,
java.lang.String spaceID,
java.lang.String page)
Sets the target for this form. |
void |
SetValidateAlert(boolean validateAlert)
|
void |
SetValidationFunction(java.lang.String strFunctionName)
Sets the javascript validation function for this form. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String BANNER_NAME_PREFIX
Constructor Detail |
---|
public SearchFormFactory(java.lang.String name, java.lang.String formID, AActivitySpace owner)
public SearchFormFactory(java.lang.String name, java.lang.String formID, AActivitySpace owner, boolean buildCompleteForm)
Method Detail |
---|
public void AddOptionalSetting(java.lang.String optionName, int settingId, java.lang.String settingValue)
public void AddOptionalSetting(java.lang.String optionName, int settingId, boolean settingValue)
public void AddOptionalSetting(java.lang.String optionName, int settingId, int settingValue)
public void AddOptionalSetting(java.lang.String optionName, int settingId, int[] settingValue)
public void AddRequiredSettings(SearchSettingCollection c)
public void AddRequiredSetting(int settingId, boolean settingValue)
public void AddRequiredSetting(int settingId, int settingValue)
public void AddRequiredSetting(int settingId, int[] settingValue)
public void ForceBannerSearchDefaults()
public void ForceTopBestBet()
public void ForceSubmitOfEnclosingForm()
public void SetValidateAlert(boolean validateAlert)
public final java.lang.String GetAnchorOnClick()
public HTMLForm GetForm()
public final java.lang.String GetInputBoxName()
public void AddRequiredSetting(int settingId, java.lang.String settingValue)
public java.lang.String GetInputBoxOnKeyDown()
public java.lang.String GetNextSelectName()
public HTMLElement GetResult()
public static HTMLImg GetSearchButton(AActivitySpace m_asOwner)
public void SetPageMode(java.lang.String pageMode)
public static HTMLScript MakeSearchFormJavascript(java.lang.String name, AActivitySpace m_asOwner, java.lang.String inputBoxName)
public void OverrideEnclosingFormAndSubmitToSearchResultPage()
public void SetTarget(java.lang.String space, java.lang.String spaceID, java.lang.String page)
public void SetValidationFunction(java.lang.String strFunctionName)
protected void AddInputs(java.lang.String inputNamePrefix, int settingId, java.lang.Object settingValue)
public void SetFilterClauseOperator(int oper)
oper
- Should be PT_BOOLOP_AND or PT_BOOLOP_ORpublic void AddFilterStatement(int operand, int operatorId, java.lang.String value)
operand
- Any integer property idoperatorId
- Something from PT_FILTEROPSvalue
- A string value.
HTMLException
protected void CreateFilterElements()
public java.lang.String GetSingleClassFilterJavascript(java.lang.String optionValue)
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |