System.Web.UI
[ class tree: System.Web.UI ] [ index: System.Web.UI ] [ all elements ]

Class: TForm

Source Location: /Web/UI/TForm.php

Class Overview

TComponent
   |
   --TControl
      |
      --TForm

TForm class

Class Details

[line 35]
TForm class

TForm creates a form on the page. You can create at most one TForm component on a page and it should enclose other components that render form fields, such as TButton, TTextBox, etc.

TForm always submits to the page containing the TForm. If you need to submit to a different page, use 'form' tag directly. This may seem inconvient at first sight. Thinking in the other way, however, we shall see a single TForm enables the event-driven programming mechanism.

Namespace: System.Web.UI




version:  v1.0, last update on 2004/08/13 21:44:52
author:  Qiang Xue <qiang.xue@gmail.com>


[ Top ]

Methods


Inherited Variables

Inherited Methods

Class: TControl

TControl::__construct()
Constructor.
TControl::addBody()
Appends an object into the body collection of this control.
TControl::addParsedObject()
Adds the object parsed in template as a body of the component.
TControl::allowBody()
Determines whether the control can add the object as a body.
TControl::clearViewState()
Clears viewstate
TControl::findBodyControl()
TControl::getAttribute()
TControl::getAttributes()
Returns the attribute list object.
TControl::getAttributesToRender()
Returns attributes to be rendered.
TControl::getBodies()
TControl::getClientID()
Returns the client ID of the component.
TControl::getContainer()
Returns the container of this component.
TControl::getSkinName()
TControl::getTagName()
TControl::getViewState()
Returns a viewstate value.
TControl::initSkin()
Initializes a skin for the control. If a skin name is provided then that skin will be loaded.
TControl::isViewStateEnabled()
TControl::isVisible()
This method checks whether a control is visible.
TControl::loadViewState()
Loads viewstate into this component and its children.
TControl::onBubbleEvent()
This method responds to a bubbled event.
TControl::onInit()
This method is invoked when the control enters 'Init' stage.
TControl::onInitRecursive()
Calls onInit of this control and its children recursively.
TControl::onLoad()
This method is invoked when the control enters 'Load' stage.
TControl::onLoadRecursive()
Calls onLoad of this control and its children recursively.
TControl::onPreRender()
This method is invoked when the control enters 'PreRender' stage.
TControl::onPreRenderRecursive()
Calls onPreRender of this control and its children recursively.
TControl::onUnload()
This method is invoked when the control enters 'Unload' stage.
TControl::onUnloadRecursive()
Calls onUnload of this control and its children recursively.
TControl::raiseBubbleEvent()
Invokes the parent's onBubbleEvent method.
TControl::removeBodies()
Removes all body content.
TControl::render()
Renders this control.
TControl::renderAttributes()
Renders the attributes.
TControl::renderBody()
Renders the body content.
TControl::saveViewState()
Returns the viewstate of this component and its children.
TControl::setAttribute()
Sets an attribute.
TControl::setContainer()
Sets the container of this component
TControl::setEnableViewState()
TControl::setSkinName()
Sets the skin to use for this control
TControl::setTagName()
Sets the tag name.
TControl::setViewState()
Sets a viewstate value.
TControl::setVisible()
TControl::synchronizeControl()
This method should only be used by framework developer.

Class: TComponent

