public abstract class

AbstractTabTransform

extends AbstractAppTransform
java.lang.Object
   ↳ com.microstrategy.web.transform.AbstractTransform
     ↳ com.microstrategy.web.transform.AbstractLayoutTransform
       ↳ com.microstrategy.web.app.transforms.AbstractAppTransform
         ↳ com.microstrategy.web.app.transforms.AbstractTabTransform
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

This is the base class for those Transforms that will generate the Tab's content in a tabbed environement. In general, Microstrategy Web utilizes a TabManager for these scenarios, the AbstractTabTransform generates all he HTML and javascript necessary for a single Tab to interact with it.

To generate the content of a Tab, subclasses need only to worry about implementing the renderContentsBody method. For example:

 public class CustomTab extends AbstractTabTransform {

     public void renderContentsBody(MarkupOutput out) {
         out.append("My tab content.");
     }

 }
 
The previous class can be used with a TabBean inside a TabManager with multiple tabs; when the corresponding tab is selected, its content will be:
My tab content.

Notice that this class does not implement the LayoutTransform; subclasses might decide to do so, though, in these cases the layout will only be applied to the content of the tab.

Summary

Constants
String FP_TAB_HEIGHT Constant specifying the name of the formal parameter for specifying the height of the tabs on the editor
[Expand]
Inherited Constants
From class com.microstrategy.web.app.transforms.AbstractAppTransform
Fields
protected String cssBody Property with the name of the css class to use for the body of this instance transform output.
protected String cssFrame Property with the name of the css class to use for the frame of this instance transform output.
protected String cssPicker Property with the name of the css class to use for the div including a single picker of this instance transform output.
protected String cssPickers Property with the name of the css class to use for the div including all pickers of this instance transform output.
protected String scriptClassBody Property with the value of the scriptClass attribute for the body of this instance transform output
protected String scriptClassFrame Property with the value of the scriptClass attribute for the frame of this instance transform output
protected String styBody Property with the value of the sty attribute for the body of this instance transform output
protected String styFrame Property with the value of the sty attribute for the frame of this instance transform output
public FormalParameter tabHeight Indicates the height of the tabs on the editor.
protected String tyBody Property with the value of the ty attribute for the body of this instance transform output
protected String tyFrame Property with the value of the ty attribute for the frame of this instance transform output
[Expand]
Inherited Fields
From class com.microstrategy.web.app.transforms.AbstractAppTransform
Public Constructors
AbstractTabTransform()
Default no-argument constructor.
Public Methods
void AddJSValidationInfo(Tag inputTag, String type, String min, String max, String name, String errorMsg)
This method is deprecated. please use addJSValidationInfo(Tag, String, String, String, String, String) instead
void addJSValidationInfo(Tag inputTag, String type, String min, String max, String name, String errorMsg)
Add the necessary JavaScript validation information
String getDescription()
Returns the textual description of the transform
Tag getFieldSetTag(String title)
Convenience method that builds and returns a fieldset html tag.
Class getSupportedBeanType()
Returns the supported bean type.
void initializeCss()
Initializes the Css Classes to use.
void initializeJavaScriptAttributes()
For JavaScript, certain properties are required to be added to the HTML tags to generate for its integration with the code generated for the feature to work in DHTML environments.
void initializeTransform(Transformable data)
This method initialize the private and protected fields of the transform.
boolean isCurrentTab()

This method returns true whenever this Tab is selected.

void renderColorDropdown(MarkupOutput out, String cmdId, String cmdValue, ShortcutList picker)
This method renders a single dropdown to be used with a color picker
void renderContents(MarkupOutput out)
Method that renders a frame for the main contents of the transform, according to the information available on the bean.
abstract void renderContentsBody(MarkupOutput out)
Method that renders the main contents of the transform, according to the information available on the bean.
void renderDropdown(MarkupOutput out, String cmdId, String cmdValue, ShortcutList picker, String value)
This method renders a single dropdown list to be used within a tab.
void renderFlashWarning(MarkupOutput out)

Generates the HTML with a label that reads '(Flash Only)'.

