com.sas.servlet.tbeans.remotefileselector2.html
Class InformationServicesSelector

com.sas.servlet.tbeans.remotefileselector2.html.InformationServicesSelector
All Implemented Interfaces:
ActionProviderViewInterface, HttpActionProviderInterface, HttpActionProviderViewInterface, com.sas.actionprovider.refresh.PartialRefreshActionsInterface, URLTemplateViewInterface, com.sas.beans.PropertyChangeSource, com.sas.collection.ContentsChangedListener, com.sas.lang.ObjectDataInterface, com.sas.servlet.tbeans.AJAXControllerURLInterface, ComplexStyleInterface, CompositeComponentInterface, RemoteFileSelectorStyleKeysInterface, RemoteFileSelectorInterface, RemoteFileSelectorKeysInterface, RenderableInterface, TemplateInterface, com.sas.servlet.tbeans.TemplateKeyInterface, TransformationInterface, com.sas.servlet.tbeans.TransformationInterface2, com.sas.util.WriteToPrintWriterInterface, java.io.Serializable, java.util.EventListener

public class InformationServicesSelector

The InformationServicesSelector is a TransformationBean™ that generates the appropriate HTML 4.0 and JavaScript to represent a file selector that uses the Information Services interfaces. InformationServicesSelector provides the ability to navigate and choose a file in a repository. This class extends the function of the RemoteFileSelector by providing a default InformationServicesNavigationModel, a default InformationServicesSearch component and a default navigation view.

The results are displayed in a TableView. By default the column model for the TableView includes the following columns:

  1. Name
  2. Type
  3. Modified Date
  4. Keywords
  5. Description

By default all file types are displayed in the InformationServicesSearch. These file types can be filtered to only display reports, stored processes or information maps. See the setFilterValues method for more details on filtering the file types.

The InformationServicesSelector Transformation Bean component elements are the same as those specified for the RemoteFileSelector component. It is an HTML table that contains other HTML tables, Transformation Beans, and Actions. Once a repository instance or a user context is provided the default InformationServicesNavigationModel is constructed. The default InformationServicesSelector appears similar to the image below.

The InformationServicesSelector is one of several TransformationBeans™ that rely on JavaScript to provide some of its functionality. These JavaScript files are including automatically by the tbean. See JavaScriptIncludeHandler for more information about how these files are included and how to customize this behavior. The InformationServicesSelector uses the following JavaScript files:

sas_RemoteFileSelector.js

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

For More Information:

Visit the AppDev Studio Developer's Site to access step-by-step examples, white papers and additional usage information at http://support.sas.com/rnd/appdev/.

Examples for this class may be found on the Examples Site.

See Also:
Serialized Form

Field Summary
static java.lang.String RB_KEY
           
 
Fields inherited from class com.sas.servlet.tbeans.remotefileselector2.html.RemoteFileSelector
DEFAULT_TEMPLATE_FILE_NAME, SEARCH_FIELDS_TEMPLATE_FILE_NAME, SEARCH_RESULTS
 
Fields inherited from class com.sas.servlet.tbeans.BaseActionCompositeTransformation
viewerSupport
 
Fields inherited from interface com.sas.servlet.tbeans.remotefileselector2.RemoteFileSelectorInterface
REGULAR_MODE, SEARCH_MODE
 
Fields inherited from interface com.sas.servlet.tbeans.remotefileselector2.html.RemoteFileSelectorStyleKeysInterface
RFS_CONTAINER_STYLE, RFS_DETAILVIEW_STYLE, RFS_SEARCH_CONTAINER_STYLE, RFS_SEARCH_STYLE, RFS_SEARCHBUTTONS_CONTAINER_STYLE, RFS_SEARCHDATETIMELIMITS, RFS_SEARCHFIELDS_CONTAINER_STYLE, RFS_SEARCHFIELDSANDBUTTONS_CONTAINER_STYLE, RFS_SEARCHINTHELAST, RFS_SEARCHINTHELAST_CHOICECELL, RFS_SEARCHINTHELAST_ENTRYCELL, RFS_SEARCHINTHELAST_FIELDS, RFS_SEARCHINTHELAST_LABELCELL, RFS_SEARCHRESULTS_DETAILVIEW_STYLE, RFS_SEARCHSUBFOLDERS, RFS_SEARCHTEXT, RFS_SEARCHWHAT, RFS_SEARCHWHERE, RFS_TOOLBAR_CONTAINER_STYLE, RFS_TOOLBAR_STYLE
 