TComponent::__construct()
Constructor.
TComponent::addChild()
Adds a child component.
TComponent::addParsedObject()
Handles a component or string met in template.
TComponent::attachEventHandler()
Attaches a handler function to an event.
TComponent::bindProperty()
Sets up the binding between a property and an expression.
TComponent::canGetProperty()
Determines whether a property can be read.
TComponent::canSetProperty()
Determines whether a property can be written.
TComponent::createComponent()
Creates a child component.
TComponent::dataBind()
Performs the databinding for this component.
TComponent::evaluateExpression()
Evaluates a PHP expression.
TComponent::evaluateStatements()
Evaluates a list of PHP statements.
TComponent::findObject()
Finds an object by its ID path.
TComponent::getApplication()
TComponent::getChild()
TComponent::getChildren()
TComponent::getDefinition()
Returns or builds a component definition.
TComponent::getGlobalization()
Returns the Globalization instance for the application.
TComponent::getID()
TComponent::getModule()
Returns the module object that contains the component or the page containing the component.
TComponent::getPage()
TComponent::getParent()
TComponent::getPropertyInitValue()
Gets the initial value of a property.
TComponent::getPropertyType()
Returns the type of a property
TComponent::getRequest()
Returns the request object associated with application.
TComponent::getServiceManager()
Returns the service manager for this application.
TComponent::getSession()
Returns the session object associated with the application.
TComponent::getSessionState()
Returns a session variable.
TComponent::getUniqueID()
Returns the unique ID of the component.
TComponent::getUser()
Returns the user object associated with the application.
TComponent::hasChildren()
TComponent::hasEvent()
Determines whether an event is defined.
TComponent::hasProperty()
Determines whether a property is defined.
TComponent::initProperties()
Initializes the property values.
TComponent::instantiateTemplate()
Parses a template string and instantiates the content.
TComponent::onDataBinding()
This method is invoked when dataBind is invoked for the component.
TComponent::raiseEvent()
Invokes all attached event handler functions for a particular event.
TComponent::removeChild()
Removes a child component.
TComponent::removeChildren()
Removes all child components.
TComponent::setAttribute()
Sets an attribute.
TComponent::setDefinition()
Sets a component definition.
TComponent::setID()
Sets a component ID.
TComponent::setParent()
Sets the parent of this component.
TComponent::setPropertyInitValue()
Sets the initial value of a property.
TComponent::setRoot()
Sets the root component in the component hierarchy.
TComponent::setSessionState()
Sets a session variable.
TComponent::unbindProperty()
Breaks the binding between a property and an expression.
TComponent::__get()
Returns a property value by name or a child component by ID.
TComponent::__set()
Sets value of a component property.

Class Methods


method getAction [line 78]

string getAction( )

Get the form action (i.e. where the form is submitted to).

Default is the current request URI.




return:  form action attribute value.
access:  public


[ Top ]

method getHiddenFieldValue [line 233]

void getHiddenFieldValue( mixed $name)



access:  public


[ Top ]

method isArrayDeclarationRegistered [line 290]

boolean isArrayDeclarationRegistered( string $name)

Indicates whether the named array has been registered before.



access:  public
see:  TForm::registerArrayDeclaration()


Parameters:

string   $name   the array name

[ Top ]

method isBeginScriptRegistered [line 301]

boolean isBeginScriptRegistered( string $key)

Indicates whether the named beginscript has been registered before.



access:  public
see:  TForm::registerBeginScript()


Parameters:

string   $key   the key that identifies a beginscript

[ Top ]

method isEndScriptRegistered [line 323]

boolean isEndScriptRegistered( string $key)

Indicate whether the named endscript has been registered before.



access:  public
see:  TForm::registerEndScript()


Parameters:

string   $key   the key that identifies a beginscript

[ Top ]

method isHiddenFieldRegistered [line 244]

boolean isHiddenFieldRegistered( string $name)

Indicates whether the named hidden field has been registered before.



access:  public
see:  TForm::registerHiddenField()


Parameters:

string   $name   the name of the hidden field

[ Top ]

method isOnSubmitStatementRegistered [line 265]

boolean isOnSubmitStatementRegistered( string $name)

Indicates whether the named onsubmit statement has been registered before.



access:  public
see:  TForm::registerOnSubmitStatement()


Parameters:

string   $name   the key that identifies the onsubmit statement

[ Top ]

method isScriptFileRegistered [line 345]

boolean isScriptFileRegistered( string $key)

Indicates whether the named scriptfile has been registered before.



access:  public
see:  TForm::registerScriptFile()


Parameters:

string   $key   the name of the scriptfile

[ Top ]

method isStyleFileRegistered [line 367]

