All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.servlet.tbeans.remotefileselector2.html
Class RemoteFileToolBar

    com.sas.servlet.tbeans.remotefileselector2.html.RemoteFileToolBar

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

    public class RemoteFileToolBar

implements RemoteFileSelectorKeysInterface, RemoteFileSelectorStyleKeysInterface

The RemoteFileToolBar is a TransformationBean™ that generates the appropriate HTML 4.0 to represent a ToolBar. The `RemoteFileToolBar` provides a `ChoiceBox Transformation Bean` used for selecting a folder and an action toolbar area used to enhance navigation within the `RemoteFileSelector` component. This class is primarily responsible for rendering the RemoteFileToolBar component.

The RemoteFileToolBar component appears as follows:

The following tasks can be done using the ToolBar component:

- OpenFolder - opens or drills down to a subfolder and is represented by the ChoiceBox drop-down component, only action returned for the `COMBO_AREA` or the navigationComponent
- UpOneLevel - navigates to parent folder and is represented by the UpOneLevel folder image, only action returned for the `TOOLBAR_AREA` or menu bar area
- showDescription - displays the description for each folder and file and is represented by the CheckBox component. The showDescription function is not available by default.

The RemoteFileToolBar component is an HTML table that contains HTML tables, `Transformation Beans`, and `Actions`. See `BaseTransformation` to understand more about `Transformation Beans`. Also, the `HttpRemoteFileSelectorSupport` provides more details about the `UP_ONE_LEVEL_ACTION, OPEN_FOLDER_ACTIOIN` action and the `DISPLAY_SEARCH_RESULTS_ACTION` action. By default, these are the only actions returned for this component.

RemoteFileToolBar Elements
Transformation Beans | `ChoiceBox`
`CheckBox`
`Label`
Actions | `UP_ONE_LEVEL`
`OPEN_FOLDER`

The RemoteFileToolBar 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.

All of the sub-components of the RemoteFileToolBar component make use of a style map. A default template file, `RemoteFileToolBar.html` is used to control the layout of the component. A custome default template file can be set using the `#setTemplateFile` method.

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` | `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.BaseActionCompositeTransformation
`viewerSupport`

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`

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`

Constructor Summary
`RemoteFileToolBar()` Constructs a new RemoteFileToolBar component.
`RemoteFileToolBar(RemoteFileSelectorInterface rfs)` Constructs a new `RemoteFileToolBar` using the RemoteFileSelector component specified.
`RemoteFileToolBar(RemoteFileSelectorInterface rfs, java.util.Locale locale)` Constructs a new `RemoteFileToolBar` using the specified `RemoteFileSelector` viewer component and the specified locale.

Method Summary
`protected BaseLabel` | `createDefaultLabel()` Returns the default instance of the Label `Transformation Bean` used for the toolbar label.
`protected BaseChoiceBox` | `createDefaultNavigator()` Returns the default component used for the `Location` selection component in the toolbar.
`protected BaseButton` | `createDefaultUpOneLevelComponent()` Returns an image to be used for the `UP_ONE_LEVEL` action.
`protected ActionSupportFilter` | `getActionFilter(java.lang.String actionType)` Returns the ActionSupportFilter that is needed to query an HttpActionProvider for the specified actionType.
`protected ActionList` | `getNavigatorActions()` Returns actions associated with the navigation component in the toolbar.
`protected void` | `prepareToWriteToolbar()` The sub-components of the toolbar are prepared for rendering.
`protected void` | `setLocaleDependentProperties(java.util.Locale locale)` Sets properties that should be updated if the locale changes.
`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.BaseRemoteFileToolBar
`getModel, isSearchResultsDisplayed, setModel, setSearchResultsDisplayed`

Methods inherited from class com.sas.servlet.tbeans.BaseActionCompositeTransformation
`applyTemplate, applyTemplate, dispose, 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 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.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

### DEFAULT_TEMPLATE_FILE_NAME

    public static final 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. If the template file is not found then this defaultTemplate will be used.

  See Also:
    Constant Field Values

Constructor Detail

### RemoteFileToolBar

    public RemoteFileToolBar()

  Constructs a new RemoteFileToolBar component. The model is set to null when the component is constructed with this method.

