API: container YAHOO.widget.SimpleDialog (YUI Library)

# Yahoo! UI Library

### Container 2.2.2

Yahoo! UI Library > container > YAHOO.widget.SimpleDialog

## Class YAHOO.widget.SimpleDialog - extends YAHOO.widget.Dialog

SimpleDialog is a simple implementation of Dialog that can be used to submit a single value. Forms can be processed in 3 ways -- via an asynchronous Connection utility call, a simple form POST or GET, or manually.

### Constructor

YAHOO.widget.SimpleDialog `( el , userConfig )`

Parameters:
  `el <String>` The element ID representing the SimpleDialog OR
  `el <HTMLElement>` The element representing the SimpleDialog
  `userConfig <Object>` The configuration object literal containing the configuration that should be set for this SimpleDialog. See configuration documentation for more details.

### Properties

#### YAHOO.widget.SimpleDialog._DEFAULT_CONFIG `- private final Object`

Constant representing the SimpleDialog's configuration properties

#### YAHOO.widget.SimpleDialog.CSS_SIMPLEDIALOG `- static final String`

Constant representing the default CSS class used for a SimpleDialog

#### YAHOO.widget.SimpleDialog.ICON_ALARM `- static final String`

Constant for the standard network icon for alarm

#### YAHOO.widget.SimpleDialog.ICON_BLOCK `- static final String`

Constant for the standard network icon for a blocking action

#### YAHOO.widget.SimpleDialog.ICON_HELP `- static final String`

Constant for the standard network icon for help

#### YAHOO.widget.SimpleDialog.ICON_INFO `- static final String`

Constant for the standard network icon for info

#### YAHOO.widget.SimpleDialog.ICON_TIP `- static final String`

Constant for the standard network icon for a tip

#### YAHOO.widget.SimpleDialog.ICON_WARN `- static final String`

Constant for the standard network icon for warn

#### Properties inherited from YAHOO.widget.Panel:

`YAHOO.widget.Panel._DEFAULT_CONFIG, YAHOO.widget.Panel._EVENT_TYPES`

#### Properties inherited from YAHOO.widget.Module:

`body, browser, cfg, contructor, element, footer, header, id, imageRoot, isSecure, platform, YAHOO.widget.Module._DEFAULT_CONFIG, YAHOO.widget.Module._EVENT_TYPES`

#### Properties inherited from YAHOO.widget.Dialog:

`callback, callback.argument, callback.failure, callback.success, YAHOO.widget.Dialog._DEFAULT_CONFIG, YAHOO.widget.Dialog._EVENT_TYPES`

#### Properties inherited from YAHOO.widget.Overlay:

`YAHOO.widget.Overlay._DEFAULT_CONFIG, YAHOO.widget.Overlay._EVENT_TYPES, YAHOO.widget.Overlay._initialized`

### Methods

#### configIcon

`void configIcon ( type , args , obj )`
Fired when the "icon" property is set.

Parameters:
  `type <String>` The CustomEvent type (usually the property name)
  `args <Object[]>` The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
  `obj <Object>` The scope object. For configuration handlers, this will usually equal the owner.

Returns: `void`

#### configText

`void configText ( type , args , obj )`
Fired when the "text" property is set.

Parameters:
  `type <String>` The CustomEvent type (usually the property name)
  `args <Object[]>` The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
  `obj <Object>` The scope object. For configuration handlers, this will usually equal the owner.

Returns: `void`

#### init

`void init ( el , userConfig )`
The SimpleDialog initialization method, which is executed for SimpleDialog and all of its subclasses. This method is automatically called by the constructor, and sets up all DOM references for pre-existing markup, and creates required markup if it is not already present.

Parameters:
  `el <String>` The element ID representing the SimpleDialog OR
  `el <HTMLElement>` The element representing the SimpleDialog
  `userConfig <Object>` The configuration object literal containing the configuration that should be set for this SimpleDialog. See configuration documentation for more details.

Returns: `void`

#### initDefaultConfig

`void initDefaultConfig ( )`
Initializes the class's configurable properties which can be changed using the SimpleDialog's Config object (cfg).

Returns: `void`

#### registerForm

`void registerForm ( )`
Prepares the SimpleDialog's internal FORM object, creating one if one is not currently present, and adding the value hidden field.

Returns: `void`

#### toString

`String toString ( )`
Returns a string representation of the object.

Returns: `String`
  The string representation of the SimpleDialog

#### Methods inherited from YAHOO.widget.Panel:

`buildMask, buildWrapper, configClose, configDraggable, configHeight, configKeyListeners, configModal, configUnderlay, configWidth, configzIndex, destroy, hideMask, init, initDefaultConfig, initEvents, onDomResize, registerDragDrop, removeMask, render, showMask, sizeMask, sizeUnderlay, toString`

#### Methods inherited from YAHOO.widget.Module:

`appendToBody, appendToFooter, appendToHeader, configMonitorResize, configVisible, destroy, hide, init, initDefaultConfig, initEvents, initResizeMonitor, onDomResize, render, setBody, setFooter, setHeader, show, toString`

#### Methods inherited from YAHOO.widget.Dialog:

`_onFormKeyDown, blurButtons, cancel, configButtons, configClose, configPostMethod, destroy, doSubmit, focusDefaultButton, focusFirst, focusFirstButton, focusLast, focusLastButton, getData, init, initDefaultConfig, initEvents, registerForm, submit, toString, validate`

#### Methods inherited from YAHOO.widget.Overlay:

`align, center, configConstrainToViewport, configContext, configFixedCenter, configHeight, configIframe, configVisible, configWidth, configX, configXY, configY, configzIndex, destroy, doCenterOnDOMEvent, enforceConstraints, hideIframe, hideMacGeckoScrollbars, init, initDefaultConfig, initEvents, moveTo, onDomResize, showIframe, showMacGeckoScrollbars, syncPosition, toString`

#### Events inherited from YAHOO.widget.Panel:

`dragEvent, hideMaskEvent, showMaskEvent`

#### Events inherited from YAHOO.widget.Module:

`appendEvent, beforeHideEvent, beforeInitEvent, beforeRenderEvent, beforeShowEvent, changeBodyEvent, changeContentEvent, changeFooterEvent, changeHeaderEvent, destroyEvent, hideEvent, initEvent, renderEvent, showEvent, YAHOO.widget.Module.textResizeEvent`

#### Events inherited from YAHOO.widget.Dialog:

`asyncSubmitEvent, beforeSumitEvent, cancelEvent, formSubmitEvent, manualSubmitEvent, submitEvent`

#### Events inherited from YAHOO.widget.Overlay:

`beforeMoveEvent, moveEvent, YAHOO.widget.Overlay.windowResizeEvent, YAHOO.widget.Overlay.windowScrollEvent`

### Configuration Attributes

#### icon `- String`

Sets the informational icon for the SimpleDialog
Default Value: "none"

#### text `- String`

Sets the text for the SimpleDialog
Default Value: ""

#### Configuration attributes inherited from YAHOO.widget.Panel:

`close, draggable, keylisteners, modal, underlay`

#### Configuration attributes inherited from YAHOO.widget.Module:

`effect, monitorresize, visible`

#### Configuration attributes inherited from YAHOO.widget.Dialog:

`buttons, postmethod`

#### Configuration attributes inherited from YAHOO.widget.Overlay:

`constraintoviewport, context, fixedcenter, height, iframe, width, x, xy, y, zIndex`

Copyright © 2007 Yahoo! Inc. All rights reserved.