boolean isStyleFileRegistered( string $key)

Indicates whether the named CSS style file has been registered before.



access:  public
see:  TForm::registerStyleFile()


Parameters:

string   $key   the name of the style file

[ Top ]

method registerArrayDeclaration [line 276]

void registerArrayDeclaration( string $name, string $value)

Register an element of a javascript array to be created on client side.

The elements of multiple registration of the same array name will be merged together.




access:  public


Parameters:

string   $name   the name of the array
string   $value   the value of the array element

[ Top ]

method registerBeginScript [line 312]

void registerBeginScript( string $key, string $script)

Registers a javascript block to be rendered right after the openning form element.



access:  public
see:  TForm::isBeginScriptRegistered()


Parameters:

string   $key   a key that identifies the script block to avoid repetitive registration
string   $script   the javascript block

[ Top ]

method registerEndScript [line 334]

void registerEndScript( string $key, string $script)

Register a javascript block to be rendered right before the closing form element.



access:  public
see:  TForm::isEndScriptRegistered()


Parameters:

string   $key   a key that identifies the script block to avoid repetitive registration
string   $script   the javascript block

[ Top ]

method registerHiddenField [line 228]

void registerHiddenField( string $name, string $value)

Registers a hidden field to be submitted upon client postback event.



access:  public


Parameters:

string   $name   name of the hidden field
string   $value   value of the hidden field

[ Top ]

method registerOnSubmitStatement [line 254]

void registerOnSubmitStatement( string $key, string $script)

Registers a javascript statement to be executed upon client postback event.



access:  public


Parameters:

string   $key   a key that identifies the statement to avoid repetitive registration
string   $script   the javascript statement to be registered

[ Top ]

method registerScriptFile [line 356]

void registerScriptFile( string $key, string $scriptFile)

Registers a javascript file to be loaded in client side



access:  public
see:  TForm::isScriptFileRegistered()


Parameters:

string   $key   a key that identifies the script file to avoid repetitive registration
string   $scriptFile   the javascript file which can be relative or absolute URL

[ Top ]

method registerStyleFile [line 378]

void registerStyleFile( string $key, string $styleFile)

Registers a CSS style file to be imported with the page body



access:  public
see:  TForm::isStyleFileRegistered()


Parameters:

string   $key   a key that identifies the style file to avoid repetitive registration
string   $styleFile   the javascript file which can be relative or absolute URL

[ Top ]

method render [line 98]

the render( )

This overrides the parent implementation by rendering TForm-specific content.



return:  rendering result.
access:  public


Overrides TControl::render() (Renders this control.)

[ Top ]

method renderArrayScripts [line 144]

the renderArrayScripts( )

Renders the registered javascript array declarations



return:  rendering result
access:  public


[ Top ]

method renderBeginScripts [line 162]

the renderBeginScripts( )

Renders the registered javascripts showing at the beginning of the TForm control



return:  rendering result
access:  public


[ Top ]

method renderEndScripts [line 179]

the renderEndScripts( )

Renders the registered javascripts showing at the end of the TForm control



return:  rendering result
access:  public


[ Top ]

method renderHiddenFields [line 123]

the renderHiddenFields( )

Renders the registered hidden fields



return:  rendering result
access:  public


[ Top ]

method renderOnSubmitStatements [line 135]

the renderOnSubmitStatements( )

Renders the registered onsubmit statements



return:  rendering result
access:  public


[ Top ]

method renderScriptFiles [line 196]

the renderScriptFiles( )

Renders the registered javascript files to be included



return:  rendering result
access:  public


[ Top ]

method renderStyleFiles [line 208]

the renderStyleFiles( )

Renders the registered CSS style files to be included



return:  rendering result
access:  public


[ Top ]

method setAction [line 89]

void setAction( string $value)

Sets the for value for the action attribute of the form.

Changing the value of the form, changes the destination of the form.




access:  public


Parameters:

string   $value   new destination for the form.

[ Top ]


© 2004-2005 PRADO Software Group. All Rights Reserved.