## Class TValidationSummary

Description

TValidationSummary class

TValidationSummary displays a summary of validation errors inline on a Web page, in a message box, or both. By default, a validation summary will collect TBaseValidator::getErrorMessage of all failed validators on the page. If ValidationGroup is not empty, only those validators who belong to the group will show their error messages in the summary.

The summary can be displayed as a list, as a bulleted list, or as a single paragraph based on the DisplayMode property. The messages shown can be prefixed with HeaderText.

The summary can be displayed on the Web page and in a message box by setting the ShowSummary and ShowMessageBox properties, respectively. Note, the latter is only effective when EnableClientScript is true.

- since: 3.0
- version: $Id: TValidationSummary.php 1398 2006-09-08 19:31:03Z xue $
- author: Qiang Xue <qiang.xue@gmail.com>

Located in /Web/UI/WebControls/TValidationSummary.php (line 37)

    TComponent
       |
       --TApplicationComponent
          |
          --TControl
             |
             --TWebControl
                |
                --TValidationSummary

Method Summary
TValidationSummary __construct ()
void addAttributesToRender (mixed $writer)
TClientSideValidationSummaryOptions createClientScript ()
boolean getAutoUpdate ()
array getClientScriptOptions ()
TClientSideValidationSummaryOptions getClientSide ()
TValidationSummaryDisplayStyle getDisplay ()
TValidationSummaryDisplayMode getDisplayMode ()
boolean getEnableClientScript ()
array getErrorMessages ()
string getHeaderText ()
boolean getShowAnchor ()
boolean getShowMessageBox ()
boolean getShowSummary ()
string getValidationGroup ()
string renderBulletList (array $writer, string 1)
string renderContents (mixed $writer)
void renderJsSummary (array 0)
string renderList (array $writer, string 1)
string renderSingleParagraph (array $writer, string 1)
void setAutoUpdate (boolean $value)
void setDisplay (TValidationSummaryDisplayStyle $value)
void setDisplayMode (TValidationSummaryDisplayMode $value)
void setEnableClientScript (boolean $value)
void setHeaderText (string $value)
void setShowAnchor (boolean $value)
void setShowMessageBox (boolean $value)
void setShowSummary (boolean $value)
void setValidationGroup (string $value)
Methods
Constructor __construct (line 48)

Constructor.

This method sets the foreground color to red.

- access: public

TValidationSummary __construct ()

Redefinition of:

TControl::__construct()
  Constructor.

addAttributesToRender (line 201)

- access: protected

void addAttributesToRender (mixed $writer)

Redefinition of:

TWebControl::addAttributesToRender()
  Adds attribute name-value pairs to renderer.

createClientScript (line 285)

- return: javascript validation summary event options.
- access: protected

TClientSideValidationSummaryOptions createClientScript ()
getAutoUpdate (line 171)

Gets the auto-update for this summary.

- return: automatic client-side summary updates. Defaults to true.
- access: public

boolean getAutoUpdate ()
getClientScriptOptions (line 248)

Get a list of options for the client-side javascript validation summary.

- return: list of options for the summary
- access: protected

array getClientScriptOptions ()
getClientSide (line 274)

- return: client-side validation summary event options.
- access: public

TClientSideValidationSummaryOptions getClientSide ()
getDisplay (line 57)

- return: the style of displaying the error messages. Defaults to TValidationSummaryDisplayStyle::Fixed.
- access: public

TValidationSummaryDisplayStyle getDisplay ()
getDisplayMode (line 90)

- return: the mode of displaying error messages. Defaults to TValidationSummaryDisplayMode::BulletList.
- access: public

TValidationSummaryDisplayMode getDisplayMode ()
getEnableClientScript (line 106)

- return: whether the TValidationSummary component updates itself using client-side script. Defaults to true.
- access: public

boolean getEnableClientScript ()
getErrorMessages (line 293)

Get the list of validation error messages.

- return: list of validator error messages.
- access: protected

array getErrorMessages ()
getHeaderText (line 73)

- return: the header text displayed at the top of the summary
- access: public

string getHeaderText ()
getShowAnchor (line 154)

- return: whether the validation summary should be anchored. Defaults to false.
- access: public

boolean getShowAnchor ()
getShowMessageBox (line 122)

- return: whether the validation summary is displayed in a message box. Defaults to false.
- access: public

boolean getShowMessageBox ()
getShowSummary (line 138)

- return: whether the validation summary is displayed inline. Defaults to true.
- access: public

boolean getShowSummary ()
getValidationGroup (line 188)

- return: the group which this validator belongs to
- access: public

string getValidationGroup ()
renderBulletList (line 371)