void renderJavascriptLinks(MarkupOutput out)
Used to dynamically include links to js files.
void renderTabFrame(MarkupOutput out)
Method that renders a frame for all the contents and sections of the bean that are to be displayed.
void renderTabSectionTitle(MarkupOutput out, String title)
This method is deprecated. please use getFieldSetTag instead
void transformForRequestSuccessful(MarkupOutput out)
Transforms the assosciated TabBean when its status is WebBeanRequestSuccessful.
Protected Methods
void addPicker(ShortcutList picker)
String getArgumentName(WebEvent event, int argumentId)
Get the name of the argument assigned to the WebEvent, based on the indicated id.
Map getAttributesBody()
This method return a Map (name/value pairs) of attributes to use for the div enclosing the body of the Tab.
Map getAttributesFrame()
This method return a Map (name/value pairs) of attributes to use for the div enclosing the content of the Tab.
Tag getDropDownTag(String cmdId, String cmdValue, ShortcutList picker, String type)
Tag getLabelTag(String attFor, String labelDescriptor)
String getPickerId(ShortcutList picker)
TabBean getTabBean()
Returns the TabBean for this tab.
TabManagerBean getTabManagerBean()
Returns the TabManagerBean for this Tab.
boolean isIFrameEnabled()
Whether iframe update technology is enabled for this Transform.
void renderPickers(MarkupOutput out)
This method needs to be overriden by those Transforms that has a picker.
void renderSingleOption(MarkupOutput out, String cmdId, boolean checked, String msg, boolean isDisabled, boolean setCmdValue)
void renderSingleOption(MarkupOutput out, String cmdId, String propertyValue, String msg, boolean isDisabled)
[Expand]
Inherited Methods
From class com.microstrategy.web.app.transforms.AbstractAppTransform
From class com.microstrategy.web.transform.AbstractLayoutTransform
From class com.microstrategy.web.transform.AbstractTransform
From class java.lang.Object
From interface com.microstrategy.web.app.transforms.AppTransform
From interface com.microstrategy.web.transform.Transform

Constants

public static final String FP_TAB_HEIGHT

Constant specifying the name of the formal parameter for specifying the height of the tabs on the editor

Constant Value: "tabHeight"

Fields

protected String cssBody

Property with the name of the css class to use for the body of this instance transform output. The value specified on the cssPrefix formal parameter will by default be added to this property value at initialization time (initializeCss())

protected String cssFrame

Property with the name of the css class to use for the frame of this instance transform output. The value specified on the cssPrefix formal parameter will by default be added to this property value at initialization time (initializeCss())

protected String cssPicker

Property with the name of the css class to use for the div including a single picker of this instance transform output. The value specified on the cssPrefix formal parameter will by default be added to this property value at initialization time (initializeCss())

protected String cssPickers

Property with the name of the css class to use for the div including all pickers of this instance transform output. The value specified on the cssPrefix formal parameter will by default be added to this property value at initialization time (initializeCss())

protected String scriptClassBody

Property with the value of the scriptClass attribute for the body of this instance transform output

protected String scriptClassFrame

Property with the value of the scriptClass attribute for the frame of this instance transform output

protected String styBody

Property with the value of the sty attribute for the body of this instance transform output

protected String styFrame

Property with the value of the sty attribute for the frame of this instance transform output

public FormalParameter tabHeight

Indicates the height of the tabs on the editor.

protected String tyBody

Property with the value of the ty attribute for the body of this instance transform output

protected String tyFrame

Property with the value of the ty attribute for the frame of this instance transform output

Public Constructors

public AbstractTabTransform ()

Default no-argument constructor. Initializes formal parameters.

Public Methods

public void AddJSValidationInfo (Tag inputTag, String type, String min, String max, String name, String errorMsg)

This method is deprecated.
please use addJSValidationInfo(Tag, String, String, String, String, String) instead

Add the necessary JavaScript validation information

Parameters
inputTag Tag the Tag where the infortmation will be added
type String The type pof data to validate ('1'- Integer; '2'- float)
min String The minimum number allowed
max String The maximum number allowed
name String The name of the field. (Used on the error message)
errorMsg String The error message to display. This is only needed for custom messages, if no message is specified, the default one will be used.

public void addJSValidationInfo (Tag inputTag, String type, String min, String max, String name, String errorMsg)

Add the necessary JavaScript validation information

Parameters
inputTag Tag the Tag where the infortmation will be added
type String The type pof data to validate ('1'- Integer; '2'- float)
min String The minimum number allowed
max String The maximum number allowed
name String The name of the field. (Used on the error message)
errorMsg String The error message to display. This is only needed for custom messages, if no message is specified, the default one will be used.

public String getDescription ()

Returns the textual description of the transform

Returns
  • the description of the transform

public Tag getFieldSetTag (String title)

Convenience method that builds and returns a fieldset html tag.

Parameters
title String that will be displayed as the title
Returns
  • fieldSet tag

public Class getSupportedBeanType ()

Returns the supported bean type. This transform supports any of the TabBean instances

Returns
  • the class of the bean supported by this transform.

public void initializeCss ()

Initializes the Css Classes to use. For each one of the css classes to use, the prefix indicated on the formal parameter is added to the name of the class to use.

public void initializeJavaScriptAttributes ()

For JavaScript, certain properties are required to be added to the HTML tags to generate for its integration with the code generated for the feature to work in DHTML environments. This method assigns values to these attributes, so they can be displayed together with the tags they represent. If a value is set to be null, it won't be included on the HTML tag definition. By default, it includes the definition of values for properties such as styFrame, tyFrame and scriptClassFrame.

public void initializeTransform (Transformable data)

This method initialize the private and protected fields of the transform. In particular it invokes the initializeJavaScriptAttribute() method.

Parameters
data Transformable instance to be transformed.

public boolean isCurrentTab ()

This method returns true whenever this Tab is selected.

When the Tab is selected, the output will be generated and displayed to the user. When the Tab is not selected, the output will still be generated, but it will not get displayed (it will get displayed when the user selects the Tab in the TabManager using javascript).

This method will determine if the Tab is selected by comparing the TabManagerBean's currentTab with the TabBean's getTabRepresented. This method will return true also for those cases when there is no TabManagerBean.

Returns
  • boolean true when this is the current tab

public void renderColorDropdown (MarkupOutput out, String cmdId, String cmdValue, ShortcutList picker)

This method renders a single dropdown to be used with a color picker

Parameters
out MarkupOutput where the content should be generated
cmdId the dropdown's command id
cmdValue the dropdown's current command value.
picker the ShortcutList for the picker.

public void renderContents (MarkupOutput out)

Method that renders a frame for the main contents of the transform, according to the information available on the bean. Calls renderContentsBody()

Parameters
out MarkupOutput instance where the HTML contents to render will be saved.

public abstract void renderContentsBody (MarkupOutput out)

Method that renders the main contents of the transform, according to the information available on the bean. This method can be customized if users would like to obtain a different output for the same given bean.

Parameters
out MarkupOutput instance where the HTML contents to render will be saved.

public void renderDropdown (MarkupOutput out, String cmdId, String cmdValue, ShortcutList picker, String value)

This method renders a single dropdown list to be used within a tab.

Parameters
out MarkupOutput where the content should be generated
cmdId the dropdown's command id
cmdValue the dropdown's current command value.
picker the ShortcutList for the picker.
value the dropdown current value.

public void renderFlashWarning (MarkupOutput out)

Generates the HTML with a label that reads '(Flash Only)'. The label is invisible until the Tab Bone decides to make it visible.

Parameters
out MarkupOutput instance where the HTML contents to render will be saved.

public void renderJavascriptLinks (MarkupOutput out)

Used to dynamically include links to js files. Extend with the list of files your transform requires.

Parameters
out MarkupOutput instance where the HTML contents to render will be saved.

public void renderTabFrame (MarkupOutput out)

Method that renders a frame for all the contents and sections of the bean that are to be displayed. Calls renderTabFrameBody()

Parameters
out MarkupOutput instance where the HTML contents to render will be saved.

public void renderTabSectionTitle (MarkupOutput out, String title)

This method is deprecated.
please use getFieldSetTag instead

Convenience method that displays the HTML required for rendering the title of a section.

Parameters
out MarkupOutput instance where the HTML contents to render will be saved.
title String that will be displayed as title

public void transformForRequestSuccessful (MarkupOutput out)

Transforms the assosciated TabBean when its status is WebBeanRequestSuccessful. Calls renderTabFrame()

Parameters
out MarkupOutput instance where the contents of this transform will be saved.

Protected Methods

protected void addPicker (ShortcutList picker)

protected String getArgumentName (WebEvent event, int argumentId)

Get the name of the argument assigned to the WebEvent, based on the indicated id. This method can be overwritten with an event-argumentId mapping in case the original event defined on the application is customized.

Parameters
event WebEvent from where the argument name will be retrieved
argumentId int with the identifier of the argument to search for on the event
Returns
  • the corresponding name of the event for the specified id. If it is not found, it will return null.

protected Map getAttributesBody ()

This method return a Map (name/value pairs) of attributes to use for the div enclosing the body of the Tab. These attributes include those required for javascript and formatting (for example, "sty", "ty" and "scriptclass").

Returns
  • Map with HTML attributes for the body div.

protected Map getAttributesFrame ()

This method return a Map (name/value pairs) of attributes to use for the div enclosing the content of the Tab. These attributes include those required for javascript and formatting (for example, "sty", "ty" and "scriptclass").

Returns
  • Map with HTML attributes for the body div.

protected Tag getDropDownTag (String cmdId, String cmdValue, ShortcutList picker, String type)

protected Tag getLabelTag (String attFor, String labelDescriptor)

protected String getPickerId (ShortcutList picker)

protected TabBean getTabBean ()

Returns the TabBean for this tab.

Returns
  • TabBean for this tab.

protected TabManagerBean getTabManagerBean ()

Returns the TabManagerBean for this Tab. By default, this method just checks whether the parent is a TabManagerBean and returns it if so.

Returns
  • TabManagerBean controlling this Tab.

protected boolean isIFrameEnabled ()

Whether iframe update technology is enabled for this Transform.

Returns
  • whether iframe is enabled

protected void renderPickers (MarkupOutput out)

This method needs to be overriden by those Transforms that has a picker. By default nothing is rendered

Parameters
out MarkupOutput instance where the contents of this transform will be generated.

protected void renderSingleOption (MarkupOutput out, String cmdId, boolean checked, String msg, boolean isDisabled, boolean setCmdValue)

protected void renderSingleOption (MarkupOutput out, String cmdId, String propertyValue, String msg, boolean isDisabled)