PRADO Component Framework for PHP 5
  • Home
  • About
  • Testimonials
  • Demos
  • Download
  • Documentation
  • Forum
  • Development
  • Tutorials
  • Class Docs
  • API Manual
  • Wiki

Packages

  • None
  • System
    • Caching
    • Collections
    • Data
      • ActiveRecord
        • Relations
        • Scaffold
          • InputBuilder
      • Commom
        • Sqlite
      • Common
        • Mssql
        • Mysql
        • Oracle
        • Pgsql
        • Sqlite
      • DataGateway
      • SqlMap
        • Configuration
        • Statements
    • Exceptions
    • I18N
    • IO
    • Security
    • Util
    • Web
      • Javascripts
      • Services
      • UI
        • ActiveControls
        • WebControls
    • Xml
  • Wsat
    • pages
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class TValidationSummary

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 ErrorMessage of all failed validators on the page. If getValidationGroup 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 setDisplayMode DisplayMode property. The messages shown can be prefixed with setHeaderText HeaderText.

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

TComponent
Extended by TApplicationComponent
Extended by TControl implements IRenderable, IBindable
Extended by TWebControl implements IStyleable
Extended by TValidationSummary
Package: System\Web\UI\WebControls
Copyright: Copyright © 2005-2014 PradoSoft
License: http://www.pradosoft.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 3.0
Located at Web/UI/WebControls/TValidationSummary.php
Methods summary
public
# __construct( )

Constructor. This method sets the foreground color to red.

Constructor. This method sets the foreground color to red.

Overrides

TControl::__construct()
public TValidationSummaryDisplayStyle
# getDisplay( )

Returns

TValidationSummaryDisplayStyle
the style of displaying the error messages. Defaults to TValidationSummaryDisplayStyle::Fixed.

Overrides

TWebControl::getDisplay()
public
# setDisplay( TValidationSummaryDisplayStyle $value )

Parameters

$value
TValidationSummaryDisplayStyle
the style of displaying the error messages

Overrides

TWebControl::setDisplay()
public string
# getHeaderText( )

Returns

string
the header text displayed at the top of the summary
public
# setHeaderText( string $value )

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

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

Parameters

$value
string
the header text
public TValidationSummaryDisplayMode
# getDisplayMode( )

Returns

TValidationSummaryDisplayMode
the mode of displaying error messages. Defaults to TValidationSummaryDisplayMode::BulletList.
public
# setDisplayMode( TValidationSummaryDisplayMode $value )

Parameters

$value
TValidationSummaryDisplayMode
the mode of displaying error messages
public boolean
# getEnableClientScript( )

Returns

boolean
whether the TValidationSummary component updates itself using client-side script. Defaults to true.
public
# setEnableClientScript( boolean $value )

Parameters

$value
boolean
whether the TValidationSummary component updates itself using client-side script.
public boolean
# getShowMessageBox( )

Returns

boolean
whether the validation summary is displayed in a message box. Defaults to false.
public
# setShowMessageBox( boolean $value )

Parameters

$value
boolean
whether the validation summary is displayed in a message box.
public boolean
# getShowSummary( )

Returns

boolean
whether the validation summary is displayed inline. Defaults to true.
public
# setShowSummary( boolean $value )

Parameters

$value
boolean
whether the validation summary is displayed inline.
public boolean
# getScrollToSummary( )

Returns

boolean
whether scroll summary into viewport or not. Defaults to true.
public
# setScrollToSummary( boolean $value )

Parameters

$value
boolean
whether scroll summary into viewport or not.
public boolean
# getShowAnchor( )

Returns

boolean
whether the validation summary should be anchored. Defaults to false.
public
# setShowAnchor( boolean $value )

Parameters

$value
boolean
whether the validation summary should be anchored.
public boolean
# getAutoUpdate( )

Gets the auto-update for this summary.

Gets the auto-update for this summary.

Returns

boolean
automatic client-side summary updates. Defaults to true.
public
# setAutoUpdate( boolean $value )

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

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

Parameters

$value
boolean
true for automatic summary updates.
public string
# getValidationGroup( )

Returns

string
the group which this validator belongs to
public
# setValidationGroup( string $value )

Parameters

$value
string
the group which this validator belongs to
protected
# addAttributesToRender( THtmlWriter $writer )

Adds attribute name-value pairs to renderer. By default, the method will render 'id', 'accesskey', 'disabled', 'tabindex', 'title' and all custom attributes. The method can be overriden to provide customized attribute rendering.

Adds attribute name-value pairs to renderer. By default, the method will render 'id', 'accesskey', 'disabled', 'tabindex', 'title' and all custom attributes. The method can be overriden to provide customized attribute rendering.

Parameters

$writer
THtmlWriter
the writer used for the rendering purpose

Overrides

TWebControl::addAttributesToRender()
protected
# renderJsSummary( )

Render the javascript for validation summary.

Render the javascript for validation summary.

protected array
# getClientScriptOptions( )

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

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

Returns

array
list of options for the summary
public TClientSideValidationSummaryOptions
# getClientSide( )

Returns

TClientSideValidationSummaryOptions
client-side validation summary event options.
protected TClientSideValidationSummaryOptions
# createClientScript( )

Returns

TClientSideValidationSummaryOptions
javascript validation summary event options.
protected array
# getErrorMessages( )

Get the list of validation error messages.

Get the list of validation error messages.

Returns

array
list of validator error messages.
public string
# renderContents( THtmlWriter $writer )

Overrides parent implementation by rendering TValidationSummary-specific presentation.

Overrides parent implementation by rendering TValidationSummary-specific presentation.

Parameters

$writer
THtmlWriter
the writer used for the rendering purpose

Returns