Render the validation summary as a bullet list.

- return: summary bullet list
- access: protected

string renderBulletList (array $writer, string 1)

- string 1: the header text
- array $writer: list of messages

renderContents (line 310)

Overrides parent implementation by rendering TValidationSummary-specific presentation.

- return: the rendering result
- access: public

string renderContents (mixed $writer)

Redefinition of:

TWebControl::renderContents()
  Renders the body content enclosed between the control tag.

renderJsSummary (line 220)

Render the javascript for validation summary.

- access: protected

void renderJsSummary (array 0)

- array 0: list of options for validation summary.

renderList (line 337)

Render the validation summary as a simple list.

- return: summary list
- access: protected

string renderList (array $writer, string 1)

- string 1: the header text
- array $writer: list of messages

renderSingleParagraph (line 355)

Render the validation summary as a paragraph.

- return: summary paragraph
- access: protected

string renderSingleParagraph (array $writer, string 1)

- string 1: the header text
- array $writer: list of messages

setAutoUpdate (line 180)

Sets the summary to auto-update on the client-side

- access: public

void setAutoUpdate (boolean $value)

- boolean $value: true for automatic summary updates.

setDisplay (line 65)

- access: public

void setDisplay (TValidationSummaryDisplayStyle $value)

- TValidationSummaryDisplayStyle $value: the style of displaying the error messages

setDisplayMode (line 98)

- access: public

void setDisplayMode (TValidationSummaryDisplayMode $value)

- TValidationSummaryDisplayMode $value: the mode of displaying error messages

setEnableClientScript (line 114)

- access: public

void setEnableClientScript (boolean $value)

- boolean $value: whether the TValidationSummary component updates itself using client-side script.

setHeaderText (line 82)

Sets the header text to be displayed at the top of the summary

- access: public

void setHeaderText (string $value)

- string $value: the header text

setShowAnchor (line 162)

- access: public

void setShowAnchor (boolean $value)

- boolean $value: whether the validation summary should be anchored.

setShowMessageBox (line 130)

- access: public

void setShowMessageBox (boolean $value)

- boolean $value: whether the validation summary is displayed in a message box.

setShowSummary (line 146)

- access: public

void setShowSummary (boolean $value)

- boolean $value: whether the validation summary is displayed inline.

setValidationGroup (line 196)

- access: public

void setValidationGroup (string $value)

- string $value: the group which this validator belongs to

#### Inherited Methods

Inherited From TWebControl

> TWebControl::addAttributesToRender()
> TWebControl::copyBaseAttributes()
> TWebControl::createStyle()
> TWebControl::getAccessKey()
> TWebControl::getBackColor()
> TWebControl::getBorderColor()
> TWebControl::getBorderStyle()
> TWebControl::getBorderWidth()
> TWebControl::getCssClass()
> TWebControl::getFont()
> TWebControl::getForeColor()
> TWebControl::getHasStyle()
> TWebControl::getHeight()
> TWebControl::getStyle()
> TWebControl::getTabIndex()
> TWebControl::getTagName()
> TWebControl::getToolTip()
> TWebControl::getWidth()
> TWebControl::render()
> TWebControl::renderBeginTag()
> TWebControl::renderContents()
> TWebControl::renderEndTag()
> TWebControl::setAccessKey()
> TWebControl::setBackColor()
> TWebControl::setBorderColor()
> TWebControl::setBorderStyle()
> TWebControl::setBorderWidth()
> TWebControl::setCssClass()
> TWebControl::setForeColor()
> TWebControl::setHeight()
> TWebControl::setStyle()
> TWebControl::setTabIndex()
> TWebControl::setToolTip()
> TWebControl::setWidth()

Inherited From TControl

