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.html
Class ExpandCollapse

    com.sas.servlet.tbeans.html.ExpandCollapse

All Implemented Interfaces:
  HttpActionProviderInterface, com.sas.beans.PropertyChangeSource, com.sas.lang.ObjectDataInterface, com.sas.servlet.tbeans.AJAXControllerURLInterface, ComplexStyleInterface, CompositeComponentInterface, ExpandCollapseKeysInterface, ExpandCollapseStyleKeysInterface, RenderableInterface, TemplateInterface, com.sas.servlet.tbeans.TemplateKeyInterface, TransformationInterface, com.sas.util.WriteToPrintWriterInterface, java.io.Serializable

    public class ExpandCollapse

implements ExpandCollapseStyleKeysInterface, ComplexStyleInterface

The ExpandCollapse is a TransformationBean™ used to expand and collapse content within an HTML div tag. By default, this class contains a title area containing text and buttons used for expand or collaping the content area. The content area is written inside of an html div tag, which can be expanded or collapsed.

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

The ExpandCollapse 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 ExpandCollapse uses the following JavaScript files:

  sas_ExpandCollapse.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.

JSP custom tags provide an alternative to using the TransformationBeans™. Visit the Custom Tag Library Reference for additional information on the sas:ExpandCollapse custom tag.

Note: A snapshot of the AppDev Studio Developers Site is installed on your local Web server when you install AppDev Studio. To access the site from webAF, select Help -> Developer Site .

See Also:
  Serialized Form

Field Summary
`static java.lang.String` | `EXPANDED_MAP` String map name used to store state on the session.

Fields inherited from class com.sas.servlet.tbeans.BaseExpandCollapse
`content, contentBean, imageLocation, SAVE_STATE_NONE, SAVE_STATE_SESSION`

Fields inherited from interface com.sas.servlet.tbeans.html.ExpandCollapseStyleKeysInterface
`BUTTONS_STYLE, BUTTONS_TABLE_STYLE, CONTAINER_STYLE, DIV_STYLE, SEPARATOR_STYLE, TITLE_STYLE`

Fields inherited from interface com.sas.servlet.tbeans.ExpandCollapseKeysInterface
`COL_BUTTON, CONTENT, DIV_ID, EXP_BUTTON, EXPCOL_BUTTON, REMOVE_BUTTON, TITLE_LABEL`

Constructor Summary
`ExpandCollapse()` Default Constructor.
`ExpandCollapse(java.lang.String name)` Constructor

Method Summary
`void` | `cleanUpResources()` This method releases all of the necessary resources that were needed by the transformation bean to render itself.
`int` | `getAutoWidth()`
`java.lang.String` | `getPostExpandCollapse()`
`java.lang.String` | `getPreExpandCollapse()`
`java.util.Map` | `getStyleMap()` Returns the component styles used for this component
`protected java.lang.String` | `getTooltipsParms()`
`static void` | `servletInvocationMethod(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` Method called by the MethodInvocationServlet to save the state of the component.
`void` | `setAutoWidth(int value)`
`void` | `setPostExpandCollapse(java.lang.String postExpandCollapse)`
`void` | `setPreExpandCollapse(java.lang.String preExpandCollapse)`
`void` | `write(java.io.PrintWriter out)` Writes the transformed representation of the selector

Methods inherited from class com.sas.servlet.tbeans.BaseExpandCollapse
`getCollapseImageDefault, getCollapseImageDisabled, getCollapseImageTooltip, getContent, getContentBean, getExpandImageDefault, getExpandImageDisabled, getExpandImageTooltip, getImageLocation, getRemoveImageDefault, getRemoveImageTooltip, getSaveState, getTitle, isExpanded, isRemoveButtonVisible, isSingleButton, setCollapseImageDefault, setCollapseImageDisabled, setCollapseImageTooltip, setContent, setContent, setContentBean, setExpanded, setExpandImageDefault, setExpandImageDisabled, setExpandImageTooltip, setImageLocation, setRemoveButtonVisible, setRemoveImageDefault, setRemoveImageTooltip, setSaveState, setSingleButton, setTitle`