Fields inherited from interface com.sas.servlet.tbeans.remotefileselector2.RemoteFileSelectorKeysInterface
RFS_DETAILVIEW, RFS_EXPANDCOLLAPSE, RFS_FILE_DETAILVIEW, RFS_REMOTEFILESEARCH, RFS_SEARCH, RFS_SEARCH_DETAILVIEW, RFS_SEARCHDATETIMELIMITS_CHOICE, RFS_SEARCHDATETIMELIMITS_LABEL, RFS_SEARCHINTHELAST_LABEL, RFS_SEARCHINTHELASTUNIT_CHOICE, RFS_SEARCHINTHELASTVALUE_ENTRYFIELD, RFS_SEARCHRESULTS_DETAILVIEW, RFS_SEARCHSTART_BUTTON, RFS_SEARCHSTOP_BUTTON, RFS_SEARCHSUBFOLDERS_SELECT, RFS_SEARCHTEXT_ENTRYFIELD, RFS_SEARCHTEXT_LABEL, RFS_SEARCHWHAT_CHOICE, RFS_SEARCHWHAT_LABEL, RFS_SEARCHWHERE_CHOICE, RFS_SEARCHWHERE_LABEL, RFS_TOOLBAR, RFS_TOOLBAR_LOCATION_CHOICE, RFS_TOOLBAR_LOCATION_LABEL, RFS_TOOLBAR_SHOWDESCRIPTION_COMPONENT, RFS_UPONELEVEL_ACTION
 
Constructor Summary
InformationServicesSelector()
          Constructs an InformationServicesSelector transformation bean.
InformationServicesSelector(com.sas.services.information.RepositoryInterface repository, java.lang.String locationURL, java.util.Locale locale)
          The repository instance is used to create a default instance of the InformationServicesNavigationModel.
InformationServicesSelector(com.sas.services.user.UserContextInterface user, java.lang.String locationURL, java.util.Locale locale)
          The UserContextInterface instance is used to create a default instance of the InformationServicesNavigationModel.
 
Method Summary
protected  BaseCheckBox createDefaultShowDescriptionComponent()
          Returns the default instance of the Show Description CheckBox.
 com.sas.services.information.RepositoryInterface getRepository()
          Returns the repository instance.
 com.sas.services.user.UserContextInterface getUserContext()
          Returns the UserContextInterface instance.
protected  void prepareToWriteToolBar()
          Prepares the Toolbar for rendering.
protected  void setLocaleDependentProperties(java.util.Locale locale)
          Sets properties that should be updated if the Locale changes.
 void setRepository(com.sas.services.information.RepositoryInterface repository)
          Sets the repository navigated by the component.
protected  void setupView(BaseTableView table, BaseRemoteFileModelInterface model)
          Override so that the first time the detail views are rendered, they are rendered with the folders sorted first by Name
 void setUserContext(com.sas.services.user.UserContextInterface user)
          Sets the UserContextInterface instance.
 
Methods inherited from class com.sas.servlet.tbeans.remotefileselector2.html.RemoteFileSelector
createDefaultFileDetailView, createDefaultToolBar, createDefaultToolBar, postConstructionSetup, prepareToWriteDetailView, prepareToWriteSearch, removeComponent, setComponent, setupDetailView, setupShowDescription, sort, writeContent
 
Methods inherited from class com.sas.servlet.tbeans.remotefileselector2.BaseRemoteFileSelector
contentsChanged, getMode, getModel, isDetailViewVisibilityControlOn, setActionProvider, setDetailViewVisibilityControlOn, setMode, setModel
 
Methods inherited from class com.sas.servlet.tbeans.BaseActionCompositeTransformation
applyTemplate, applyTemplate, dispose, getActionFilter, getActionSupportType, getComponentAction, getComponentActionType, getUniqueId, getViewerSupport, isActionVisible, listActionTypes, listAreaTypes, moveActionAttributesToComponent, 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, setCleanUpResourcesOn, setFlushEnabled, setId, setLocale, setRequest, setResponse, setStyleInfo, setTemplate, setTemplate, setTemplateDictionary, setTemplateFileName, setTemplateLocation
 
Methods inherited from class com.sas.servlet.tbeans.BaseTransformation
addPropertyChangeListener, addPropertyChangeListener, cleanUpResources, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCustomAttributes, getDescription, getId, getInputTransform, getLocale, getName, getObjectData, getObjectDataProperty, getOutputTransform, getRequest, getResponse, getTagEpilog, getTagProlog, hasListeners, isCleanUpResourcesOn, isVisible, removePropertyChangeListener, removePropertyChangeListener, setCustomAttributes, setInputTransform, setName, setObjectData, setObjectDataProperty, setOutputTransform, setTagEpilog, setTagProlog, setVisible, toString, write, write, write
 
