[ Index ]
 

Code source de PRADO 3.0.6

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/framework/Web/UI/WebControls/ -> TTextBox.php (sommaire)

TTextBox class file.

Author: Qiang Xue <qiang.xue@gmail.com>
Copyright: Copyright © 2005 PradoSoft
License: http://www.pradosoft.com/license/
Version: $Id: TTextBox.php 1397 2006-09-07 07:55:53Z wei $
Poids: 527 lignes (17 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 3 classes

TTextBox:: (34 méthodes):
  getTagName()
  addAttributesToRender()
  getPostBackOptions()
  loadPostData()
  getValidationPropertyValue()
  onTextChanged()
  raisePostDataChangedEvent()
  renderContents()
  getAutoCompleteType()
  setAutoCompleteType()
  getAutoPostBack()
  setAutoPostBack()
  getAutoTrim()
  setAutoTrim()
  getCausesValidation()
  setCausesValidation()
  getColumns()
  setColumns()
  getMaxLength()
  setMaxLength()
  getReadOnly()
  setReadOnly()
  getRows()
  setRows()
  getText()
  setText()
  getSafeText()
  getSafeTextParser()
  getTextMode()
  setTextMode()
  getValidationGroup()
  setValidationGroup()
  getWrap()
  setWrap()

TTextBoxMode:: (0 méthodes):

TTextBoxAutoCompleteType:: (0 méthodes):


Classe: TTextBox  - X-Ref

TTextBox class

TTextBox displays a text box on the Web page for user input.
The text displayed in the TTextBox control is determined by the
{@link setText Text} property. You can create a <b>SingleLine</b>,
a <b>MultiLine</b>, or a <b>Password</b> text box by setting
the {@link setTextMode TextMode} property. If the TTextBox control
is a multiline text box, the number of rows it displays is determined
by the {@link setRows Rows} property, and the {@link setWrap Wrap} property
can be used to determine whether to wrap the text in the component.

To specify the display width of the text box, in characters, set
the {@link setColumns Columns} property. To prevent the text displayed
in the component from being modified, set the {@link setReadOnly ReadOnly}
property to true. If you want to limit the user input to a specified number
of characters, set the {@link setMaxLength MaxLength} property.
To use AutoComplete feature, set the {@link setAutoCompleteType AutoCompleteType} property.

If {@link setAutoPostBack AutoPostBack} is set true, updating the text box
and then changing the focus out of it will cause postback action.
And if {@link setCausesValidation CausesValidation} is true, validation will
also be processed, which can be further restricted within
a {@link setValidationGroup ValidationGroup}.

WARNING: Be careful if you want to display the text collected via TTextBox.
Malicious cross-site script may be injected in. You may use {@link getSafeText SafeText}
to prevent this problem.

NOTE: If you set {@link setWrap Wrap} to false or use {@link setAutoCompleteType AutoCompleteType},
the generated HTML output for the textbox will not be XHTML-compatible.
Currently, no alternatives are available.

getTagName()   X-Ref

return: string tag name of the textbox

addAttributesToRender($writer)   X-Ref
Adds attribute name-value pairs to renderer.
This method overrides the parent implementation with additional textbox specific attributes.

param: THtmlWriter the writer used for the rendering purpose

getPostBackOptions()   X-Ref
Gets the post back options for this textbox.

return: array

loadPostData($key,$values)   X-Ref
Loads user input data.
This method is primarly used by framework developers.

param: string the key that can be used to retrieve data from the input data collection
param: array the input data collection
return: boolean whether the data of the component has been changed

getValidationPropertyValue()   X-Ref
Returns the value to be validated.
This methid is required by IValidatable interface.

return: mixed the value of the property to be validated.

onTextChanged($param)   X-Ref
Raises <b>OnTextChanged</b> event.
This method is invoked when the value of the {@link getText Text}
property changes on postback.
If you override this method, be sure to call the parent implementation to ensure
the invocation of the attached event handlers.

param: TEventParameter event parameter to be passed to the event handlers

raisePostDataChangedEvent()   X-Ref
Raises postdata changed event.
This method is required by {@link IPostBackDataHandler} interface.
It is invoked by the framework when {@link getText Text} property
is changed on postback.
This method is primarly used by framework developers.


renderContents($writer)   X-Ref
Renders the body content of the textbox when it is in MultiLine text mode.

param: THtmlWriter the writer for rendering

getAutoCompleteType()   X-Ref

return: TTextBoxAutoCompleteType the AutoComplete type of the textbox

setAutoCompleteType($value)   X-Ref

param: TTextBoxAutoCompleteType the AutoComplete type of the textbox, default value is TTextBoxAutoCompleteType::None.

getAutoPostBack()   X-Ref

return: boolean a value indicating whether an automatic postback to the server

setAutoPostBack($value)   X-Ref
Sets the value indicating if postback automatically.
An automatic postback to the server will occur whenever the user
modifies the text in the TTextBox control and then tabs out of the component.

param: boolean the value indicating if postback automatically

getAutoTrim()   X-Ref

return: boolean a value indicating whether the input text should be trimmed spaces. Defaults to false.

setAutoTrim($value)   X-Ref
Sets the value indicating if the input text should be trimmed spaces

param: boolean the value indicating if the input text should be trimmed spaces

getCausesValidation()   X-Ref

return: boolean whether postback event trigger by this text box will cause input validation, default is true.

setCausesValidation($value)   X-Ref

param: boolean whether postback event trigger by this text box will cause input validation.

getColumns()   X-Ref

return: integer the display width of the text box in characters, default is 0 meaning not set.

setColumns($value)   X-Ref
Sets the display width of the text box in characters.

param: integer the display width, set it 0 to clear the setting

getMaxLength()   X-Ref

return: integer the maximum number of characters allowed in the text box, default is 0 meaning not set.

setMaxLength($value)   X-Ref
Sets the maximum number of characters allowed in the text box.

param: integer the maximum length,  set it 0 to clear the setting

getReadOnly()   X-Ref

return: boolean whether the textbox is read only, default is false.

setReadOnly($value)   X-Ref

param: boolean whether the textbox is read only

getRows()   X-Ref

return: integer the number of rows displayed in a multiline text box, default is 4

setRows($value)   X-Ref
Sets the number of rows displayed in a multiline text box.

param: integer the number of rows

getText()   X-Ref

return: string the text content of the TTextBox control.

setText($value)   X-Ref
Sets the text content of the TTextBox control.

param: string the text content

getSafeText()   X-Ref

return: string safe text content with javascript stripped off

getSafeTextParser()   X-Ref

return: mixed safe text parser

getTextMode()   X-Ref

return: TTextBoxMode the behavior mode of the TTextBox component. Defaults to TTextBoxMode::SingleLine.

setTextMode($value)   X-Ref
Sets the behavior mode of the TTextBox component.

param: TTextBoxMode the text mode

getValidationGroup()   X-Ref

return: string the group of validators which the text box causes validation upon postback

setValidationGroup($value)   X-Ref

param: string the group of validators which the text box causes validation upon postback

getWrap()   X-Ref

return: boolean whether the text content wraps within a multiline text box. Defaults to true.

setWrap($value)   X-Ref
Sets the value indicating whether the text content wraps within a multiline text box.

param: boolean whether the text content wraps within a multiline text box.

Classe: TTextBoxMode  - X-Ref

TTextBoxMode class.
TTextBoxMode defines the enumerable type for the possible mode
that a {@link TTextBox} control could be at.

The following enumerable values are defined:
- SingleLine: the textbox will be a regular single line input
- MultiLine: the textbox will be a textarea allowing multiple line input
- Password: the textbox will hide user input like a password input box

Classe: TTextBoxAutoCompleteType  - X-Ref

TTextBoxAutoCompleteType class.
TTextBoxAutoCompleteType defines the possible AutoComplete type that is supported
by a {@link TTextBox} control.



Généré le : Sun Feb 25 21:07:04 2007 par Balluche grâce à PHPXref 0.7