|
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
-
TApplicationComponent
-
TControl
implements
IRenderable,
IBindable
-
TWebControl
implements
IStyleable
-
TValidationSummary
Methods summary
public
|
#
__construct( )
Constructor. This method sets the foreground color to red.
Constructor. This method sets the foreground color to red.
Overrides
|
public
TValidationSummaryDisplayStyle
|
|
public
|
|
public
TValidationSummaryDisplayMode
|
|
public
|
|
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
|
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
|
|
protected
TClientSideValidationSummaryOptions
|
|
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
|
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
|
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 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
|
|