VCL
[ class tree: VCL ] [ index: VCL ] [ all elements ]

Class: Component

Source Location: /classes.inc.php

Class Overview

Object
   |
   --Persistent
      |
      --Component

Component class


Class Details

[line 792]
Component class

Base class for components, it provides owner relationships properties and basic methods to call events.

Non-visible components must inherit from Component and not from Control, the IDE automatically handles the component as iconic.




[ Top ]

Properties

Events

    [none]

JS Events

    [none]

Methods

Constants

    [none]

Child classes:

ActionList
ActionList Class
User
Basic User class
BasicAuthentication
Performs authentication using basic HTTP
BusinessObject
BusinessObject Class
TreeNode
TreeNode class
Control
Control class
CustomConnection
Component class
DataSet
DataSet component, base class to inherit and create dataset components
Datasource
Datasource class
Timer
Timer Class
Application
Component class
ImageList
ImageList class
CustomPopupMenu
PopupMenu class
CustomStyleSheet
StyleSheet Class
PageTemplate
Base class for template engines, inherit from it and override initialize(), assignComponents() and dumpTemplate()
TemplateManager
Template Manager to register all available template engines
Service
Component class

Inherited Properties

Class: Persistent

Persistent::NamePath
Used to serialize/unserialize
Persistent::Owner
Owner of the component, in Persistent always return null

Inherited Events

Inherited JS Events

Inherited Methods

Class: Persistent

Persistent::assign
Assing the source properties to this object
Persistent::assignError
Raises an assignation error
Persistent::assignTo
Assign this object to another object
Persistent::serialize
Stores this object into the session, it uses PHP reflection system to get published properties, the ones that will be stored.
Persistent::unserialize
Read this object properties from the session, only published properties will be recovered, components need an owner to be unserialized.

Class: Object

Object::__construct
Constructor
Object::className
Returns the name of the object class
Object::classNameIs
Check if the object is from a specific class
Object::classParent
Returns the parent class of the object
Object::inheritsFrom
Check if the object inherits from a specific class
Object::methodExists
Check if a method exists
Object::readProperty
Reads a property from the streams
Object::__get
To virtualize properties
Object::__set
To virtualize properties

Properties


property ComponentCount : integer [line 1319]

Indicates how many components this component is owner

[ Top ]

property Components : Collection [line 1312]

Component list containing all the components owned by this component

[ Top ]

property ControlState : integer [line 1333]

A flag to know the state of the control, csLoading, csDesigning

Example: To test if the component is rendered inside the IDE:

  1.  if (($this->ControlState csDesigning)==csDesigning)
  2.  {
  3.     //Write here the design-time code
  4.   }


[ Top ]

property DataFieldValue : mixed [line 1083]

This function returns the value of the datafield, if any

[ Top ]

property Name : string [line 1354]

Name for the component, to be used as an identifier, should be unique

[ Top ]

property NamePath : string [line 1340]

The path to uniquely identify a component, qualified by the owner when required

Used to serialize/unserialize

Defined in Persistent::NamePath
[ Top ]

property Owner : Component [line 1346]

The owner of this component, usually the page component, but the owner of pages is the application object

Owner of the component, in Persistent always return null

Defined in Persistent::Owner
[ Top ]

property Tag : mixed [line 1386]

A versatily property of every Component that can be used in any way you want

[ Top ]


Events



Javascript Events



Methods


constructor __construct [line 806]

Component __construct( [object $aowner = null])

Constructor



Overridden in child classes as:

ActionList::__construct()
User::__construct()
BusinessObject::__construct()
Control::__construct()
Constructor for the class
GraphicMainMenu::__construct()
FocusControl::__construct()
Clock::__construct()
CustomCheckListBox::__construct()
MonthCalendar::__construct()
DateTimePicker::__construct()
SimpleChart::__construct()
Image::__construct()
FlashObject::__construct()
Bevel::__construct()
CustomLabel::__construct()
DBPaginator::__construct()
CustomPanel::__construct()
Panel::__construct()
Clock::__construct()
DBRepeater::__construct()
CustomDBGrid::__construct()
CustomListBox::__construct()
ComboBox::__construct()
CustomRadioGroup::__construct()
CustomPage::__construct()
Page::__construct()
Frameset::__construct()
Frame::__construct()
DWidget::__construct()
CustomProgressBar::__construct()
QWidget::__construct()
BitBtn::__construct()
SpeedButton::__construct()
CustomListView::__construct()
DBGrid::__construct()
CustomPageControl::__construct()
CustomTreeView::__construct()
CustomTextField::__construct()
CustomLabeledEdit::__construct()
CustomUpDown::__construct()
ColorSelector::__construct()
CustomToolBar::__construct()
GroupBox::__construct()
CustomButtonView::__construct()
Window::__construct()
CustomMainMenu::__construct()
ScrollBar::__construct()
CustomEdit::__construct()
CustomMemo::__construct()
CustomRichEdit::__construct()
ButtonControl::__construct()
Button::__construct()
CustomCheckBox::__construct()
RadioButton::__construct()
MapShape::__construct()
Shape::__construct()
PaintBox::__construct()
HiddenField::__construct()
CustomConnection::__construct()
Database::__construct()
IBDatabase::__construct()
DataSet::__construct()
Datasource::__construct()
Application::__construct()
ImageList::__construct()
PageTemplate::__construct()
TemplateManager::__construct()
Service::__construct()

Overrides Object::__construct (Constructor)

Parameters:

object   $aowner   The owner of this component

[ Top ]

string ajaxCall [line 968]

string ajaxCall( string $phpevent, [array $params = array()])

Returns the js event attribute to call the server using ajax



Parameters:

string   $phpevent   php event to call
array   $params   values to send to the server

[ Top ]

mixed callEvent [line 930]

mixed callEvent( string $event, mixed $params)

Calls a server event



Tags:

return:  calling event result


Parameters:

string   $event  
mixed   $params  

[ Top ]

string dumpChildrenHeaderCode [line 1171]

string dumpChildrenHeaderCode( [boolean $return_contents = false])

Dump the header code for all the children



Parameters:

boolean   $return_contents   If true, code is returned instead be dumped

[ Top ]

void dumpChildrenJavascript [line 1147]

void dumpChildrenJavascript( )

Dump the javascript code for all the children



[ Top ]

void dumpHeaderCode [line 1139]


void dumpHiddenKeyFields [line 1099]

void dumpHiddenKeyFields( [ $force = false])

This function dumps out the key fields for the current row, useful to

send information about the current register




Overridden in child classes as:

CustomTable::dumpHiddenKeyFields()
Dump hidden html fields with the key fields of this dataset
CustomIBTable::dumpHiddenKeyFields()

Parameters:

   $force  

[ Top ]

void dumpJavascript [line 1131]


void fixupProperty [line 879]

void fixupProperty( mixed $value)

This method returns the right object (or the input string if object not found) for an object name Should be used on the loaded method for object properties to find the right reference



Parameters:

mixed   $value   string or object to set the property to

[ Top ]

string generateAjaxEvent [line 953]

string generateAjaxEvent( string $jsevent, string $phpevent)

Returns the js event attribute to call the server using Ajax we use xajax to handle all the ajax stuff.



Parameters:

string   $jsevent   javascript event
string   $phpevent   php event to call

[ Top ]

boolean hasValidDataField [line 1060]

boolean hasValidDataField( )

This function returns true if the datafield is valid



[ Top ]

void init [line 992]


void insertComponent [line 1287]

void insertComponent( object $acomponent)

Insert a component into the components collection



Parameters:

object   $acomponent   Component to insert

[ Top ]

void loaded [line 844]


void loadedChildren [line 853]

void loadedChildren( )

Calls childrens loaded recursively



[ Top ]

void loadResource [line 1202]

void loadResource( string $filename, [boolean $inherited = false], [ $storelastresource = true])

Load this component from a string



Parameters:

string   $filename   xml file name
boolean   $inherited   specifies if we are going to read an inherited resource
   $storelastresource  

[ Top ]

void preinit [line 979]


integer readAccessibility [line 868]

integer readAccessibility( $method, $defaccessibility)

Overwrite this method to provide accessibility info for the RPC engine



Tags:

see:  DBGrid::UpdateRow


Overridden in child classes as:

DBGrid::readAccessibility()
To give permission to execute certain methods

Parameters:

   $method  
   $defaccessibility  

[ Top ]

void readFromResource [line 1250]

void readFromResource( [string $filename = ""], [boolean $createobjects = true])

Read a component from a resource file



Parameters:

string   $filename   Filename of the resource file
boolean   $createobjects   Specifies if create the objects found or just read properties

[ Top ]

void removeComponent [line 1298]

void removeComponent( object $acomponent)

Remove a component from the components collection



Parameters:

object   $acomponent   Component to remove

[ Top ]

void serializeChildren [line 1118]

void serializeChildren( )

Serialize all children



[ Top ]

void unserializeChildren [line 913]

void unserializeChildren( )

Unserialize all children



[ Top ]

void updateDataField [line 1016]

void updateDataField( $value)

Checks if there is any datafield attached to the component

and sets the dataset in edit state and all the fields with the appropiate values so the dataset is able to update the right record

Properties for data-aware components must be named DataField DataSource

This is for basic single-field data-aware controls, for more complicated controls like DBGrid, each component must create its own mechanism to update information in the database




Parameters:

   $value  

[ Top ]



Documentation generated on Tue, 27 Mar 2007 13:33:29 +0200 by phpDocumentor 1.3.1