|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.servlet.tbeans.remotefileselector2.html.RemoteFileSearch
public class RemoteFileSearch
The RemoteFileSearch is a TransformationBean that generates the appropriate HTML 4.0 to represent
the search facility of the RemoteFileSelector
component.
RemoteFileSearch renders the components and the actions associated
with the search component.
The search component is composed of the following major elements:
RemoteFileSearchModelInterface
is requiredExpandCollapse
componentSTART_SEARCH
actionJavaScript
is also used to submit the
appropriate date/time criteria for a search.
The sas_RemoteFileSelector.js
entry contains all of the JavaScript code needed
to successfully utilize the RemoteFileSelector
component. The expanded
RemoteFileSearch component appears as follows:
The search fields provide information to the server to start the searching process. Each field name is made up of the action provider prefix and a standard name. The table below shows the field label and the standard name for the field and the default value for the field.
Field Label | Name | Default Value |
---|---|---|
Search for: | searchText | blank value |
Search what: | searchContext | Name |
Search where: | startingFolder | current folder |
Date/time limits: | startDateTime and endDateTime are determined from the three fields associated with date and time | startDateTime & endDateTime do not matter since None is the default Date/time limit |
The RemoteFileSearch transformation bean component is an HTML Table that contains other
transformation bean
components, HTML tables,
and Actions
. These components include TextEntry
,
ChoiceBox
, CheckBox
, and Button
.
RemoteFileSearch Elements | |
---|---|
Transformation Beans | ChoiceBox |
CheckBox | |
Label | |
TextEntry | |
Button | |
Actions | START_SEARCH_ACTION |
The RemoteFileSearch is one of several TransformationBeans that rely on a set of style classes that are used by default when generating the resulting markup language. For more information on style sheets and the default style classes that apply to this TransformationBean, refer to the AppDev Studio Developer Site. You'll find a useful reference document entitled Cascading Style Sheets, Images, and TransformationBeans as well as the TransformationBeans Style Sheet Reference.
Note that the toString() method on this class calls the write
method, which may have undesirable side effects. See BaseTransformation.toString() for more information. Debuggers often use toString() to show the value of a variable, and this may cause unexpected behavior while debugging
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_TEMPLATE_FILE_NAME
The name of the file which will be used by default to read in the template used by this RemoteFileSelector sub-component composite. |
static java.lang.String |
RB_KEY
|
Fields inherited from class com.sas.servlet.tbeans.remotefileselector2.BaseRemoteFileSearch |
---|
model |
Fields inherited from class com.sas.servlet.tbeans.BaseActionCompositeTransformation |
---|
viewerSupport |
Constructor Summary | |
---|---|
RemoteFileSearch()
Constructs a new RemoteFileSearch component. |
|
RemoteFileSearch(RemoteFileSearchModelInterface model)
Constructs a new RemoteFileSearch
component using the specified search model. |
|
RemoteFileSearch(RemoteFileSearchModelInterface model,
java.util.Locale locale)
Constructs a new RemoteFileSearch
component using the specified search model
and the specified locale. |
Method Summary | |
---|---|
protected BaseChoiceBox |
createDefaultSearchDateTimeLimitsComponent()
Creates and returns the ChoiceBox
transformation bean used for
displaying the date limit type used for searching. |
protected BaseLabel |
createDefaultSearchDateTimeLimitsLabel()
Creates and returns the default search Date/time Limits: label
to be use with the search date limits type
component. |
protected BaseLabel |
createDefaultSearchInTheLastLabel()
Creates and returns the default date limit unit Label . |
protected BaseChoiceBox |
createDefaultSearchInTheLastUnitComponent()
Creates and returns the ChoiceBox transformation bean for the
date limit unit type. |
protected BaseTextEntry |
createDefaultSearchInTheLastValueComponent()
Creates and returns text entry used for specifying the date limits. |
protected BaseTableView |
createDefaultSearchResultsDetailView()
Creates and returns the default RFS_SEARCHRESULTS_DETAILVIEW . |
protected BaseButton |
createDefaultSearchStartComponent()
Creates and returns the default search button. |
protected BaseButton |
createDefaultSearchStopComponent()
Creates and returns the default stop button. |
protected BaseCheckBox |
createDefaultSearchSubfoldersComponent()
Creates and returns search sub folders CheckBox . |
protected java.lang.String |
createDefaultSearchSubfoldersLabel()
Creates and returns the default Search subfolders
text to be used
to label the
the search subfolders
CheckBox component. |
protected BaseTextEntry |
createDefaultSearchTextComponent()
Creates and returns the default Search for: component. |
protected BaseLabel |
createDefaultSearchTextLabel()
Creates and returns the default Search for: Label . |
protected BaseChoiceBox |
createDefaultSearchWhatComponent()
Creates and returns default Search what choice component. |
protected BaseLabel |
createDefaultSearchWhatLabel()
Creates and returns the default search field text label. |
protected BaseChoiceBox |
createDefaultSearchWhereComponent()
Creates and returns default Search where choice component. |
protected BaseLabel |
createDefaultSearchWhereLabel()
Creates and returns the default Search where:
text label. |
java.util.HashMap |
getAdditionalParameters()
Returns an HashMap containing additional parameters that should be added to the form used to perform the search action. |
protected BaseExpandCollapse |
getDefaultExpandCollapseComponent()
Create and set defaults for the ExpandCollapse component used with search. |
Form |
getDefaultFormObject()
Returns the default form object. |
Form |
getFormObject()
Returns the form object. |
protected ActionList |
getSearchButtonAreaActions()
Returns the action list containing the START_SEARCH_ACTION . |
boolean |
isFormEnabled()
Returns whether or not the FORM tag is written by the search class. |
protected void |
populateStartingLocationComponent(java.lang.String path,
java.lang.String basePath)
Populate the location drop-down component with the starting search path. |
protected void |
prepareToWriteDetailView()
This method prepares the detail view for rendering. |
protected void |
prepareToWriteSearch()
Prepares the search sub-components for rendering. |
protected void |
processSearchButtonActions(Form formObject)
Retrieves the actions for search button and registers the actions on the form used for processing the search. |
void |
setAdditionalParameter(java.lang.String name,
java.lang.String value)
Sets an additional parameter to be added to the form used to perform the search action. |
void |
setAdditionalParameters(java.util.HashMap map)
Sets a HashMap containing additional parameters that should be added to the form used to perform the search action. |
void |
setFormEnabled(boolean value)
Determines if the search class should write the FORM tag. |
void |
setFormObject(Form form)
Sets the form object. |
protected void |
setLocaleDependentProperties(java.util.Locale locale)
Sets properties that should be updated if the locale changes. |
protected void |
setupDetailView()
Binds the SortableTableModelAdapter
and the detailview. |
void |
setupView()
This method intializes the view. |
protected void |
setupView(BaseTableView table,
RemoteFileSearchModelInterface model)
Bind the viewer and the model. |
protected void |
writeContent(java.io.PrintWriter out)
Writes the transformation's main content which is everything except for the following: Opening container html element. |
Methods inherited from class com.sas.servlet.tbeans.remotefileselector2.BaseRemoteFileSearch |
---|
getExpandCollapseComponent, getModel, getRemoteFileSelector, getSearchFieldsAttributes, getStartingLocation, isExpandCollapseVisible, setExpandCollapseComponent, setExpandCollapseVisible, setModel, setRemoteFileSelector, setSearchFieldsAttributes, setStartingLocation |
Methods inherited from class com.sas.servlet.tbeans.BaseActionCompositeTransformation |
---|
applyTemplate, applyTemplate, dispose, getActionFilter, getActionSupportType, getComponentAction, getComponentActionType, getUniqueId, getViewerSupport, isActionVisible, listActionTypes, listAreaTypes, moveActionAttributesToComponent, setActionProvider, setActionSupportType, setActionVisible, setComponent, setComponentActionType, setUniqueId, writeTemplate |
Methods inherited from class com.sas.servlet.tbeans.BaseCompositeTransformation |
---|
getActionProvider, getComponent, getComponents, getDefaultTemplate, getStyleInfo, getStyleMap, getTemplate, getTemplateDictionary, getTemplateFileName, getTemplateLocation, getVisibleComponents, isFlushEnabled, propertyChange, removeComponent, setCleanUpResourcesOn, setComponent, setFlushEnabled, setId, setLocale, setRequest, setResponse, setStyleInfo, setTemplate, setTemplate, setTemplateDictionary, setTemplateFileName, setTemplateLocation |
Methods inherited from interface com.sas.servlet.tbeans.TransformationInterface |
---|
getCustomAttributes, getDescription, getId, getLocale, getName, getRequest, getResponse, getTagEpilog, getTagProlog, isVisible, setCustomAttributes, setDescription, setId, setLocale, setName, setRequest, setResponse, setTagEpilog, setTagProlog, setVisible, write, write, write |
Methods inherited from interface com.sas.actionprovider.HttpActionProviderViewInterface |
---|
getRequest, setRequest |
Methods inherited from interface com.sas.actionprovider.HttpActionProviderInterface |
---|
getActionProvider |
Field Detail |
---|
public static final java.lang.String RB_KEY
public static final java.lang.String DEFAULT_TEMPLATE_FILE_NAME
Constructor Detail |
---|
public RemoteFileSearch()
public RemoteFileSearch(RemoteFileSearchModelInterface model)
RemoteFileSearch
component using the specified search model.
model
- a model is required before the component can be successfully
rendered. If no model is set then a nullPointerException
will occur when the component is rendered.public RemoteFileSearch(RemoteFileSearchModelInterface model, java.util.Locale locale)
RemoteFileSearch
component using the specified search model
and the specified locale.
The following keys are set for the component:
RFS_SEARCHTEXT_LABEL
RFS_SEARCHTEXT_ENTRYFIELD
RFS_SEARCHWHAT_LABEL
RFS_SEARCHWHAT_CHOICE
RFS_SEARCHWHERE_LABEL
RFS_SEARCHWHERE_CHOICE
RFS_SEARCHSUBFOLDERS_SELECT
RFS_SEARCHDATETIMELIMITS_LABEL
RFS_SEARCHDATETIMELIMITS_CHOICE
RFS_SEARCHINTHELAST_LABEL
RFS_SEARCHINTHELASTVALUE_ENTRYFIELD
RFS_SEARCHINTHELASTUNIT_CHOICE
RFS_SEARCHSTART_BUTTON
RFS_SEARCHSTOP_BUTTON
RFS_SEARCHRESULTS_DETAILVIEW
model
- RemoteFileSearchModelInterface
instancelocale
- application localeMethod Detail |
---|
protected void prepareToWriteDetailView()
protected void prepareToWriteSearch()
A formObject
is needed by the
search component so that the search
criteria can be processed appropriately by the server. If the
formObject
or the
ActionProvider
is null then the search will
not be processed. The Search
buttons
onClick
value
is set to execute the
processSearch
method.
The values for the search criteria are updated with the last search values specified.
formObject
- form used for
processing the search criteriaprotected void populateStartingLocationComponent(java.lang.String path, java.lang.String basePath)
The basePath does not appear in the drop-down directories
populateStartingLocationComponent
in class BaseRemoteFileSearch
path
- starting pathbasePath
- defined root levelprotected void processSearchButtonActions(Form formObject)
formObject
- form used for
processing the search criteriaprotected ActionList getSearchButtonAreaActions()
START_SEARCH_ACTION
.
This action is executed when the Search
button
is selected.
protected void setupDetailView()
SortableTableModelAdapter
and the detailview.
This binding only occurs one time.
To perform a one time initial sort override the
setupView() method.
setupView()
,
SortableTableModelAdapter
public void setupView()
RemoteFileServerModelInterface
model is set on an instance of
the SortableTableModelAdapter
. This
SortableTableModelAdapter
is
then set on the Table.
Therefore a getModel()
method call on the table will
return an instance of the
SortableTableModelAdapter
.
To get the RemoteFileSearchModelInterface
instance, perform a getModel()
method call on
the RemoteFileSearch
viewer or on the SortableTableModelAdapter
.
protected void setupView(BaseTableView table, RemoteFileSearchModelInterface model)
SortableTableModelAdapter
.
table
- searchResultsViewComponent
that will
make use of the RemoteFileSearchModelInterface
instancemodel
- model instance that will be attached to the
searchResultsComponent
setupView()
protected BaseExpandCollapse getDefaultExpandCollapseComponent()
getDefaultExpandCollapseComponent
in class BaseRemoteFileSearch
BaseRemoteFileSearch.getExpandCollapseComponent()
protected BaseTableView createDefaultSearchResultsDetailView()
RFS_SEARCHRESULTS_DETAILVIEW
.
By default the RFS_SEARCHRESULTS_DETAILVIEW
is a TableView
. This component
displays the results returned from a search.
protected BaseTextEntry createDefaultSearchTextComponent()
Search for:
component.
This component is a TextEntry
transformation
bean by default. A default style class name of
rfs_SearchTextComponent
was set for
the text entry.
TextEntry
transformation bean
used for entering search textprotected BaseChoiceBox createDefaultSearchWhatComponent()
Search what
choice component.
This component is a ChoiceBox
transformation
bean by default. The field choices are Name,
Description
and Keywords
. Their corresponding
values are Name, Desc,
and Keywords
.
The default style class for the ChoiceBox component is
rfs_SearchWhatComponent
*
ChoiceBox
used for selecting search fieldprotected BaseChoiceBox createDefaultSearchWhereComponent()
Search where
choice component.
The value specified in this component
represents the starting path for the search.
The default style for the Search Where
ChoiceBox
is
rfs_SearchWhereComponent
.
protected BaseCheckBox createDefaultSearchSubfoldersComponent()
CheckBox
. Component
is used to turn on the searching of subfolders.
The searching of subfolders is turned on by default.
The default style for the label is
rfs_SearchSubfoldersLabel
.
The default style for the check area is
rfs_SearchSubfolders
.
protected BaseChoiceBox createDefaultSearchDateTimeLimitsComponent()
ChoiceBox
transformation bean used for
displaying the date limit type used for searching.
The field choices are None
and
Search for Files Modified...
Their corresponding
values are none
and modified
.
The default style for the SearchDateTimeLimits
ChoiceBox
is rfs_SearchDateTimeLimitsComponent
.
protected BaseTextEntry createDefaultSearchInTheLastValueComponent()
InTheLast
TextEntry
is
rfs_SearchInTheLastValueComponent
TextEntry
used
to for the date limits, the date limit is 1
by defaultprotected BaseChoiceBox createDefaultSearchInTheLastUnitComponent()
ChoiceBox
transformation bean for the
date limit unit type.
The date limit unit type choices
are Hours, Days, Weeks,
and Months
.
Their corresponding
values are Hours, Days, Weeks,
and Months
.
The default style class for the InTheLast
ChoiceBox
is rfs_SearchInTheLastUnitComponent
.
protected BaseButton createDefaultSearchStartComponent()
Search Button
is selected the
sas_RemoteFileSearch_processSearch JavaScript
method is executed. This JavaScript
calculates
the correct startDateTime
and endDateTime
and then
submits a form containing all of the search field
values.
The default style for the SearchStart Button
is rfs_SearchButton
.
Button
transformation bean instance
used to start execution of the searchprotected BaseButton createDefaultSearchStopComponent()
Button
transformation bean
instance used to stop the
execution of the searchprotected BaseLabel createDefaultSearchTextLabel()
Search for: Label
.
The default style class for the Search for:
Label is rfs_SearchTextLabel
.
Search for:
Label transformation beanprotected BaseLabel createDefaultSearchWhatLabel()
Search What: Label
is
rfs_SearchWhatLabel
.
Label
transformation bean which has a default
text of Search what:
protected BaseLabel createDefaultSearchWhereLabel()
Search where:
text label.
The default style class for the
Search Where:
label is
rfs_SearchWhereLabel
Search where: Label
transformation beanprotected java.lang.String createDefaultSearchSubfoldersLabel()
Search subfolders
text to be used
to label the
the search subfolders
CheckBox
component.
Search subfolders
text stringprotected BaseLabel createDefaultSearchDateTimeLimitsLabel()
Date/time Limits:
label
to be use with the search date limits type
component. The default style class for the
Date/time Limits:
label is
rfs_SearchDateTimeLimitsLabel
.
Date/time Limits:
Label transformation beanprotected BaseLabel createDefaultSearchInTheLastLabel()
Label
.
The default style clss for the
In the Last: Label
is
rfs_SearchInTheLastLabel
.
In the last:
labelpublic void setFormObject(Form form)
setFormObject
in interface FormViewInterface
form
- the form objectgetFormObject()
public Form getFormObject()
getFormObject
in interface FormViewInterface
setFormObject(Form)
public Form getDefaultFormObject()
getDefaultFormObject
in interface FormViewInterface
getFormObject()
public void setFormEnabled(boolean value)
setFormEnabled
in interface FormViewInterface
value
- true if the FORM tag is written, false otherwiseisFormEnabled()
public boolean isFormEnabled()
isFormEnabled
in interface FormViewInterface
setFormEnabled(boolean)
public java.util.HashMap getAdditionalParameters()
getAdditionalParameters
in interface FormViewInterface
HashMap
public void setAdditionalParameters(java.util.HashMap map)
setAdditionalParameters
in interface FormViewInterface
map
- HashMap objectHashMap
public void setAdditionalParameter(java.lang.String name, java.lang.String value)
setAdditionalParameter
in interface FormViewInterface
name
- name of the list itemvalue
- value of the list itemHashMap
protected void setLocaleDependentProperties(java.util.Locale locale)
The setLocale method calls this method so that the dependent properties can be updated.
setLocaleDependentProperties
in class BaseTransformation
locale
- new locale settingprotected void writeContent(java.io.PrintWriter out) throws java.io.IOException
BaseActionCompositeTransformation2
writeContent
in class com.sas.servlet.tbeans.BaseActionCompositeTransformation2
java.io.IOException
BaseActionCompositeTransformation2.write(PrintWriter)
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |