java.lang.Object | ||
↳ | com.microstrategy.web.app.gui.AbstractGuiElement | |
↳ | com.microstrategy.web.app.gui.EditorImpl |
Title: EditorImpl.
Description: implementation of the Editor
interface
for the editor components in Microstrategy Web.
The Editor GUI Element is responsible for producing a dialog like interface
used by all the editors in the application. Its properties and methods
allow the user to quiclky generate a dialog that follows the look and feel
standards of Microstrategy Web. Instances of this interface are used by the
AbstractEditorTransform
to generate the application dialogs, but its usage is
not limited to transform as any object capable of handling a MarkupOutput
can use this component.
Instances to this component must be obtained through the GuiElementFactory
.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
class | EditorImpl.Button |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
protected Hashtable | _bodyAttributes | Hashtable property for holding the main editor body attributes | |||||||||
protected MarkupOutput | _contents | MarkupOutput property for holding the HTML contents of the editor. |
|||||||||
protected String | _contentsCss | the content css class name for the editor | |||||||||
protected boolean | _createForm | Boolean property that determines whether the editor contains a form | |||||||||
protected MarkupOutput | _extraProperties |
This field is deprecated.
use setAttribute(String, String, int)
|
|||||||||
protected String | _formAction | String property for holding the form's action for the editor | |||||||||
protected String | _formExtraAttributes | String property for holding the form's extra attributes for the editor | |||||||||
protected String | _formMethod | String property for holding the form's method for the editor | |||||||||
protected String | _formName | String property for holding the form name for the editor | |||||||||
protected String | _formOnSubmit | String property for holding the form's onSubmit attribute for the editor | |||||||||
protected String | _globalContentCss | String property for holding the global contents css class name for the editor | |||||||||
protected String | _globalCss | String property for holding the global css class name for the editor | |||||||||
protected String | _imagesFolder | String property for holding the folder path of the images location | |||||||||
protected Hashtable | _mainAttributes | Hashtable property for holding the main editor body attributes | |||||||||
protected MarkupOutput | _postButtonContents | MarkupOutput property for holding the HTML contents to be placed after the button control on the editor. |
|||||||||
protected String | _title | String property for holding the title of the editor | |||||||||
protected Hashtable | _titleAttributes | Hashtable property for holding the main editor title attributes | |||||||||
protected String | _titleBarCss | ||||||||||
protected String | _titleCss | String property for holding the title css class name for the editor | |||||||||
protected MarkupOutput | _titleElements | MarkupOutput property for holding the title elements of the editor. |
|||||||||
protected String | _titleElementsCss | String property for holding the title elements css class name for the editor |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
EditorImpl()
Class constructor, initializes main properties.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
appendDisplayFlag(int flag)
Append a new display flag value
| ||||||||||
Tag |
getActionButtonsBar()
Returns the TR tag that will be used to render the action buttons bar
| ||||||||||
WebEvent |
getApplyEvent()
Get the
WebEvent instance to be associated with the Apply button on the editor | ||||||||||
String |
getApplyJS()
Get the JavaScript to be associated with the Apply button and should be executed if it
is selected
| ||||||||||
boolean |
getCanAutoSize()
get the autosize property of the editor
| ||||||||||
WebEvent |
getCancelEvent()
Get the
WebEvent instance to be associated with the Cancel button on the editor | ||||||||||
String |
getCancelJS()
Get the JavaScript to be associated with the Cancel button and should be executed if it
is selected
| ||||||||||
WebEvent |
getCloseEvent()
Get the
WebEvent instance to be associated with the Close button on the editor | ||||||||||
String |
getCloseJS()
Indicates JavaScript to be executed when closing current Editor.
| ||||||||||
MarkupOutput |
getContents()
Returns the content of the editor.
| ||||||||||
int |
getDisplayFlags()
Get the display flag value as specified for the editor
| ||||||||||
WebEvent |
getHelpEvent()
This method is deprecated.
use
getHelpEvent()
| ||||||||||
String |
getHelpToolTip()
Get the tooltip of the help button of the editor
| ||||||||||
String | getHelpTopic() | ||||||||||
String |
getHelpType()
get the type of the help file
| ||||||||||
WebEvent |
getOkEvent()
Get the
WebEvent instance to be associated with the OK button on the editor | ||||||||||
String |
getOkJS()
Get the JavaScript to be associated with the Ok button and should be executed if it
is selected
| ||||||||||
MarkupOutput |
getPostButtonContents()
Get the content after the apply/ok/cancel buttons
| ||||||||||
String |
getTitle()
Get the title of the editor
| ||||||||||
MarkupOutput |
getTitleElements()
Get the title elements of the editor
| ||||||||||
boolean |
getUseDHTMLForEditorClose()
Returns if the editor should use DHTML (JavaScript) for closing the editor.
| ||||||||||
boolean |
hasSpaceAfterEditor()
Determine whether to display a blank space underneath the editor
| ||||||||||
boolean |
isHideFocus()
gets the hide focus property of the buttons in the editor
| ||||||||||
void |
renderCloseButton(MarkupOutput spanOut, WebEvent closeEvent, String closeJS)
Generate the Close button for this editor
| ||||||||||
MarkupOutput |
renderElement()
render the gui element in a MarkupOutput object
| ||||||||||
MarkupOutput |
renderElement(String cssClass)
Generate the output of the editor according to the information used for initializing
its properties, in particular, the editor contents.
| ||||||||||
void |
renderHelpButton(MarkupOutput out)
Generate the Help button for this editor
| ||||||||||
void |
renderHelpButton(MarkupOutput spanOut, WebEvent helpEvent, String helpTopic)
This method is deprecated.
use
renderHelpButton(MarkupOutput) | ||||||||||
void |
setActionButtonsBar(Tag ab)
Set the TR tag that will be used to render the action buttons bar
| ||||||||||
void |
setApplyEvent(WebEvent event)
Set the
WebEvent instance to be associated with the Apply button on the editor | ||||||||||
void |
setApplyJS(String value)
Define the JavaScript to be associated with the Apply button and should be executed if it
is selected
| ||||||||||
void |
setApplyLabel(String applyLabel)
Set the apply label, which is displayed as the text of the apply button
| ||||||||||
void |
setApplyTooltip(String applyTooltip)
Set the apply tooltip, which is displayed as the text of the ok button
| ||||||||||
void |
setAttribute(String attributeName, String value, int location)
Set attributes for the location specified (EnumEditorSectionTypes.EditorMainDiv, EnumEditorSectionTypes.EditorTitleDiv, EnumEditorSectionTypes.EditorBodyDiv).
| ||||||||||
void |
setButtonDisabled(int button, boolean disableValue)
Set the disabled property of the specified button.
| ||||||||||
void |
setButtonsCss(String css)
Set the button css class name for the editor
| ||||||||||
void |
setCanAutoSize(boolean value)
Set the autosize property of the editor
| ||||||||||
void |
setCancelEvent(WebEvent event)
Set the
WebEvent instance to be associated with the Cancel button on the editor | ||||||||||
void |
setCancelJS(String value)
Define the JavaScript to be associated with the Cancel button and should be executed if it
is selected
| ||||||||||
void |
setCancelLabel(String cancelLabel)
Set the cancel label, which is displayed as the text of the cancel button
| ||||||||||
void |
setCancelTooltip(String cancelTooltip)
Set the cancel tooltip, which is displayed as the text of the cancel button
| ||||||||||
void |
setCloseEvent(WebEvent event)
Set the
WebEvent instance to be associated with the Close button on the editor | ||||||||||
void |
setCloseJS(String value)
Specifies JavaScript function to be invoked when closing Editor in DHTML mode only.
| ||||||||||
void |
setCloseLabel(String closeLabel)
Set the close label, which is displayed as the tooltip of the close icon
| ||||||||||
void |
setContents(MarkupOutput out)
This method is deprecated.
Don't create a MarkupOutput and create it, instead call
getContents
and populate this instance.
| ||||||||||
void |
setContentsCss(String css)
Set the content css class name for the editor
| ||||||||||
void |
setCssPrefix(String value)
Define the prefix the css classes will have for the HTML contents generated by this editor component.
| ||||||||||
void |
setDisplayFlags(int flags)
Set the display flag to use for the editor
| ||||||||||
void |
setEditorDefinitionLayout(String fileName)
Sets the definition layout for the editor.
| ||||||||||
void |
setExtraProperties(MarkupOutput mo)
This method is deprecated.
replaced by
setAttribute(String, String, int)
| ||||||||||
void |
setForm(String action, String method, String formName, String extraAttributes)
Set the form information for the editor
| ||||||||||
void |
setForm(String action, String method, String formName)
Set the form information for the editor
| ||||||||||
void |
setForm(String action, String method, String formName, String extraAttributes, String onSubmitInfo)
Set the form information for the editor
| ||||||||||
void |
setFormId(String value)
This method is deprecated.
Unused Method
| ||||||||||
void |
setGlobalContentCss(String css)
Set the global content css class name for the editor
| ||||||||||
void |
setGlobalCss(String css)
Set the global css class name for the editor
| ||||||||||
void |
setHelpEvent(WebEvent event)
This method is deprecated.
use
setHelpType(String)
| ||||||||||
void |
setHelpLabel(String helpLabel)
set the help label, which is displayed as the tooltip of the help icon
| ||||||||||
void |
setHelpToolTip(String tooltip)
Set the tooltip of the editor
| ||||||||||
void |
setHelpTopic(String topic)
Set the help topic of the editor
| ||||||||||
void |
setHelpType(String type)
set the help type for the editor
| ||||||||||
void |
setHideFocus(boolean value)
set the hide focus property of the buttons in the editor
| ||||||||||
void |
setImageBasePath(String path)
Set the folder path to be used as base for all the images to use while displaying menus
| ||||||||||
void |
setOKLabel(String OKLabel)
Set the ok label, which is displayed as the text of the ok button
| ||||||||||
void |
setOKTooltip(String OKTooltip)
Set the ok tooltip, which is displayed as the text of the ok button
| ||||||||||
void |
setOkEvent(WebEvent event)
Set the
WebEvent instance to be associated with the OK button on the editor | ||||||||||
void |
setOkJS(String value)
Define the JavaScript to be associated with the Ok button and should be executed if it
is selected
| ||||||||||
void |
setPostButtonContents(MarkupOutput out)
Set the content after the apply/ok/cancel buttons
| ||||||||||
void |
setSpaceAfterEditor(boolean spaceAfterEditor)
Set whether display a blank space underneath the editor
| ||||||||||
void |
setTitle(String title)
Set the title of the editor
| ||||||||||
void |
setTitleCss(String css)
Set the title css class name for the editor
| ||||||||||
void |
setTitleElements(MarkupOutput out)
Set the title elements of the editor
| ||||||||||
void |
setTitleElementsCss(String css)
Set the title elements' css class name for the editor
| ||||||||||
void |
setUseDHTMLForEditorClose(boolean value)
Define if the editor should use JavaScript (DHTML) for closing the editor or not.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
initializeEditor()
Utility method for initializing properties of the editor such as
images, labels events with default values.
| ||||||||||
void |
renderActionButtons(MarkupOutput out)
Generate the action buttons (ie apply, ok, cancel buttons) this editor will provide.
| ||||||||||
void | renderStatusBar(MarkupOutput out) | ||||||||||
void |
renderTitleButtons(MarkupOutput out)
Generate the title buttons (ie help, close buttons) this editor will provide.
| ||||||||||
void |
renderToolbar(MarkupOutput out)
Generates the toolbar HTML as specified on the toolbar configuration for this editor
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Hashtable property for holding the main editor body attributes
the content css class name for the editor
Boolean property that determines whether the editor contains a form
This field is deprecated.
use setAttribute(String, String, int)
MarkupOutput
property for holding the extra properties of the editor.
String property for holding the form's action for the editor
String property for holding the form's extra attributes for the editor
String property for holding the form's method for the editor
String property for holding the form name for the editor
String property for holding the form's onSubmit attribute for the editor
String property for holding the global contents css class name for the editor
String property for holding the global css class name for the editor
String property for holding the folder path of the images location
Hashtable property for holding the main editor body attributes
MarkupOutput
property for holding the HTML contents to be placed after the button control on the editor.
String property for holding the title of the editor
Hashtable property for holding the main editor title attributes
String property for holding the title css class name for the editor
MarkupOutput
property for holding the title elements of the editor.
String property for holding the title elements css class name for the editor
Class constructor, initializes main properties.
Append a new display flag value
flag | value of the flag to append, from the EnumEditorDisplayFlags enumeration
|
---|
Returns the TR tag that will be used to render the action buttons bar
Get the JavaScript to be associated with the Apply button and should be executed if it is selected
get the autosize property of the editor
Get the JavaScript to be associated with the Cancel button and should be executed if it is selected
Indicates JavaScript to be executed when closing current Editor.
Returns the content of the editor. This is the MarkupOutput clients users should manipulate to generate the body of the editor.
MarkupOutput
object used for the body section
Get the display flag value as specified for the editor
This method is deprecated.
use getHelpEvent()
Get the WebEvent
instance to be associated with the Help button on the editor
WebEvent
initialized instance with the information of the event
to trigger if the Help button is selected.Get the tooltip of the help button of the editor
get the type of the help file
HELP_TYPE_ADMIN
,HELP_TYPE_USER
,HELP_TYPE_CUSTOM
Get the JavaScript to be associated with the Ok button and should be executed if it is selected
Get the content after the apply/ok/cancel buttons
MarkupOutput
object
Get the title of the editor
Get the title elements of the editor
Returns if the editor should use DHTML (JavaScript) for closing the editor.
Determine whether to display a blank space underneath the editor
gets the hide focus property of the buttons in the editor
Generate the Close button for this editor
spanOut | the MarkupOutput object where the HTML output should be saved. |
---|---|
closeEvent | WebEvent that will be triggered by the close button if selected |
closeJS | String with the JavaScript to be triggered if the close button is selected |
render the gui element in a MarkupOutput object
MarkupOutput
object
Generate the output of the editor according to the information used for initializing its properties, in particular, the editor contents.
cssClass | the css class of target object |
---|
MarkupOutput
instance with the generated HTML output of this method.
Generate the Help button for this editor
out | the MarkupOutput object where the HTML output should be saved. |
---|
This method is deprecated.
use renderHelpButton(MarkupOutput)
Generate the Help button for this editor
spanOut | the MarkupOutput object where the HTML output should be saved. |
---|---|
helpEvent | WebEvent that will be triggered by the help button if selected |
helpTopic | String with the topic the help button will access if selected |
Set the TR tag that will be used to render the action buttons bar
Define the JavaScript to be associated with the Apply button and should be executed if it is selected
value | String with the JavaScript code to associate with the Apply button. |
---|
Set the apply label, which is displayed as the text of the apply button
applyLabel | the apply label |
---|
Set the apply tooltip, which is displayed as the text of the ok button
applyTooltip | the apply label |
---|
Set attributes for the location specified (EnumEditorSectionTypes.EditorMainDiv, EnumEditorSectionTypes.EditorTitleDiv, EnumEditorSectionTypes.EditorBodyDiv). We use it for setting bone properties.
attributeName | the name of the attribute to set |
---|---|
value | the value of the attribute |
location | the location to add the properties as EnumEditorSectionTypes |
Set the disabled property of the specified button.
The button which needs to be disabled is one of APPLY_BUTTON
, OK_BUTTON
or CANCEL_BUTTON
button | The actual button whose disabled property needs to be changed. |
---|---|
disableValue | boolean value set to true to disable the apply button. |
Set the button css class name for the editor
css | the css class name |
---|
Set the autosize property of the editor
value | The boolean value that specifies if the editor can autosize or not |
---|
Define the JavaScript to be associated with the Cancel button and should be executed if it is selected
value | String with the JavaScript code to associate with the Cancel button. |
---|
Set the cancel label, which is displayed as the text of the cancel button
cancelLabel | the cancel label |
---|
Set the cancel tooltip, which is displayed as the text of the cancel button
cancelTooltip | the cancel label |
---|
Specifies JavaScript function to be invoked when closing Editor in DHTML mode only.
value | String Array consisted of function name and parameters. |
---|
Set the close label, which is displayed as the tooltip of the close icon
closeLabel | the close label |
---|
This method is deprecated.
Don't create a MarkupOutput and create it, instead call getContents
and populate this instance.
Registers the content of the editor. This is the body section. Users can provide their own populated MarkupOutput which will be appended to the editor's output in the body section.
Is not recommeneded to use this method (in fact, it has been deprecated). Users should instead call thegetContents
method which returns a MarkupOutput
and populate this object.out | the content as a MarkupOutput object |
---|
Set the content css class name for the editor
css | the css class name |
---|
Define the prefix the css classes will have for the HTML contents generated by this editor component.
value | String with the css prefix value to use. |
---|
Set the display flag to use for the editor
flags | value of the display flag to use on the editor, which should be a bit-wise value
from the EnumEditorDisplayFlags enumeration.
|
---|
Sets the definition layout for the editor. The definition layout indicates what section of the editor to display i.e. the buttons to include in the footer.
fileName | the definition of the editor |
---|
This method is deprecated.
replaced by setAttribute(String, String, int)
Set extra information to the whole editor. We use it for setting the drag and drop properties.
mo | the MarkupOutput object |
---|
Set the form information for the editor
action | the action attribute of the form |
---|---|
method | the method attribute of the form |
formName | the name attribute of the form |
extraAttributes | extra attributes in the form definition |
Set the form information for the editor
action | the action attribute of the form |
---|---|
method | the method attribute of the form |
formName | the name attribute of the form |
Set the form information for the editor
action | the action attribute of the form |
---|---|
method | the method attribute of the form |
formName | the name attribute of the form |
extraAttributes | extra attributes in the form definition |
onSubmitInfo | a String with the name and value of the ONSUBMIT attribute for the form tag. If providing this property, any default ONSUBMIT value that is generated (ie. appendState() call) will not be generated. It's responsibility of the developer to add it on its value. |
This method is deprecated.
Unused Method
Set the if of the form to use in XHR partial update
value | String the value+"_form" forms the actual id of the form that should be submitted |
---|
Set the global content css class name for the editor
css | the css class name |
---|
Set the global css class name for the editor
css | the css class name |
---|
This method is deprecated.
use setHelpType(String)
Set the WebEvent
instance to be associated with the Help button on the editor
event | WebEvent initialized instance with the information of the event
to trigger if the Help button is selected. |
---|
set the help label, which is displayed as the tooltip of the help icon
helpLabel | the help label |
---|
Set the tooltip of the editor
tooltip | String with the tooltip of the editor |
---|
Set the help topic of the editor
topic | the help topic |
---|
set the help type for the editor
type | String is one of HELP_TYPE_ADMIN ,HELP_TYPE_USER ,HELP_TYPE_CUSTOM |
---|
set the hide focus property of the buttons in the editor
value | the value of the hide focus property |
---|
Set the folder path to be used as base for all the images to use while displaying menus
path | the folder path |
---|
Set the ok label, which is displayed as the text of the ok button
OKLabel | the ok label |
---|
Set the ok tooltip, which is displayed as the text of the ok button
OKTooltip | the ok label |
---|
Define the JavaScript to be associated with the Ok button and should be executed if it is selected
value | String with the JavaScript code to associate with the Ok button. |
---|
Set the content after the apply/ok/cancel buttons
out | the content as a MarkupOutput object
|
---|
Set whether display a blank space underneath the editor
spaceAfterEditor | whether display a blank space underneath the editor |
---|
Set the title of the editor
title | String with the title of the editor |
---|
Set the title css class name for the editor
css | the css class name |
---|
Set the title elements of the editor
out | the title elements as a MarkupOutput object |
---|
Set the title elements' css class name for the editor
css | the css class name |
---|
Define if the editor should use JavaScript (DHTML) for closing the editor or not.
value | The boolean value set to true if we want to use DHTML code to close the editor |
---|
Utility method for initializing properties of the editor such as images, labels events with default values.
Generate the action buttons (ie apply, ok, cancel buttons) this editor will provide.
out | the MarkupOutput object where the HTML output should be saved.
|
---|
Generate the title buttons (ie help, close buttons) this editor will provide.
out | the MarkupOutput object where the HTML output should be saved.
|
---|
Generates the toolbar HTML as specified on the toolbar configuration for this editor
out | the MarkupOutput object where the HTML output should be saved. |
---|