### RemoteFileToolBar

    public RemoteFileToolBar(RemoteFileSelectorInterface rfs)

  Constructs a new `RemoteFileToolBar` using the RemoteFileSelector component specified.

  Parameters:
    `rfs` - component that implements the RemoteFileSelectorInterface, such as the RemoteFileSelector component

### RemoteFileToolBar

    public RemoteFileToolBar(RemoteFileSelectorInterface rfs,
                             java.util.Locale locale)

  Constructs a new `RemoteFileToolBar` using the specified `RemoteFileSelector` viewer component and the specified locale.

  The following Keys are set by default for the tool bar component:

  1. RFS_TOOLBAR_LOCATION_LABEL
  2. RFS_TOOLBAR_LOCATION_CHOICE
  3. RFS_UPONELEVEL_ACTION
  The `RFS_TOOLBAR_SHOWDESCRIPTION_COMPONENT` key is null by default. A checkbox is expected for this key. The checkbox can be set to toggle a description for the data item.

  Parameters:
    `rfs` - `RemoteFileSelectorInterface` instance
    `locale` - application locale

Method Detail

### prepareToWriteToolbar

    protected void prepareToWriteToolbar()

  The sub-components of the toolbar are prepared for rendering. The location `ChoiceBox` is populated with the open directories. The `onChange` event value is also set to ensure that the proper action is taken when a selection occurs in the drop-down. If a directory is selected then the user is displayed the contents of that directory. If `Search Results` is selected then the user is returned to the last search results.

  If a `basePath` is returned from the model then that `basePath` is used to set the root level for the component. The path set on the model should start with the `basePath` value. If the path length is less than the `basePath` length then the drop-down cannot be successfully populated.

### createDefaultNavigator

    protected BaseChoiceBox createDefaultNavigator()

  Returns the default component used for the `Location` selection component in the toolbar. This method is called when the `RemoteFileToolbar` is constructed.

  Returns:
    `BaseChoiceBox Transformation Bean` instance
  See Also:
    `#getNavigator()`

### createDefaultLabel

    protected BaseLabel createDefaultLabel()

  Returns the default instance of the Label `Transformation Bean` used for the toolbar label. This method is invoked by the `getLabel` method when an instance of the toolbar label does not exists.

  Returns:
    `BaseLabel Label Transformation Bean` for the toolbar, the default value is `Location:`
  See Also:
    `#getLabel()`

### createDefaultUpOneLevelComponent

    protected BaseButton createDefaultUpOneLevelComponent()

  Returns an image to be used for the `UP_ONE_LEVEL` action. This method is called when the RemoteFileToolbar is constructed.

  Returns:
    upOneLevel image

### getNavigatorActions

    protected ActionList getNavigatorActions()

  Returns actions associated with the navigation component in the toolbar. Only one action can be successfully rendered with this component. By default this component is a `ChoiceBox`.

  Returns:
    ActionList list of valid actions for the `COMBO_AREA`, by default there is only one action expected and that is the `OPEN_FOLDER` action
  See Also:
    `HttpRemoteFileSelectorSupport`

### getActionFilter

    protected ActionSupportFilter getActionFilter(java.lang.String actionType)

  Returns the ActionSupportFilter that is needed to query an HttpActionProvider for the specified actionType.

  Overrides:
    `getActionFilter` in class `BaseActionCompositeTransformation`
  Parameters:
    `actionType.` -
  Returns:
    the ActionSupportFilter that is needed to query an HttpActionProvider for the specified actionType.

### setLocaleDependentProperties

    protected void setLocaleDependentProperties(java.util.Locale locale)

  Sets properties that should be updated if the locale changes.

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

  The updated properties include the `RFS_TOOLBAR_LOCATION_LABEL` text and the drop down `SEARCH_RESULTS` text.

  Overrides:
    `setLocaleDependentProperties` in class `BaseTransformation`
  Parameters:
    `locale` - new locale setting

### writeContent

    protected void writeContent(java.io.PrintWriter out)
                         throws java.io.IOException

  Description copied from class: `BaseActionCompositeTransformation2`
  Writes the transformation's main content which is everything except for the following:
  - Opening container html element.
  - Any content provided by preWrite() method
  - Any content provided by postWrite() method
  - Closing container html element.

  Specified by:
    `writeContent` in class `com.sas.servlet.tbeans.BaseActionCompositeTransformation2`
  Throws:
    `java.io.IOException`
  See Also:
    `BaseActionCompositeTransformation2.write(PrintWriter)`

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.