## 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: $Revision: $ $Date: $
- 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)
TValidationSummaryClientScript createClientScript ()
boolean getAutoUpdate ()
array getClientScriptOptions ()
TValidationSummaryClientScript getClientSide ()
string getDisplay ()
string 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 (string $value)
void setDisplayMode (string $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 203)

- access: protected

void addAttributesToRender (mixed $writer)

Redefinition of:

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

createClientScript (line 287)

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

TValidationSummaryClientScript createClientScript ()
getAutoUpdate (line 173)

Gets the auto-update for this summary.

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

boolean getAutoUpdate ()
getClientScriptOptions (line 250)

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 276)

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

TValidationSummaryClientScript getClientSide ()
getDisplay (line 57)

- return: the display behavior (None, Static, Dynamic) of the error message in a validation summary component.
- access: public

string getDisplay ()
getDisplayMode (line 91)

- return: the display mode (BulletList, List, SingleParagraph) of the validation summary. Defaults to BulletList.
- access: public

string getDisplayMode ()
getEnableClientScript (line 108)

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

boolean getEnableClientScript ()
getErrorMessages (line 295)

Get the list of validation error messages.

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

array getErrorMessages ()
getHeaderText (line 74)

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

string getHeaderText ()
getShowAnchor (line 156)

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

boolean getShowAnchor ()
getShowMessageBox (line 124)

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

boolean getShowMessageBox ()
getShowSummary (line 140)

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

boolean getShowSummary ()
getValidationGroup (line 190)

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

string getValidationGroup ()
renderBulletList (line 373)

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 312)

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 222)

Render the javascript for validation summary.

- access: protected

void renderJsSummary (array 0)

- array 0: list of options for validation summary.

renderList (line 339)

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 357)

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 182)

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 66)

Sets the display behavior (None, Static, Dynamic) of the error message in a validation summary component.

- access: public

void setDisplay (string $value)

- string $value: the display behavior (None, Static, Dynamic)

setDisplayMode (line 100)

Sets the display mode (BulletList, List, SingleParagraph) of the validation summary.

- access: public

void setDisplayMode (string $value)

- string $value: the display mode (BulletList, List, SingleParagraph)

setEnableClientScript (line 116)

- access: public

void setEnableClientScript (boolean $value)

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

setHeaderText (line 83)

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 164)

- access: public

void setShowAnchor (boolean $value)

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

setShowMessageBox (line 132)

- access: public

void setShowMessageBox (boolean $value)

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

setShowSummary (line 148)

- access: public

void setShowSummary (boolean $value)

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

setValidationGroup (line 198)

- 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::applyStyleSheetSkin()
> TControl::autoBindProperty()
> TControl::autoDataBindProperties()
> TControl::bindProperty()
> TControl::broadcastEvent()
> TControl::broadcastEventInternal()
> TControl::bubbleEvent()
> TControl::clearChildState()
> TControl::clearControlState()
> TControl::clearNamingContainer()
> TControl::clearViewState()
> TControl::createChildControls()
> TControl::createControlCollection()
> TControl::createdOnTemplate()
> 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::getEnabled()
> TControl::getEnableTheming()
> TControl::getEnableViewState()
> TControl::getHasAdapter()
> TControl::getHasAttributes()
> TControl::getHasControls()
> 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::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::attachEventHandler()
> TComponent::canGetProperty()
> TComponent::canSetProperty()
> 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

Documentation generated on Sun, 04 Jun 2006 19:00:37 -0400 by phpDocumentor 1.3.0RC4