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 1747 2007-03-06 19:45:45Z 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)
boolean getAutoUpdate ()
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 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
getDisplay (line 57)
  • return: the style of displaying the error messages. Defaults to TValidationSummaryDisplayStyle::Fixed.
  • access: public

Redefinition of:
TWebControl::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)

Redefinition of:
TWebControl::setDisplay()
setDisplayMode (line 98)
  • access: public
void setDisplayMode (TValidationSummaryDisplayMode $value)
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::clearStyle()
TWebControl::copyBaseAttributes()
TWebControl::createStyle()
TWebControl::getAccessKey()
TWebControl::getBackColor()
TWebControl::getBorderColor()
TWebControl::getBorderStyle()
TWebControl::getBorderWidth()
TWebControl::getCssClass()
TWebControl::getDisplay()
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::setDisplay()
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::convertUniqueIdToClientId()
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::trackViewState()
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

Documentation generated on Mon, 21 Apr 2008 11:36:41 -0400 by phpDocumentor 1.3.0RC4