> TControl::__construct()
> TControl::addedControl()
> TControl::addParsedObject()
> TControl::addToPostDataLoader()
> TControl::applyStyleSheetSkin()
> TControl::autoBindProperty()
> TControl::autoDataBindProperties()
> TControl::bindProperty()
> TControl::broadcastEvent()
> TControl::bubbleEvent()
> TControl::clearChildState()
> TControl::clearControlState()
> TControl::clearNamingContainer()
> TControl::clearViewState()
> TControl::createChildControls()
> TControl::createControlCollection()
> TControl::dataBind()
> TControl::dataBindChildren()
> TControl::dataBindProperties()
> TControl::ensureChildControls()
> TControl::findControl()
> TControl::findControlsByID()
> TControl::findControlsByType()
> TControl::focus()
> TControl::getAdapter()
> TControl::getAllowChildControls()
> TControl::getAttribute()
> TControl::getAttributes()
> TControl::getChildControlsCreated()
> TControl::getClientID()
> TControl::getControls()
> TControl::getControlStage()
> TControl::getControlState()
> TControl::getCustomData()
> TControl::getEnabled()
> TControl::getEnableTheming()
> TControl::getEnableViewState()
> TControl::getHasAdapter()
> TControl::getHasAttributes()
> TControl::getHasChildInitialized()
> TControl::getHasControls()
> TControl::getHasInitialized()
> TControl::getHasLoaded()
> TControl::getHasLoadedPostData()
> TControl::getHasPreRendered()
> TControl::getID()
> TControl::getNamingContainer()
> TControl::getPage()
> TControl::getParent()
> TControl::getRegisteredObject()
> TControl::getSkinID()
> TControl::getSourceTemplateControl()
> TControl::getTemplateControl()
> TControl::getUniqueID()
> TControl::getViewState()
> TControl::getVisible()
> TControl::hasAttribute()
> TControl::initRecursive()
> TControl::isDescendentOf()
> TControl::isObjectRegistered()
> TControl::loadRecursive()
> TControl::loadState()
> TControl::loadStateRecursive()
> TControl::onDataBinding()
> TControl::onInit()
> TControl::onLoad()
> TControl::onPreRender()
> TControl::onUnload()
> TControl::preRenderRecursive()
> TControl::raiseBubbleEvent()
> TControl::registerObject()
> TControl::removeAttribute()
> TControl::removedControl()
> TControl::render()
> TControl::renderChildren()
> TControl::renderControl()
> TControl::saveState()
> TControl::saveStateRecursive()
> TControl::setAdapter()
> TControl::setAttribute()
> TControl::setChildControlsCreated()
> TControl::setControlStage()
> TControl::setControlState()
> TControl::setCustomData()
> TControl::setEnabled()
> TControl::setEnableTheming()
> TControl::setEnableViewState()
> TControl::setID()
> TControl::setPage()
> TControl::setSkinID()
> TControl::setTemplateControl()
> TControl::setViewState()
> TControl::setVisible()
> TControl::traverseChildControls()
> TControl::unbindProperty()
> TControl::unloadRecursive()
> TControl::unregisterObject()
> TControl::__get()

Inherited From TApplicationComponent

> TApplicationComponent::getApplication()
> TApplicationComponent::getRequest()
> TApplicationComponent::getResponse()
> TApplicationComponent::getService()
> TApplicationComponent::getSession()
> TApplicationComponent::getUser()
> TApplicationComponent::publishAsset()
> TApplicationComponent::publishFilePath()

Inherited From TComponent

> TComponent::addParsedObject()
> TComponent::attachEventHandler()
> TComponent::canGetProperty()
> TComponent::canSetProperty()
> TComponent::createdOnTemplate()
> TComponent::detachEventHandler()
> TComponent::evaluateExpression()
> TComponent::evaluateStatements()
> TComponent::getEventHandlers()
> TComponent::getSubProperty()
> TComponent::hasEvent()
> TComponent::hasEventHandler()
> TComponent::hasProperty()
> TComponent::raiseEvent()
> TComponent::setSubProperty()
> TComponent::__get()
> TComponent::__set()

Class Constants

#### Inherited Constants

Inherited from TControl

> TControl::AUTOMATIC_ID_PREFIX
> TControl::CLIENT_ID_SEPARATOR
> TControl::CS_CHILD_INITIALIZED
> TControl::CS_CONSTRUCTED
> TControl::CS_INITIALIZED
> TControl::CS_LOADED
> TControl::CS_PRERENDERED
> TControl::CS_STATE_LOADED
> TControl::ID_FORMAT
> TControl::ID_SEPARATOR
> TControl::IS_CHILD_CREATED
> TControl::IS_CREATING_CHILD
> TControl::IS_DISABLE_THEMING
> TControl::IS_DISABLE_VIEWSTATE
> TControl::IS_ID_SET
> TControl::IS_SKIN_APPLIED
> TControl::IS_STYLESHEET_APPLIED
> TControl::RF_ADAPTER
> TControl::RF_AUTO_BINDINGS
> TControl::RF_CHILD_STATE
> TControl::RF_CONTROLS
> TControl::RF_CONTROLSTATE
> TControl::RF_DATA_BINDINGS
> TControl::RF_EVENTS
> TControl::RF_NAMED_CONTROLS
> TControl::RF_NAMED_CONTROLS_ID
> TControl::RF_NAMED_OBJECTS
> TControl::RF_SKIN_ID

Documentation generated on Sun, 14 Jan 2007 21:44:59 -0500 by phpDocumentor 1.3.0RC4