Methods inherited from interface com.sas.servlet.tbeans.remotefileselector2.RemoteFileSelectorInterface
getMode, getModel
 
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

RB_KEY

public static final java.lang.String RB_KEY
See Also:
Constant Field Values
Constructor Detail

InformationServicesSelector

public InformationServicesSelector()
Constructs an InformationServicesSelector transformation bean. A default name is generated for the selector.


InformationServicesSelector

public InformationServicesSelector(com.sas.services.information.RepositoryInterface repository,
                                   java.lang.String locationURL,
                                   java.util.Locale locale)
The repository instance is used to create a default instance of the InformationServicesNavigationModel.

Parameters:
repository - navigated by component
locationURL - SBIP path used to set the initial directory files displayed when the selector is rendered
locale - application locale

InformationServicesSelector

public InformationServicesSelector(com.sas.services.user.UserContextInterface user,
                                   java.lang.String locationURL,
                                   java.util.Locale locale)
The UserContextInterface instance is used to create a default instance of the InformationServicesNavigationModel.

Parameters:
user - UserContextInterface instance
locationURL - SBIP URL
locale - application locale
Method Detail

setRepository

public void setRepository(com.sas.services.information.RepositoryInterface repository)
Sets the repository navigated by the component. A default InformationServicesNavigationModel instance is created and the repository is set on that model. The component is also initialized. The default viewer is setup during initializatioin.

The search component must have a RepositoryInterface instance or a UserContextInterfaceinstance to render successfully.

Parameters:
repository - navigated by component
See Also:
getRepository()

getRepository

public com.sas.services.information.RepositoryInterface getRepository()
Returns the repository instance.

Returns:
RepositoryInterface
See Also:
setRepository(com.sas.services.information.RepositoryInterface)

setUserContext

public void setUserContext(com.sas.services.user.UserContextInterface user)
Sets the UserContextInterface instance. The userContext is useful if dependent repositories exists.

Parameters:
user - user context that defines the repositories to use for navigating

getUserContext

public com.sas.services.user.UserContextInterface getUserContext()
Returns the UserContextInterface instance.

Returns:
UserContextInterface
See Also:
setUserContext(com.sas.services.user.UserContextInterface)

prepareToWriteToolBar

protected void prepareToWriteToolBar()
Prepares the Toolbar for rendering. The onClick for the showDescription CheckBox component is set for REGULAR_MODE and SEARCH_MODE.

Overrides:
prepareToWriteToolBar in class RemoteFileSelector
See Also:
RemoteFileSelector.setupShowDescription(com.sas.servlet.tbeans.form.BaseCheckBox, com.sas.servlet.tbeans.remotefileselector2.BaseFieldRenderer)

createDefaultShowDescriptionComponent

protected BaseCheckBox createDefaultShowDescriptionComponent()
Returns the default instance of the Show Description CheckBox. This method is called when the RemoteFileToolbar is constructed.

Returns:
BaseCheckBox instance used to indicate visibility status for file descriptions
See Also:
BaseRemoteFileToolBar#getShowDescriptionComponent()

setupView

protected void setupView(BaseTableView table,
                         BaseRemoteFileModelInterface model)
Override so that the first time the detail views are rendered, they are rendered with the folders sorted first by Name

Overrides:
setupView in class RemoteFileSelector
Parameters:
table - detailViewComponent or searchResultsViewComponent that will make use of the RemoteFileServerModelInterface instance
model - model instance that will be attached to the detailViewComponent or searchResultsViewComponent
See Also:
RemoteFileSelector.setupDetailView()

setLocaleDependentProperties

protected void setLocaleDependentProperties(java.util.Locale locale)
Sets properties that should be updated if the Locale changes. The column names on the model must be reset. The column names are only updated if the column model was created by the component.

The model's Locale is also updated when the viewer's Locale is changed. This is so that the Locale is consistent for the entire component. To control the model's Locale call the setLocale(Locale) method on the model after setting the Locale on the viewer. This would only be necessary if you wanted the model data to reflect a Locale that is not consistent with the viewer Locale.

The setLocale method calls this method so that the dependent properties can be updated.

Overrides:
setLocaleDependentProperties in class RemoteFileSelector
Parameters:
locale - new locale setting



Copyright © 2009 SAS Institute Inc. All Rights Reserved.