string
the rendering result

Overrides

TWebControl::renderContents()
protected string
# renderList( array $writer )

Render the validation summary as a simple list.

Render the validation summary as a simple list.

Parameters

$writer
array
list of messages

Returns

string
summary list
protected string
# renderSingleParagraph( array $writer )

Render the validation summary as a paragraph.

Render the validation summary as a paragraph.

Parameters

$writer
array
list of messages

Returns

string
summary paragraph
protected string
# renderBulletList( array $writer )

Render the validation summary as a bullet list.

Render the validation summary as a bullet list.

Parameters

$writer
array
list of messages

Returns

string
summary bullet list
protected
# renderHeaderOnly( THtmlWriter $writer )

Render the validation summary header text only.

Render the validation summary header text only.

Parameters

$writer
THtmlWriter
the writer used for the rendering purpose
Methods inherited from TWebControl
clearStyle(), copyBaseAttributes(), createStyle(), getAccessKey(), getBackColor(), getBorderColor(), getBorderStyle(), getBorderWidth(), getCssClass(), getDecorator(), getEnsureId(), getFont(), getForeColor(), getHasStyle(), getHeight(), getStyle(), getTabIndex(), getTagName(), getToolTip(), getWidth(), onPreRender(), render(), renderBeginTag(), renderEndTag(), setAccessKey(), setBackColor(), setBorderColor(), setBorderStyle(), setBorderWidth(), setCssClass(), setEnsureId(), setForeColor(), setHeight(), setStyle(), setTabIndex(), setToolTip(), setWidth()
Methods inherited from TControl
__get(), addParsedObject(), addToPostDataLoader(), addedControl(), applyStyleSheetSkin(), autoBindProperty(), autoDataBindProperties(), bindProperty(), broadcastEvent(), bubbleEvent(), clearChildState(), clearControlState(), clearNamingContainer(), clearViewState(), convertUniqueIdToClientId(), createChildControls(), createControlCollection(), dataBind(), dataBindChildren(), dataBindProperties(), ensureChildControls(), findControl(), findControlsByID(), findControlsByType(), focus(), getAdapter(), getAllowChildControls(), getAttribute(), getAttributes(), getChildControlsCreated(), getClientID(), getControlStage(), getControlState(), getControls(), getCustomData(), getEnableTheming(), getEnableViewState(), getEnabled(), getHasAdapter(), getHasAttributes(), getHasChildInitialized(), getHasControls(), getHasInitialized(), getHasLoaded(), getHasLoadedPostData(), getHasPreRendered(), getID(), getIsSkinApplied(), getNamingContainer(), getPage(), getParent(), getRegisteredObject(), getSkinID(), getSourceTemplateControl(), getTemplateControl(), getUniqueID(), getViewState(), getVisible(), hasAttribute(), initRecursive(), isDescendentOf(), isObjectRegistered(), loadRecursive(), loadState(), loadStateRecursive(), onDataBinding(), onInit(), onLoad(), onUnload(), preRenderRecursive(), raiseBubbleEvent(), registerObject(), removeAttribute(), removedControl(), renderChildren(), renderControl(), saveState(), saveStateRecursive(), setAdapter(), setAttribute(), setChildControlsCreated(), setControlStage(), setControlState(), setCustomData(), setEnableTheming(), setEnableViewState(), setEnabled(), setID(), setPage(), setSkinID(), setTemplateControl(), setViewState(), setVisible(), trackViewState(), traverseChildControls(), unbindProperty(), unloadRecursive(), unregisterObject()
Methods inherited from TApplicationComponent
getApplication(), getRequest(), getResponse(), getService(), getSession(), getUser(), publishAsset(), publishFilePath()
Methods inherited from TComponent
__call(), __destruct(), __isset(), __set(), __sleep(), __unset(), __wakeup(), asa(), attachBehavior(), attachBehaviors(), attachClassBehavior(), attachEventHandler(), canGetProperty(), canSetProperty(), clearBehaviors(), createdOnTemplate(), detachBehavior(), detachBehaviors(), detachClassBehavior(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), evaluateStatements(), fxAttachClassBehavior(), fxDetachClassBehavior(), getAutoGlobalListen(), getBehaviorsEnabled(), getClassHierarchy(), getEventHandlers(), getListeningToGlobalEvents(), getSubProperty(), hasEvent(), hasEventHandler(), hasProperty(), isa(), listen(), raiseEvent(), setSubProperty(), unlisten()
Constants inherited from TControl
AUTOMATIC_ID_PREFIX, CLIENT_ID_SEPARATOR, CS_CHILD_INITIALIZED, CS_CONSTRUCTED, CS_INITIALIZED, CS_LOADED, CS_PRERENDERED, CS_STATE_LOADED, ID_FORMAT, ID_SEPARATOR, IS_CHILD_CREATED, IS_CREATING_CHILD, IS_DISABLE_THEMING, IS_DISABLE_VIEWSTATE, IS_ID_SET, IS_SKIN_APPLIED, IS_STYLESHEET_APPLIED, RF_ADAPTER, RF_AUTO_BINDINGS, RF_CHILD_STATE, RF_CONTROLS, RF_CONTROLSTATE, RF_DATA_BINDINGS, RF_EVENTS, RF_NAMED_CONTROLS, RF_NAMED_CONTROLS_ID, RF_NAMED_OBJECTS, RF_SKIN_ID
Constants inherited from TComponent
GLOBAL_RAISE_EVENT_LISTENER
Properties inherited from TWebControl
$_decorator
Terms of Service | Contact Us
PRADO v3.2.4 API Manual API documentation generated by ApiGen 2.8.0
Copyright © 2006-2014 by the PRADO Group.
Powered by PRADO