constructor __construct [line 1195]
method ajaxCall [line 1505]
string ajaxCall(
string
$phpevent, [array
$params = array()], [array
$comps = array()])
|
|
Dumps the javascript code to make an ajax call to the server.
Use this method in your javascript events to generate the required javascript code to perform an ajax call to the server.
By default, all components are updated after returning from the server, but to save bandwidth and prevent some components to get updated if are not need, you can use the $comps parameter and specify which components you want to get updated.
Tags:
Parameters:
method callEvent [line 1440]
mixed callEvent(
string
$event, mixed
$params)
|
|
Calls a server event.
This method provides you an easy way to fire an event in your component and check if it is assigned.
Example: $this->callEvent($this->_onclick, array());
You can send any params you want the user of your component to receive. This method is useful if you are a component developer and you can use it to fire your server events easily, as it performs any check is needed to call the right event.
Tags:
Parameters:
method defaultName [line 2246]
method defaultTag [line 2275]
method dumpChildrenFormItems [line 1849]
mixed dumpChildrenFormItems(
[boolean
$return_contents = false])
|
|
This method is called by the page just after dumping the starting form tag.
Provides an opportunity for a component developer to dump hidden fields (or other stuff) on that section of the page. Is also used by templates to get that code.
Tags:
Overridden in child classes as:
- Page::dumpChildrenFormItems()
Parameters:
method dumpChildrenHeaderCode [line 1798]
string dumpChildrenHeaderCode(
[boolean
$return_contents = false])
|
|
Dumps the header code for all the children
Tags:
Parameters:
method dumpChildrenJavascript [line 1771]
void dumpChildrenJavascript(
)
|
|
Dumps the javascript code for all the children
Tags:
method dumpFormItems [line 1833]
method dumpHeaderCode [line 1761]
method dumpHiddenKeyFields [line 1702]
method dumpJavascript [line 1747]
method dumpJSEvent [line 1314]
void dumpJSEvent(
string
$event)
|
|
Dumps javascript code for an event
This method dumps a javascript named $event. This function is called when generating the page code in the header to create all the functions to hold the javascript code written by the user.
This method is interesting for you if you are a component developer, as you can use it to generate javascript code for an event
Parameters:
method fixupProperty [line 1360]
void fixupProperty(
mixed
$value)
|
|
Resolves the right reference to an object property
This method returns the right object (or the input string if object not found) for an object name. Use on the loaded method for object properties to find the right reference.
When properties are loaded from the stream, object properties are set with the Name of the component to which they must link. Those properties are strings on that moment, to get the right reference to the object, you can use this method to make the link.
Tags:
Parameters:
method generateAjaxEvent [line 1476]
string generateAjaxEvent(
string
$jsevent, string
$phpevent)
|
|
Returns the javascript code to generate an ajax call.
This method returns the js event attribute to call the server using Ajax. Use xajax to handle everything related to ajax. This method is useful for you if you are a component developer and want to implement ajax easily in your component.
Tags:
Parameters:
method getName [line 2211]
Specifies the name for the component. The name is used as an identifier and should be unique.
Use Name to change the name of a component to reflect its purpose in the current application. By default, the IDE assigns sequential names based on the type of the component, such as 'Button1', 'Button2', and so on.
Tags:
method getTag [line 2273]
A versatile property of every Component that can be used in any way you want
Tag has no predefined meaning. The Tag property is provided for the convenience of developers. It can be used for storing an additional value.
<?php
function Button1Click($sender, $params)
{
//All three buttons OnClick event is assigned to this
//event handler, and to check which one has been pressed
//you can use $sender and Tag property
switch($sender->Tag)
{
case 1: echo "Button 1 clicked!"; break;
case 2: echo "Button 2 clicked!"; break;
case 3: echo "Button 3 clicked!"; break;
}
}
?>
method hasValidDataField [line 1644]
boolean hasValidDataField(
)
|
|
Returns true if a valid data field is attached to the component
Use this method if you want to know if there is a valid data field attached to the component. For that, datafield property must be assigned, datasource must be assigned also, and datasource must have a dataset assigned.
Tags:
method init [line 1555]
method insertComponent [line 2041]
void insertComponent(
object
$acomponent)
|
|
Inserts a component into the component's collection
Tags:
Parameters:
method loaded [line 1257]
method loadedChildren [line 1271]
Calls childrens loaded
This method iterates all children and call loaded for each of them. The list used for children is the Components property.
Tags:
method loadResource [line 1883]
void loadResource(
string
$filename, [boolean
$inherited = false], [boolean
$storelastresource = true])
|
|
Loads this component from a string
Tags:
Parameters:
method preinit [line 1535]
method readAccessibility [line 1296]
integer readAccessibility(
string
$method, integer
$defaccessibility)
|
|
Provides accessibility info to the embedded RPC engine.
Override this method to provide accessibility info for the RPC engine. If you use RPC in your component, you can override this method to provide the RPC engine with the accesibility information on the methods you want to publish.
This is required to prevent remote execution of methods.
Tags:
Overridden in child classes as:
- DBGrid::readAccessibility()
- To give permission to execute certain methods
Parameters:
method readComponentCount [line 2101]
integer readComponentCount(
)
|
|
Indicates the number of components owned by the component.
Use ComponentCount to find or verify the number of components owned by a component, or when iterating through the Components list to perform some action on all owned components. ComponentCount is used internally for such iterative procedures.
Note: The ComponentCount of a component contains the same number of items as in the Components list for that component, and is always 1 more than the highest Components index, because the first Components index is always 0.
Tags:
method readComponents [line 2082]
Lists all the components owned by this component.
Use Components to access any of the components owned by this component, such as the components owned by a form. The Components property is most useful when referring to owned components by number rather than name. It is also used internally for iterative processing of all owned components.
Index ranges from 0 to ComponentCount minus 1.
Tags:
method readControlState [line 2115]
integer readControlState(
)
|
|
A flag to know the state of the control, csLoading, csDesigning
Example: To test if the component is rendered inside the IDE:
{
//Write the design-time code here
}
method readDataFieldValue [line 1674]
mixed readDataFieldValue(
)
|
|
This property returns the value of the datafield if any.
Use this property to get the value to the attached datafield, if any. If not datatafield assigned, this property returns false.
Tags:
method readFromResource [line 1937]
void readFromResource(
[string
$filename = ""], [boolean
$createobjects = true])
|
|
Reads a component from a resource file
Tags:
Parameters:
method readNamePath [line 2126]
Specifies the path to uniquely identify a component, qualified by the owner when required.
Tags:
Overrides
Persistent::readNamePath() (Used to serialize/unserialize. It returns the full path to identify this component.)
method readOwner [line 2196]
Indicates the component that is responsible for streaming and freeing this component.
Use Owner to find the owner of a component. The Owner of a component is responsible for two things:
The memory for the owned component is freed when its owner's memory is freed. This means that when a form is destroyed, all the components on the form are also destroyed.
The Owner is responsible for loading and saving the published properties of its owned controls.
By default, a form owns all components that are on it. In turn, the form is owned by the application. Thus when the application shuts down and its memory is freed, the memory for all forms (and all their owned components) is also freed. When a form is loaded into memory, it loads all of the components that are on it.
The owner of a component is determined by the parameter passed to the constructor when the component is created. For components created in the form designer, the form is automatically assigned as the Owner.
Warning: If a component has an Owner other than a form or data module, it will not be saved or loaded with its Owner.
Tags:
Overrides
Persistent::readOwner() (Owner of the component.)
method removeComponent [line 2058]
void removeComponent(
object
$acomponent)
|
|
Removes a component from the component's collection
Tags:
Parameters:
method serializeChildren [line 1728]
void serializeChildren(
)
|
|
Serializes all children
This method iterates through all the children and calls serialize for each one. Serializing stores published properties on the session with an specific format so it can restore them on the next request, that way, recovering application state and emulating desktop applications.
Tags:
method setName [line 2212]
method setTag [line 2274]
method unserializeChildren [line 1411]
void unserializeChildren(
)
|
|
Unserializes all children by calling unserialize for all the components
This method iterates the components property and calls the unserialize() method of each one, to recover the state of all published properties from the session.
This is used to ensure the persistance of the status of the application.
Tags:
method updateDataField [line 1592]
void updateDataField(
mixed
$value)
|
|
Updates the field on the dataset attached, if any
Checks if there is any datafield attached to the component. If so, 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.
Tags:
Parameters:
method writeControlState [line 2116]
void writeControlState(
$value)
|
|
Parameters: