Object | --Persistent | --Component | --Control | --FocusControl | --ScrollingControl | --CustomPage | --Page
Located in File: /forms.inc.php
This class is the foundation of the VCL, it's the main container in which all controls that make up your interface are placed. In the web world, the Page class, in short, generates an HTML document and is responsible to render all controls it holds inside.
If you use Delphi for PHP, Pages are created by the IDE and you drop components inside them, which are stored in an .xml.php file that is read by the Page.
![]() | Action | This property allows you to override the action parameter for the form that is generated by the Page component. |
![]() | Alignment | Specifies the alignment to be used by the control, it depends on the control on how to use this property to show information. [Publishes Control::Alignment] |
![]() | Background | Specifies the background to be used when generating the HTML document. |
![]() | BorderWidth | The BorderWidth property sets the width of all four borders of the page. |
![]() | BottomMargin | Sets or retrieves the height of the bottom margin of the object. |
![]() | Caption | Specifies a text string that identifies the control to the user. [Publishes Control::Caption] |
![]() | Color | Specifies the main color of the control. [Publishes Control::Color] |
![]() | Directionality | Set the text directionality of the page |
![]() | DocType | Specifies the doctype to include on the generation of the page. |
![]() | Encoding | Specifies the encoding to use for the page. |
![]() | FrameBorder | Specifies the frameborder when the page generates Frames, this value is used only when Frames or Framesets are placed inside the Page |
![]() | FrameSpacing | Sets or retrieves the amount of additional space between the frames, this value is used only when Frames or Framesets are placed inside the Page. |
![]() | Icon | Specifies the icon to be used on the address bar when loading this page and for bookmarks. |
![]() | IsForm | If false, the form doesn't generate any <form> tag, but events won't be processed |
![]() | IsMaster | If true, this page doesn't render itself, but it's meant to be used as base for another forms |
![]() | Language | Specifies the language to be used when rendering this page. |
![]() | Layout | Specifies the Layout this control uses to render its controls to the browser. [Publishes FocusControl::Layout] |
![]() | LeftMargin | Sets or retrieves the width of the left margin of the object. |
![]() | RightMargin | Sets or retrieves the width of the right margin of the object. |
![]() | ShowFooter | If false, the form doesn't dump any footer code. |
![]() | ShowHeader | If false, the form doesn't dump any header code. |
![]() | ShowHint | Determines whether the control displays a Help Hint when the mouse pointer rests momentarily on the control. [Publishes Control::ShowHint] |
![]() | TemplateEngine | Specifies the engine to be used to render this page using templates. |
![]() | TemplateFilename | Specifies the name of the template file to be used to render this page. |
![]() | TopMargin | Sets or retrieves the height of the top margin of the object. |
![]() | UseAjax | This property allows the Page, if set, to process and handle Ajax requests performed using Component::ajaxCall. |
![]() | UseAjaxDebug | This property enables a debug window, to show ajax calls information |
![]() | Visible | Determines whether the component appears on the browser. [Publishes Control::Visible] |
![]() | EndForm | Returns the ending form tag |
![]() | FormEncoding | Specifies the encoding to use the form generated by the Page. |
![]() | StartForm | Dumps the opening form tag |
Defined in class FocusControl |
||
![]() | ControlCount | Returns the number of controls for which this control is the Parent. |
![]() | Layout | Specifies the Layout this control uses to render its controls to the browser. |
Defined in class Control |
||
![]() | Cached | |
![]() | Cursor | Change the value of Cursor to provide feedback to the user when the mouse pointer enters the control. |
![]() | Height | Specifies the vertical size of the control or form in pixels. |
![]() | Hint | Specifies the text to show in a tooltip when the mouse is over the control for some time. |
![]() | HintAttribute | If control has any Hint, then returns the hint in attribute format for the tag. |
![]() | Layer | Determines the layer in which this control is going to be rendered. |
![]() | Left | Uses the Left property to determine where the left side of the control begins, or to reposition the left side of the control. |
![]() | Top | Uses Top to locate the top of the control, or reposition the control to a different Y coordinate. |
![]() | Width | Specifies the horizontal size of the control or form in pixels. |
![]() | AdjustToLayout | A helper property for Layouts to know if the component should adjust to the layout or not |
![]() | Align | Determines how the control aligns within its container (parent control). |
![]() | Alignment | Specifies the alignment to be used by the control, it depends on the control on how to use this property to show information. |
![]() | Attributes | A property for tag based controls to allow component user to add attributes to the tag |
![]() | Autosize | Determines if the control is going to adjust itself to the parent size |
![]() | Caption | Specifies a text string that identifies the control to the user. |
![]() | Color | Specifies the main color of the control. |
![]() | ControlStyle | An array which holds the control style, with settings for the IDE. |
![]() | DesignColor | Specifies a color to use by the control at design time. |
![]() | DivWrap | Specifies if the control must be wrapped by a div or not |
![]() | DoParentReset | Performs a parent reset if true. |
![]() | Enabled | Controls whether the control responds to mouse, keyboard, and timer events. |
![]() | Font | Determines the Font to be used when generating this control. |
![]() | Hidden | This property, when true, allows controls to generate all code, but don't show the control on the browser. |
![]() | IsLayer | Specifies if this control is a Layer instead of being integrated into the document. |
![]() | JsEvents | Returns a string with all assigned javascript events, ready to be added to a control tag. |
![]() | JSWrapperHiddenFieldName | Gets the name of the hidden field used to submit the value for the event that was fired. |
![]() | Parent | Indicates the parent of the control. |
![]() | ParentColor | Determines where a control looks for its color information. |
![]() | ParentFont | Determines where a control looks for its font information. |
![]() | ParentShowHint | Determines where a control looks to find out if its Help Hint should be shown. |
![]() | PopupMenu | Identifies the pop-up menu associated with the control. |
![]() | ShowHint | Determines whether the control displays a Help Hint when the mouse pointer rests momentarily on the control. |
![]() | Style | Use this property to attach a css style to the control. |
![]() | StyleClass | Normalizes the css style class name |
![]() | Visible | Determines whether the component appears on the browser. |
Defined in class Component |
||
![]() | Name | Specifies the name for the component. The name is used as an identifier and should be unique. |
![]() | Tag | A versatile property of every Component that can be used in any way you want |
![]() | ComponentCount | Indicates the number of components owned by the component. |
![]() | Components | Lists all the components owned by this component. |
![]() | ControlState | A flag to know the state of the control, csLoading, csDesigning |
![]() | DataFieldValue | This property returns the value of the datafield if any. |
![]() | NamePath | Specifies the path to uniquely identify a component, qualified by the owner when required. |
![]() | Owner | Indicates the component that is responsible for streaming and freeing this component. |
Defined in class Persistent |
||
![]() | NamePath | Used to serialize/unserialize. It returns the full path to identify this component. |
![]() | Owner | Owner of the component. |
property Action (line 1128)
Usually, the action for the form is the script that generates the page i.e. "unit1.php", but if you need to override this behaviour, you can use this property for that.
This property is useful to create forms that post information to another script for further processing.
property Alignment (line 1067)
property Background (line 1093)
The background should be an image file, and will be used to fill the page background with it. For example: images/mybackground.gif
property BorderWidth (line 1008)
You can set this property to a value which will be used as width for the border of the page.
property BottomMargin (line 1872)
Use this property to specify the margin at the bottom of the page.
property Cache (line 1256)
property Caption (line 1079)
property Color (line 1070)
property Directionality (line 1559)
Use this property to set the directionality of the text inside the page.
property DocType (line 1044)
DocType specifies the type of document you want to generate, components are responsible to adapt to this property and generate valid code, the Page simply sets the doctype for the HTML document and expects components use it to determine the kind of valid HTML must generate
property Encoding (line 1026)
Use this property to specify the encoding to use when generating this page, this encoding is set on the charset of the generated HTML and it's different from the Charset you setup PHP to work on.
property FrameBorder (line 996)
fbDefault - Inset border is drawn
fbNo - No border is drawn
fbYes - Inset border is drawn
property FrameSpacing (line 978)
When this happens, the Page control, instead generate an HTML document generates a Frameset and renders all the Frames and Framesets inside depending on the align property.
property Icon (line 961)
property IsForm (line 1917)
To allow VCL for PHP process events, there must be a form on the html document that allows the document to be posted to the server, but, for example, if you want to include your page into another page, you should set this property to false to prevent generate nested <form> tags, as that is not allowed by HTML
property IsMaster (line 1932)
This property is useful to create Master pages, when set to true, the page won't be shown and you can create a new page and inherit from it.
You can get more details here:
property Language (line 1210)
By setting it to a different value than (default), the Page will look for a file named [language].xml.php to be loaded. That file must contain the properties need to be changed to localize the interface to that specific language
Check here to know more:
property Layout (line 946)
property LeftMargin (line 1860)
Use this property to specify the margin at the left of the page.
property RightMargin (line 1884)
Use this property to specify the margin at the right of the page.
property ShowFooter (line 1949)
This property is useful, for example if you want to include your form inside another form, so it doesn't generate a full HTML document.
When the Page generates the HTML document, it starts from top to bottom, first dumps the header, after that, the body and at the end, the footer. By setting this property to false, you tell the Page to don't generate the footer and also, events for the footer won't be generated.
property ShowHeader (line 1902)
This property is useful, for example if you want to include your form inside another form, so it doesn't generate a full HTML document.
When the Page generates the HTML document, it starts from top to bottom, first dumps the header, after that, the body and at the end, the footer. By setting this property to false, you tell the Page to don't generate the footer and also, events for the footer won't be generated.
property ShowHint (line 1073)
property Target (line 1289)
property TemplateEngine (line 1111)
Valid values for this property are registered Template Plugins, at this time, only Smarty is included, checkout here to know more:
property TemplateFilename (line 1148)
Usually is an HTML file with some placeholders to allow insert information inside. To insert components inside templates, you must add a placeholder with the name of the component you want to insert, i.e. {$Button1}
property TopMargin (line 1848)
Use this property to specify the margin at the top of the page.
property UseAjax (line 1166)
If you want to use Ajax with the built-in engine, you need to use ajaxCall and set this property to true, to inform the page that must process any ajax requests. If set to false, ajax calls won't be processed.
property UseAjaxDebug (line 1181)
When set to true, ajax calls will make a popup window to be shown with information about all ajax requests. UseAjax must also be set to true.
property UseAjaxUri (line 1187)
property Visible (line 1076)
property EndForm (line 1366)
This property, depending on the settings of IsForm and ShowFooter will dump the ending form tag.
property FormEncoding (line 1061)
Every Page component generates a Form (unless IsForm is false) to allow process events, you can modify this property to set the encoding to a different value.
This is useful, for example, to allow you upload data to the server
property StartForm (line 1319)
This property, depending on the settings of IsForm and ShowHeader properties returns the opening form tag, it also checks for Action property to know if it must point the action for the form to the script itself or to another place.
It also dumps code to process page events like OnSubmit and OnReset and sets the form enconding according to the FormEncoding property.-
property ControlCount
property Layout
property Cursor
property Height
property Hint
property HintAttribute
property Layer
property Left
property Top
property Width
property AdjustToLayout
property Align
property Alignment
property Attributes
property Autosize
property Caption
property Color
property ControlStyle
property DesignColor
property DivWrap
property DoParentReset
property Enabled
property Font
property Hidden
property IsLayer
property JsEvents
property JSWrapperHiddenFieldName
property Parent
property ParentColor
property ParentFont
property ParentShowHint
property PopupMenu
property ShowHint
property Style
property StyleClass
property Visible
property Name
property Tag
property ComponentCount
property Components
property ControlState
property DataFieldValue
property NamePath
property Owner
property NamePath
| __construct | [Overrides CustomPage::__construct()] |
| dumpChildren | Dumps all children iterating through the Controls property and calls the show method of each one. [Overrides FocusControl::dumpChildren()] |
| dumpChildrenFormItems | This method is called by the page just after dumping the starting form tag. [Overrides Component::dumpChildrenFormItems()] |
| dumpContents | Dumps the control contents. [Overrides Control::dumpContents()] |
| dumpFrames | Dump the page using frames, it's called when the Page contain Frame or Frameset components |
| dumpHeaderJavascript | This method is used internally by the Page component to dump all javascript must be located at the header. |
| dumpJsEvents | Dumps all assigned javascript events code. [Overrides Control::dumpJsEvents()] |
| dumpUsingTemplate | Dump the page using a template, it doesn't generate an HTML page. |
| loaded | [Overrides Control::loaded()] |
| processAjax | This method is called to setup the Ajax functionality when dumping Page code |
Defined in class CustomPage |
||
![]() | serialize | Stores this object into the session. |
Defined in class FocusControl |
||
![]() | dumpChildren | Dumps all children iterating through the Controls property and calls the show method of each one. |
![]() | updateChildrenColors | Updates the colors for all the children if parentcolor is set. |
![]() | updateChildrenFonts | If this control has any children that have ParentFont==true, then this function will assign the same Font property to all children Font properties. |
![]() | updateChildrenParentProperties | Updates all necessary properties for any children that use property values from their parent. |
![]() | updateChildrenShowHints | Updates the ShowHints properties for all children controls. |
Defined in class Control |
||
![]() | canShow | Determines whether a control can be shown or not. |
![]() | dumpChildren | Dumps all children components. |
![]() | dumpContents | Dumps the control contents. |
![]() | dumpHeaderCode | Dumps the component header code. |
![]() | dumpJavascript | Dumps all required javascript code for the component. |
![]() | dumpJsEvents | Dumps all assigned javascript events code. |
![]() | endCache | |
![]() | init | Initializes a component |
![]() | loaded | Initializes the component after the form file has been read into memory. |
![]() | updateParentColor | If ParentColor == true the parent's color is assigned to this control. |
![]() | updateParentFont | If ParentFont == true the parent's font is assigned to this control. |
![]() | updateParentProperties | Updates all properties that use the parent property as source. |
![]() | updateParentShowHint | If ParentShowHint == true the parent's showhint is assigned to this control. |
Defined in class Component |
||
![]() | dumpChildrenJavascript | Dumps the javascript code for all the children |
![]() | dumpFormItems | Dumps code just after the form tag, useful to dump hidden fields for state retrieving for non visible components |
![]() | dumpHeaderCode | Dumps header code required |
![]() | dumpJavascript | Dumps the javascript code needed by this component |
![]() | hasValidDataField | Returns true if a valid data field is attached to the component |
![]() | init | Initializes a component |
![]() | loaded | Initializes the component after the form file has been read into memory. |
![]() | loadedChildren | Calls childrens loaded |
![]() | preinit | Method called before init() |
![]() | serializeChildren | Serializes all children |
![]() | unserializeChildren | Unserializes all children by calling unserialize for all the components |
Defined in class Persistent |
||
![]() | serialize | Stores this object into the session. |
![]() | unserialize | This method uses PHP reflection to iterate through published properties (the ones starting with get) and retrieve the properties stored by a previous serialize() call. |
Defined in class Object |
||
![]() | __construct | Constructs an object and initializes its data before the object is first used. |
![]() | className | Returns a string indicating the type of the object instance (as opposed to the type of the variable passed as an argument). |
![]() | classParent | Returns the type of the immediate ancestor of a class. |
Constructor __construct (line 1247)
Overrides : CustomPage::__construct() parent method not documented
Method dumpChildren (line 1771)
Overrides : FocusControl::dumpChildren() Dumps all children iterating through the Controls property and calls the show method of each one.
Method dumpChildrenFormItems (line 1739)
Overrides : Component::dumpChildrenFormItems() This method is called by the page just after dumping the starting form tag.
Method dumpContents (line 1563)
Overrides : Control::dumpContents() Dumps the control contents.
Method dumpFrames (line 1829)
This method is called internally by the Page component when it detects it has Frames or Framesets inside, so the code it generates must be different
Method dumpHeaderJavascript (line 1506)
This method iterates through all components to dump all children javascript inside the header section of the document.
It also dumps common javascript stored in js/common.js and if ajax is enabled for the page with the UseAjax property, it also includes the xajax library.
Method dumpJsEvents (line 1295)
Overrides : Control::dumpJsEvents() Dumps all assigned javascript events code.
Method dumpUsingTemplate (line 1384)
It uses the template and tries to insert components inside it. To make it work you need to assign TemplateEngine and TemplateFilename properties with the right values, check here to know more:
Method processAjax (line 1462)
When generating the page code, if ajax support is enabled, this method dumps the right code to create the xajax object, setup xajax debug support if required and to register the processing function for ajax requests as ajaxProcess(), and finally, processes all the incomming ajax requests
![]() | OnAfterAjaxProcess | Fired just after the routine specified in ajaxcall is about to be called |
![]() | OnAfterShowFooter | Fired after show the footer, which should be the last oportunity for you to |
![]() | OnBeforeAjaxProcess | Fired just before the routine specified in ajaxcall is about to be called |
![]() | OnBeforeShowHeader | Fired before the page is going to render the header, this is useful to add |
![]() | OnCreate | Fired when the page is created and all components have been loaded, this is |
![]() | OnShowHeader | Fired when showing the header, this event is the right place if you want to |
![]() | OnStartBody | Fired just right after dump the <body> tag, so you can add anything you may need |
![]() | OnTemplate | Fired when the template is about to be rendered. |
Defined in class Control |
||
![]() | OnAfterShow | Fires the Event after showing the control. |
![]() | OnBeforeShow | Fires the Event before showing the control. |
![]() | OnShow | Fires the Event at the same moment the control is shown. Some controls can prevent the control from being shown when this event is attached. |
property OnAfterAjaxProcess (line 1446)
Use this event to perform any operation just after the routine specified in ajaxcall is going to be called.
property OnAfterShowFooter (line 1965)
add code to the html document
property OnBeforeAjaxProcess (line 1430)
Use this event to perform any operation just before the routine specified in ajaxcall is going to be called.
property OnBeforeShowHeader (line 1957)
contents on that document location
property OnCreate (line 1991)
the right event to perform initialization stuff, the other event for this is OnBeforeShow
property OnShowHeader (line 1974)
add CSS styles or Javascript scripts to your HTML using code, as the code you dump in this event, will be placed inside the HTML header
property OnStartBody (line 1982)
there
property OnTemplate (line 1414)
This event is only fired if TemplateEngine and TemplateFilename are correctly set and it provides you with an opportunity to access to the internal template object, check here:
property OnAfterShow
property OnBeforeShow
property OnShow
![]() | OnLoad | The javascript OnLoad event is called after all nested framesets and frames are finished with loading their content. |
![]() | OnReset | Fired when the page is going to be reset using a reset input button |
![]() | OnSubmit | Fired when the page is going to be submitted to the form, return false |
![]() | OnUnload | The javascript OnUnload event is called after all nested framesets and frames are finished with unloading their content. |
Defined in class Control |
||
![]() | OnActivate | Fires when the object is set as the active element. |
![]() | OnBeforeCopy | Fires on the source object before the selection is copied to the system clipboard. |
![]() | OnBeforeCut | Fires on the source object before the selection is deleted from the document. |
![]() | OnBeforeDeactivate | Fires immediately before the activeElement is changed from the current object to another object in the parent document. |
![]() | OnBeforeEditfocus | Fires before an object contained in an editable element enters a UI-activated state or when an editable container object is control selected. |
![]() | OnBeforePaste | Fires on the target object before the selection is pasted from the system clipboard to the document. |
![]() | OnBlur | Fires when the object loses the input focus. |
![]() | OnChange | Fires when the contents of the object or selection have changed. |
![]() | OnClick | Fires when the user clicks the left mouse button on the object. |
![]() | OnContextMenu | Fires when the user clicks the right mouse button in the client area, opening the context menu. |
![]() | OnControlSelect | Fires when the user is about to make a control selection of the object. |
![]() | OnCopy | Fires on the source element when the user copies the object or selection, adding it to the system clipboard. |
![]() | OnCut | Fires on the source element when the object or selection is removed from the document and added to the system clipboard. |
![]() | OnDblClick | Fires when the user double-clicks the object. |
![]() | OnDeActivate | Fires when the activeElement is changed from the current object to another object in the parent document. |
![]() | OnDrag | Fires on the source object continuously during a drag operation. |
![]() | OnDragEnter | Fires on the target element when the user drags the object to a valid drop target. |
![]() | OnDragLeave | Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation. |
![]() | OnDragOver | Fires on the target element continuously while the user drags the object over a valid drop target. |
![]() | OnDragStart | Fires on the source object when the user starts to drag a text selection or selected object. |
![]() | OnDrop | Fires on the target object when the mouse button is released during a drag-and-drop operation. |
![]() | OnFilterChange | Fires when a visual filter changes state or completes a transition. |
![]() | OnFocus | Fires when the object receives focus. |
![]() | OnHelp | Fires when the user presses the F1 key while the browser is the active window. |
![]() | OnKeyDown | Fires when the user presses a key. |
![]() | OnKeyPress | Fires when the user presses an alphanumeric key. |
![]() | OnKeyUp | Fires when the user releases a key. |
![]() | OnLoseCapture | Fires when the object loses the mouse capture. |
![]() | OnMouseDown | Fires when the user clicks the object with either mouse button. |
![]() | OnMouseEnter | Fires when the user moves the mouse pointer into the object. |
![]() | OnMouseLeave | Fires when the user moves the mouse pointer outside the boundaries of the object. |
![]() | OnMouseMove | Fires when the user moves the mouse over the object. |
![]() | OnMouseOut | Fires when the user moves the mouse pointer outside the boundaries of the object. |
![]() | OnMouseOver | Fires when the user moves the mouse pointer into the object. |
![]() | OnMouseUp | Fires when the user releases a mouse button while the mouse is over the object. |
![]() | OnPaste | Fires on the target object when the user pastes data, transferring the data from the system clipboard to the document. |
![]() | OnPropertyChange | Fires when a property changes on the object. |
![]() | OnReadyStateChange | Fires when the state of the object has changed. |
![]() | OnResize | Fires when the size of the object is about to change. |
![]() | OnResizeEnd | Fires when the user finishes changing the dimensions of the object in a control selection. |
![]() | OnResizeStart | Fires when the user begins to change the dimensions of the object in a control selection |
![]() | OnSelectStart | Fires when the object is being selected |
property OnLoad (line 932)
property OnReset (line 1283)
property OnSubmit (line 1274)
to prevent the form from being posted
property OnUnload (line 941)
property OnActivate
property OnBeforeCopy
property OnBeforeCut
property OnBeforeDeactivate
property OnBeforeEditfocus
property OnBeforePaste
property OnBlur
property OnChange
property OnClick
property OnContextMenu
property OnControlSelect
property OnCopy
property OnCut
property OnDblClick
property OnDeActivate
property OnDrag
property OnDragEnter
property OnDragLeave
property OnDragOver
property OnDragStart
property OnDrop
property OnFilterChange
property OnFocus
property OnHelp
property OnKeyDown
property OnKeyPress
property OnLoseCapture
property OnMouseDown
property OnMouseEnter
property OnMouseLeave
property OnMouseMove
property OnMouseOut
property OnMouseOver
property OnMouseUp
property OnPaste
property OnPropertyChange
property OnReadyStateChange
property OnResize
property OnResizeEnd
property OnResizeStart
property OnSelectStart