Methods inherited from class com.sas.servlet.tbeans.BaseCompositeTransformation
`applyTemplate, applyTemplate, getActionProvider, getComponent, getComponents, getDefaultTemplate, getStyleInfo, getTemplate, getTemplateDictionary, getTemplateFileName, getTemplateLocation, getVisibleComponents, isFlushEnabled, propertyChange, removeComponent, setActionProvider, setCleanUpResourcesOn, setComponent, setFlushEnabled, setId, setLocale, setRequest, setResponse, setStyleInfo, setTemplate, setTemplate, setTemplateDictionary, setTemplateFileName, setTemplateLocation, writeTemplate`

Methods inherited from class com.sas.servlet.tbeans.BaseTransformation
`addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCustomAttributes, getDescription, getId, getInputTransform, getLocale, getName, getObjectData, getObjectDataProperty, getOutputTransform, getRequest, getResponse, getTagEpilog, getTagProlog, hasListeners, isCleanUpResourcesOn, isVisible, removePropertyChangeListener, removePropertyChangeListener, setCustomAttributes, setInputTransform, setLocaleDependentProperties, setName, setObjectData, setObjectDataProperty, setOutputTransform, setTagEpilog, setTagProlog, setVisible, toString, write, write, write`

Methods inherited from interface com.sas.actionprovider.HttpActionProviderInterface
`getRequest`

Field Detail

### EXPANDED_MAP

    public static final java.lang.String EXPANDED_MAP

  String map name used to store state on the session.

  See Also:
    Constant Field Values

Constructor Detail

### ExpandCollapse

    public ExpandCollapse()

  Default Constructor. Note that the default constructor will use the name "sas_ExpandCollapse" appended with a randomly generated unique number. Note that saving of state will not work unless a unique name that will not change is set.

### ExpandCollapse

    public ExpandCollapse(java.lang.String name)

  Constructor

  Parameters:
    `name` - The name String set on this component using setName().

Method Detail

### servletInvocationMethod

    public static void servletInvocationMethod(javax.servlet.http.HttpServletRequest request,
                                               javax.servlet.http.HttpServletResponse response)

  Method called by the MethodInvocationServlet to save the state of the component.

  Parameters:
    `request` - The HttpServletRequest from the servlet
    `response` - The HttpServletResponse from the servlet

### getStyleMap

    public java.util.Map getStyleMap()

  Returns the component styles used for this component

  Specified by:
    `getStyleMap` in interface `ComplexStyleInterface`
  Overrides:
    `getStyleMap` in class `BaseCompositeTransformation`
  Returns:
    a map of styles used for this component

### cleanUpResources

    public void cleanUpResources()

  This method releases all of the necessary resources that were needed by the transformation bean to render itself. These resources include fields such as `request` and `response`. This method calls the setRequest and setResponse methods with a null value.

  Overrides:
    `cleanUpResources` in class `BaseExpandCollapse`

### write

    public void write(java.io.PrintWriter out)
               throws java.io.IOException

  Writes the transformed representation of the selector

  Specified by:
    `write` in interface `TransformationInterface`
  Specified by:
    `write` in interface `com.sas.util.WriteToPrintWriterInterface`
  Overrides:
    `write` in class `BaseCompositeTransformation`
  Parameters:
    `out` - The output stream
  Throws:
    `java.io.IOException` - Thrown if some type of I/O error occurs

### setAutoWidth

    public void setAutoWidth(int value)

### getAutoWidth

    public int getAutoWidth()

### getPostExpandCollapse

    public java.lang.String getPostExpandCollapse()

  Returns:
    Returns the postExpandCollapse.

### setPostExpandCollapse

    public void setPostExpandCollapse(java.lang.String postExpandCollapse)

  Parameters:
    `postExpandCollapse` - The postExpandCollapse to set.

### getPreExpandCollapse

    public java.lang.String getPreExpandCollapse()

  Returns:
    Returns the preExpandCollapse.

### setPreExpandCollapse

    public void setPreExpandCollapse(java.lang.String preExpandCollapse)

  Parameters:
    `preExpandCollapse` - The preExpandCollapse to set.

### getTooltipsParms

    protected java.lang.String getTooltipsParms()

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.