Copyright: Copyright © 2001-2005 Developer Express Inc.


cxWebClasses Unit Overview
cxWebClasses Unit

Classes

TBasecxWebStyle

TcxCustomEventItem

TcxCustomEvents

TcxInternalWebStyle

TcxWebActionsHelper

TcxWebBorder

TcxWebBorders

TcxWebComponent

TcxWebComponentRenderer

TcxWebEventsHelper

TcxWebHelper

TcxWebNumbering

TcxWebRenderHelper

TcxWebScriptsHelper

TcxWebShading

TcxWebStyle

TcxWebStyleController

TcxWebStyleItem

TcxWebStyleObject

TcxWebStyles

TcxWebValuesHelper

Interfaces

IcxWebGetStyles

IcxWebStyleChanged

Other Types

TcxWebBorderAssignedValue

TcxWebBorderAssignedValues

TcxWebBorderStyle

TcxWebBorderWidth

TcxWebNumberingAssignedValue

TcxWebNumberingAssignedValues

TcxWebNumberingPosition

TcxWebNumberingStyle

TcxWebShadingAssignedValue

TcxWebShadingAssignedValues

Routines

cxWebGetWidthValues

cxWebIdentToWidth

cxWebWidthToCursor

cxWebWidthToIdent

cxWebWidthToString


TBasecxWebStyle
TBasecxWebStyle Object

Hierarchy          Properties          Methods

Represents the base for the TcxWebStyle class.

Unit

cxWebClasses

TBasecxWebStyle = class(TPersistent)

Description

This class contains basic properties and methods used to specify and manage the style of a web component.  It serves as a parent for the TcxWebStyle class.  The TcxWebStyle class in turn represents a single style within the TcxWebStyleController component.

The TBasecxWebStyle class allows you to set the border style, font properties, background color and numbering style (for lists) of a component.  It generates HTML code based on the values of these properties.  This HTML code is written into the STYLE tag if any of the components in the page uses a style.  The tag representing the component uses the style name to set the value of its CLASS attribute.

Assume there is a TcxWebStyleController component containing a TcxWebStyle class instance (named ‘cxWebStyleController1Item1’).  Further assume that this style is assigned to the TcxWebLabel component (named ‘cxWebLabel1’).  Then the source of the HTML page containing the label will look something like:

...

<STYLE>

<!--

.cxWebStyleController1Item1  { background-color: #B0E0E6; border-left-color: #FF6347; border-left-width: thick; border-top-color: #FF6347; border-top-width: thick; border-right-color: #FF6347; border-right-width: thick; border-bottom-color: #FF6347; border-bottom-width: thick; color:activecaption; font-family:"MS Sans Serif";font-size:10pt;}

//-->

</STYLE>

...

<DIV name="cxWebLabel1" id="cxWebLabel1" class="cxWebStyleController1Item1" align="left" style="height:16px; width:87px; overflow:hidden">cxWebLabel1</DIV>

...


TBasecxWebStyle Hierarchy
Hierarchy

TPersistent


Properties for TBasecxWebStyle
TBasecxWebStyle Properties

TBasecxWebStyle          Legend

In TBasecxWebStyle

Borders

Font

Numbering

Shading


Methods for TBasecxWebStyle
TBasecxWebStyle Methods

TBasecxWebStyle          Legend

In TBasecxWebStyle

Assign

BeginUpdate

Create

Destroy

EndUpdate

RestoreDefaults

WriteHTML


TBasecxWebStyle.Borders

TBasecxWebStyle          See Also

Specifies the border style of a component.

property Borders: TcxWebBorders;

Description

Use this property to apply a border to a component.  This property is represented by the TcxWebBorders class.  This class provides a number of properties that allow you to set the style of all edges at once or modify the style of each edge separately.  Edge style is represented by the width, style and color of the line.

The following sample code applies a border to the TcxWebButton component.

// Delphi

var

  AStyleItem: TcxWebStyleItem;

  AStyle: TcxWebStyle;

  ABorderStyle: TcxWebBorder;

//...

AStyleItem := cxWebStyleController1.Add;

AStyleItem.Name := 'NewButtonStyle';

AStyle := AStyleItem.Style;

with AStyle.Borders do

begin

  Color := clWebPurple;

  Style := wbsSolid;

  Width := 1;

end;

cxWebButton1.Styles.Default := AStyleItem;

The image below displays the TcxWebButton component before and after code execution.

The following HTML code is generated to set the NewButtonStyle style.  The portion of code related to border style is highlighted.  This code is generated by the WriteHTML method of the TcxWebBorders class.

<STYLE>

<!--

.NewButtonStyle  {border-left-color: #800080; border-left-style: solid; border-left-width: 1; border-top-color: #800080; border-top-style: solid; border-top-width: 1; border-right-color: #800080; border-right-style: solid; border-right-width: 1; border-bottom-color: #800080; border-bottom-style: solid; border-bottom-width: 1; color:windowtext; font-family:"MS Sans Serif"; font-size:10pt;}

//-->

</STYLE>


TBasecxWebStyle.Font

TBasecxWebStyle          See Also

Specifies the font used to display text within a component.

property Font: TcxWebFont;

Description

Use this property to specify the characteristics of the font used to display text within a component.  This property is represented by the TcxWebFont class.  The properties of this class allow you to change font size, typeface, style, color etc.

The following sample code changes font characteristics used to display button caption.

// Delphi

var

  AStyleItem: TcxWebStyleItem;

  AStyle: TcxWebStyle;

  ABorderStyle: TcxWebBorder;

//...

AStyleItem := cxWebStyleController1.Add;

AStyleItem.Name := 'NewButtonStyle';

AStyle := AStyleItem.Style;

with AStyle.Font do

begin

  Size.Value := 14;

  Names.Clear;

  Names.Add('Comic Sans');

  Underline := True;

end;

cxWebButton1.Styles.Default := AStyleItem;

The image below displays the TcxWebButton component before and after code execution.

The following HTML code is generated to set the NewButtonStyle style.  The portion of the code related to the font style is highlighted.  This portion is generated by the WriteHTML method of the TcxWebFont class.

<STYLE>

<!--

.NewButtonStyle {color:windowtext; font-family:"Comic Sans"; font-size:14pt; text-decoration: underline;}

//-->

</STYLE>


TBasecxWebStyle.WriteHTML

TBasecxWebStyle          See Also

Writes HTML code representing the style defined by the properties of the TBasecxWebStyle object (or descendants).

procedure WriteHTML(HTMLTextBuilder: TcxHTMLTextBuilder);

Description

The TBasecxWebStyle class generates HTML code based on its property values.  This code is constructed of the parts generated by its Borders, Font, Numbering and Shading properties.  These properties are represented by the TcxWebBorders, TcxWebFont, TcxWebNumbering and TcxWebShading objects respectively.  Each of these objects generates its own HTML code, which specifies corresponding style characteristics.  The generated code is written to the inner buffer of the object specified by the HTMLTextBuilder parameter.  This is performed via the TcxHTMLTextBuilder class methods.

ReadOnly Property


TBasecxWebStyle.Numbering

TBasecxWebStyle          See Also

Specifies the numbering style for lists.

property Numbering: TcxWebNumbering;

Description

Use this property to specify the numbering style for lists.  This property is represented by the TcxWebNumbering class.  This class contains properties that allow you to set the manner in which list items are numerated, bullet glyph and position.

The following sample code changes the manner in which the list is displayed.  The TcxWebCustomControl component is used to represent a list.

<ol>

  <li>First Item</li>

  <li>Second Item</li>

</ol>

// Delphi

var

  AStyleItem: TcxWebStyleItem;

  AStyle: TcxWebStyle;

  ABorderStyle: TcxWebBorder;

//...

AStyleItem := cxWebStyleController1.Add;

AStyleItem.Name := 'NewListStyle';

AStyle := AStyleItem.Style;

AStyle.Numbering.Style := wnsLowerRoman;

cxWebCustomControl1.Styles.Default := AStyleItem;

The image below shows the TcxWebCustomControl component before and after code execution.

The following HTML code is generated via the WriteHTML method to set the NewListStyle style.  The portion of the code related to the numbering style is highlighted.  This portion is generated by the WriteHTML method of the TcxWebNumbering class.

<STYLE>

<!--

.NewListStyle {color:windowtext; font-family:"MS Sans Serif"; font-size:10pt; list-style-type: lower-roman}

//-->

</STYLE>


TBasecxWebStyle.Shading

TBasecxWebStyle          See Also

Specifies the background color of a component.

property Shading: TcxWebShading;

Description

Use this property to specify the background color of a component.  This property is represented by the TcxWebShading class.  The Color property of this class sets the background color.

The following sample code changes the background color of the TcxWebButton component.

// Delphi

var

  AStyleItem: TcxWebStyleItem;

  AStyle: TcxWebStyle;

  ABorderStyle: TcxWebBorder;

//...

AStyleItem := cxWebStyleController1.Add;

AStyleItem.Name := 'NewShadingStyle';

AStyle := AStyleItem.Style;

AStyle.Shading.Color := clWebPeachPuff;

CxWebButton1.Styles.Default := AStyleItem;

The image below displays the TcxWebButton component before and after code execution:

The following HTML code is generated via the WriteHTML methjod to set the NewShadingStyle style.  The portion of the code related to the background style is highlighted.  This portion is generated by the WriteHTML method of the TcxWebShading class.

<STYLE>

<!--

.NewListStyle {background-color: #FFDAB9; color:windowtext; font-family:"MS Sans Serif"; font-size:10pt;}

//-->

</STYLE>


TBasecxWebStyle.Assign

TBasecxWebStyle

Assigns the contents of one object to another.

procedure Assign(Source: TPersistent); override;

Description

This method copies property values of one TBasecxWebStyle (or its descendant) to another.  The object passed as a parameter serves as the source while the object whose Assign method is called serves as a destination object.  Use this method instead of direct assignment.

This method is useful when it is necessary to create a new style that slightly differs from an existing one.  For instance, you may wish to use the same background and font settings but change border settings.  Use the Assign method in order not to set the Shading and Font properties values once again.

The following sample code creates a new style and assigns it to the TcxWebButton component.  Then it applies a similar style with border style changed to another TcxWebButton control.

// Delphi

var

  AStyleItem1, AStyleItem2: TcxWebStyleItem;

  AStyle1, AStyle2: TcxWebStyle;

  ABorderStyle: TcxWebBorder;

//...

AStyleItem1 := cxWebStyleController1.Add;

AStyleItem1.Name := 'FirstStyle';

AStyle1 := AStyleItem1.Style;

AStyle1.Shading.Color := clWebPeachPuff;

AStyle1.Font.Color := clWebPeru;

AStyleItem2 := cxWebStyleController1.Add;

AStyleItem2.Name := 'SecondStyle';

AStyle2 := AStyleItem2.Style;

AStyle2.Assign(AStyle1);

AStyle2.Borders.Color := clWebPeru;

cxWebButton1.Styles.Default := AStyleItem1;

cxWebButton2.Styles.Default := AStyleItem2;

The image below shows the result of code execution:


TBasecxWebStyle.BeginUpdate

TBasecxWebStyle          See Also

Forces the TBasecxWebStyle object not to respond to property value changes.

procedure BeginUpdate;

Description

The BeginUpdate method is used to prevent controls from responding to style changes.  This feature is used to prevent multiple redraws of the control when setting several style properties consecutively at design time.  After the desired changes are made, you should call the EndUpdate method to force the control to respond to the changes made.  Note that each BeginUpdate method call increments the internal counter by one.  The initial value of this counter is 0.  Each EndUpdate method call decrements it.  A control can be redrawn only when the internal counter is 0.

These methods are used, for instance, when calling the Assign method.  This method results in consecutive changes to the Borders, Font, Numbering and Shading properties.  Using the BeginUpdate and EndUpdate methods allows redrawing the associated design time controls only once.


TBasecxWebStyle.Create

TBasecxWebStyle          See Also

Creates an instance of the TBasecxWebStyle class with default settings.

constructor Create;

Description

This method is used to create a TBasecxWebStyle instance and initialize its properties with default values.  The property values are initialized using the RestoreDefaults method call.


TBasecxWebStyle.Destroy

TBasecxWebStyle          See Also

Destroys a TBasecxWebStyle class instance.

destructor Destroy; override;

Description

Use this method to destroy an instance of the TBasecxWebStyle class.  This method frees the memory occupied by the Borders, Font, Numbering and Shading properties.


TBasecxWebStyle.EndUpdate

TBasecxWebStyle          See Also

Forces the TBasecxWebStyle object to respond to property value changes.

procedure EndUpdate;

Description

Call the BeginUpdate method to prevent control response to style changes.  This feature is used to prevent multiple redraws of a control when setting several style properties consecutively at design time.  After the desired changes are made, you should call the EndUpdate method to force the control to respond to the changes made.  Note that each BeginUpdate method call increments the internal counter by one.  The initial value of this counter is 0.  Each EndUpdate method call decrements it.  A control can be redrawn only when the internal counter is 0.

These methods are used, for instance, when calling the Assign method.  This method results in consecutive changes to the Borders, Font, Numbering and Shading properties.  Using the BeginUpdate and EndUpdate methods allows redrawing the associated design time controls only once.


TBasecxWebStyle.RestoreDefaults

TBasecxWebStyle

Sets the properties of the TBasecxWebStyle object to default values.

procedure RestoreDefaults;

Description

Call the RestoreDefaults method to set the properties of the TBasecxWebStyle object to default values.  This allows you to apply the default style to a component. The RestoreDefaults method is also called in the constructor to set initial values for TBasecxWebStyle properties.

Implementation of this method is as simple as calling the RestoreDefaults methods of the TcxWebBorders, TcxWebFont, TcxWebNumbering and TcxWebShading objects representing the Borders, Font, Numbering and Shading properties respectively.


TcxCustomEventItem
TcxCustomEventItem Object

Hierarchy          Properties          Methods

Provides the ability to handle custom events for a component.

Unit

cxWebClasses

TcxCustomEventItem = class(TCollectionItem)

Description

The ExpressWeb Framework library gives you the ability to handle custom events.  The list of events that can be handled in such a manner, is specified by the TcxWebComponentEvent type.

The way in which custom events are handled is as follows.  Each web control has a CustomEvents property.  This property is of type TcxCustomEvents and represents a collection of TcxCustomEventItem item types.  Each item contains the properties that specify the type of event and its handler written in JavaScript.  These properties are EventType and HandlerText accordingly.


TcxCustomEventItem Hierarchy
Hierarchy

TCollectionItem


Properties for TcxCustomEventItem
TcxCustomEventItem Properties

TcxCustomEventItem          Legend

In TcxCustomEventItem

EventType

HandlerText

EventProcType


Methods for TcxCustomEventItem
TcxCustomEventItem Methods

TcxCustomEventItem          Legend

In TcxCustomEventItem

Create

Destroy

EventProc


TcxCustomEventItem.EventProcType

TcxCustomEventItem          See Also

Specifies whether the assigned event handler is rendered within a tag or as a separate JScript function.

TcxWebComponentEventProcType = (etSingleLine, etProcedure);

property EventProcType: TcxWebComponentEventProcType;

Description

The EventType and HandlerText properties allow you to specify a client side event and its handler respectively.  The EventProcType property provides the ability to specify whether the event handler is rendered within a tag or as a separate function.  The following values are available for the EventProcType property:

Value	Description
etSingleLine	The specified event handler is rendered within a tag.
etProcedure	The specified event handler is rendered as a separate JScript function.


TcxCustomEventItem.EventType

TcxCustomEventItem          See Also

Specifies the index of the client side event to be handled by a control.

property EventType: Integer;

Description

Each web control can handle custom client side events.  Use the EventType property to specify the index of the event to be handled by a control.  The code of the handler, written in JavaScript, is specified by the HandlerText property.


TcxCustomEventItem.HandlerText

TcxCustomEventItem          See Also

Specifies the text of an event handler written in JavaScript.

property HandlerText: TStrings;

Description

Each web control can handle custom events.  Use the EventType property to specify the event to be handled by a control.  The handler’s code - written in JavaScript - is specified by the HandlerText property.

The following sample code demonstrates how to add a custom event handler to the TcxWebLabel control.  After code execution, a message box will be displayed when a user clicks the label.

// Delphi

var NewEvent: TcxCustomEventItem;

//...

NewEvent := cxWebLabel1.CustomEvents.Add;

NewEvent.EventType := ceClick;

NewEvent.HandlerText.Add('alert("cxWebLabel1 is clicked!")');


TcxCustomEventItem.Create

TcxCustomEventItem          See Also

Creates a TcxCustomEventItem class instance.

constructor Create(Collection: TCollection); override;

Description

This constructor is used to create an instance of the TcxCustomEventItem class.  The Collection parameter specifies the TcxCustomEvents object to which the created class instance will belong.


TcxCustomEventItem.Destroy

TcxCustomEventItem          See Also

Destroys a TcxCustomEventItem class instance.

destructor Destroy; override;

Description

This destructor is used to destroy an instance of the TcxCustomEventItem class.  It frees all related resources.


TcxCustomEventItem.EventProc

TcxCustomEventItem

Assigns the event handler’s text to a string variable passed as a parameter.

procedure EventProc(var AScript: string);

Description

Each web control can handle custom events.  Use the EventType and HandlerText properties in order to specify the event and text of its handler.  The EventProc method can be used to retrieve the event handler’s text.  The text is written to the AScript parameter.


TcxCustomEvents
TcxCustomEvents Object

Hierarchy          Properties          Methods

Represents a collection of custom event handlers used by a component.

Unit

cxWebClasses

TcxCustomEvents = class(TCollection)

Description

Each web control can handle custom events.  The collection of custom event handlers can be accessed via the CustomEvents property of a control.  This property is of type TcxCustomEvents.  It stores items represented by the TcxCustomEventItem class.  The TcxCustomEventItem class contains EventType and HandlerText properties that specify the event and the text of its handler accordingly.

Custom events are events processed on the client side of an application and written in JScript.  Except for manually specified events, EWF generates certain client side events required for proper control functionality.

The following client side events can be rendered for a control:

- the MouseOver and MouseOut events if the control has a predefined hover style;

- the OnFocus and OnBlur events, if the control can receive focus;

- any event that should force a post back to handle the corresponding server-side event.


TcxCustomEvents Hierarchy
Hierarchy

TCollection


Properties for TcxCustomEvents
TcxCustomEvents Properties

TcxCustomEvents          Legend

In TcxCustomEvents

EventsHelper

Items


Methods for TcxCustomEvents
TcxCustomEvents Methods

TcxCustomEvents          Legend

In TcxCustomEvents

Add

Create

GetOwner


TcxCustomEvents.EventsHelper

TcxCustomEvents

Returns a reference to the helper object intended for managing the registration of client side events.

property EventsHelper: TcxWebEventsHelper;

Description

Each component should register client side events before the HTML code is rendered for a page.  This is done in order to store all event handlers in a single collection to simplify the rendering process.  These event handlers are not initially stored within a single collection due to their different sources.  One of these sources is the CustomEvents property of a component.  Other client events also exist - the ones that manage hover style implementation and force form submitting.

The TcxWebEventsHelper class implements the IcxWebEvents interface declaring the methods that manage event registration.

ReadOnly Property


TcxCustomEvents.Items

TcxCustomEvents          See Also

Represents a collection of items, which contain information about the event type and the text of its handler.

property Items[Index:Integer]: TcxCustomEventItem;

Description

Each web control can handle custom events.  In order to implement this feature, you should use the CustomEvents property of a control.  This property is of type TcxCustomEvents.  It stores a collection of items for TcxCustomEventItem.  This collection can be accessed via the Items property.  Each item within the collection has an EventType and HandlerText properties which specify the event to be handled and the text of the handler written in JScript.


TcxCustomEvents.Add

TcxCustomEvents          See Also

Adds an item to the custom events collection.

function Add: TcxCustomEventItem;

Description

Use this method to add a custom event handler to your component.  This method creates a TcxCustomEventItem object and returns a reference to it.  Adjust the properties of the obtained object in order to set event type and the text of its handler.

Note: EWF allows you to add several event handlers of the same type.  In such an instance, the handlers will be combined into a single function, which will be called when the event fires.


TcxCustomEvents.Create

TcxCustomEvents

Creates a TcxCustomEvents class instance.

constructor Create(AEventsHelper: TcxWebEventsHelper);

Description

Do not use this method in applications.  An instance of the TcxCustomEvents class is created within the TcxWebEventsHelper class constructor.  This instance represents the CustomEvents property of your component.


TcxCustomEvents.GetOwner

TcxCustomEvents

Returns the component owning the TcxCustomEvents object.

function GetOwner: TPersistent; override;

Description

This method is used internally in order to retrieve the component, whose CustomEvents property is represented by the TcxCustomEvents object.  This method returns the Component property of the corresponding TcxWebEventsHelper object.


TcxInternalWebStyle
TcxInternalWebStyle Object

Hierarchy          Methods

Represents the base class for the classes specifying predefined styles of a control class.

Unit

cxWebClasses

TcxInternalWebStyle = class(TObject)

Description

Some of the controls render code for certain predefined styles, which are applied to their constituent parts.  For instance, a grid control applies predefined styles to the group panel and its grouping nodes.  In order to implement rendering for these styles, the corresponding classes are declared.  These classes are descendants of the TcxInternalWebStyle class.  They override the GetName and WriteStyle class methods to return the appropriate style name and render the HTML code implementing it.

In order to implement predefined control styles, you should declare a descendant of the TcxWebInternalStyle class and implement its GetName and WriteStyle class methods as required.  Call these methods when rendering a component.


TcxInternalWebStyle Hierarchy
Hierarchy

TObject


Methods for TcxInternalWebStyle
TcxInternalWebStyle Methods

TcxInternalWebStyle          Legend

In TcxInternalWebStyle

GetName

WriteStyle


TcxInternalWebStyle.GetName

TcxInternalWebStyle          See Also

Returns the style name when implemented by a descendant class.

class function GetName: string; virtual; abstract;

Description

Please review the TcxInternalWebStyle class description for information on predefined styles implementation.

This method should be overridden to return the predefined style name.  This value is used to specify the style and set the CLASS attribute of the corresponding HTML element.  Note that if the style name is an empty string, it is assigned to all HTML elements which don’t have another style assigned.

Let’s consider an example of the HTML code generated to represent the first button of the DBNavigator control.  The value returned by the GetName method of the corresponding TcxInternalWebStyle descendant is highlighted.

<DIV style="height:26; width:26;"

     class="DNBtnStyle"

     onclick='OnNBFirstClick("cxWebDBDataNavigator1")' align=CENTER>

<TABLE height=26px width=26px cellspacing=0px cellpadding=0px border=0px><TD align=center valign=center><IMG id="cxWebDBDataNavigator1_NBFirst_" src="/ExpressWeb Framework/Images/nbFirst.gif"  align="AbsMiddle" border=0px />

</TD></TABLE></DIV>

<STYLE>

<!--

.DNBtnStyle { border-width:1; border-style:solid; border-top-color:white; border-left-color:white; border-right-color:black; border-bottom-color:black; background-color: #D4D0C8;  }

//-->

</STYLE>


TcxInternalWebStyle.WriteStyle

TcxInternalWebStyle          See Also

Returns the HTML code implementation of a style when implemented by a descendant class.

class procedure WriteStyle(HTMLTextBuilder: TcxHTMLTextBuilder); virtual; abstract;

Description

Please review the TcxInternalWebStyle class description for information on predefined styles implementation.

This method should be overridden in order to write the HTML code implementation of the predefined style.  The code should be written to the internal buffer of the object specified by the HTMLTextBuilder parameter.  The methods of the TcxHTMLTextBuilder class should be used for this purpose.

Let’s consider an example of the HTML code generated to represent the first button of the TcxWebDBDataNavigator control.  The code written by the WriteStyle method of the corresponding TcxInternalWebStyle descendant is highlighted.

<DIV style="height:26; width:26;"

     class="DNBtnStyle"

     onclick='OnNBFirstClick("cxWebDBDataNavigator1")' align=CENTER>

<TABLE height=26px width=26px cellspacing=0px cellpadding=0px border=0px><TD align=center valign=center><IMG id="cxWebDBDataNavigator1_NBFirst_" src="/ExpressWeb Framework/Images/nbFirst.gif"  align="AbsMiddle" border=0px />

</TD></TABLE></DIV>

<STYLE>

<!--

.DNBtnStyle { border-width:1; border-style:solid; border-top-color:white; border-left-color:white; border-right-color:black; border-bottom-color:black; background-color: #D4D0C8;  }

//-->

</STYLE>


TcxWebActionsHelper
TcxWebActionsHelper Object

Hierarchy          Properties          Methods          See Also

Manages server side event registration and execution. (Partially implements the IcxWebActions interface).

Unit

cxWebClasses

TcxWebActionsHelper = class(TcxWebHelper)

Description

Once a server side event needs to be executed, the __ACTIONNAME and __TARGETNAME hidden inputs are populated with the name of the fired event and the control name.  Then the form is submitted.  Thus it is necessary to have a list of event names and corresponding handlers for each component on the form.  Such a list can be created using ‘actions registration’.

The RegisterActions method is called by the owning page module (the TcxWebPageModule class) before handling actions.  This method implements the RegisterActions method of the IcxWebActions interface.  The purpose of this method is to call the RegisterAction method of the TcxWebActionsHelper object (the WebActionsHelper property) for every possible server side event that can be handled by the component.  This method adds the event name and the corresponding handler (transmitted to it as parameters) to the corresponding list mentioned earlier.

The server script finds the component by the value of the __TARGETNAME hidden input and calls the DoPerformAction method of its actions helper.  This method implements the DoPerformAction method of the IcxWebActions interface.  The __ACTIONNAME input is transmitted to it.  This method searches for the corresponding handler within the mentioned list and runs it.

After the action handling is completed, the ClearActions method is called to clear the list.

Note: Each component registers an event whose name is an empty string.  This is done to avoid errors in case  __ACTIONNAME contains an empty string for some reason.  It is recommended to assign handlers for such events when you create descendant EWF components.


TcxWebActionsHelper Hierarchy
Hierarchy

TObject

     |

TcxWebHelper


Properties for TcxWebActionsHelper
TcxWebActionsHelper Properties

TcxWebActionsHelper          Legend

Derived from TcxWebHelper

Component


Methods for TcxWebActionsHelper
TcxWebActionsHelper Methods

TcxWebActionsHelper          Legend

In TcxWebActionsHelper

ClearActions

Create

Destroy

DoPerformAction

RegisterAction


TcxWebActionsHelper.ClearActions

TcxWebActionsHelper          See Also

Clears the list of registered event names and corresponding handlers.

procedure ClearActions;

Description

Do not use this method in applications.  This method is used to clear the internal list of event names and their handlers before the TcxWebActionsHelper object is disposed.  This is done to dispose all the handlers, which it owns.

This method implements the ClearActions method of the IcxWebActions interface.


TcxWebActionsHelper.Create

TcxWebActionsHelper          See Also

Creates a TcxWebActionsHelper class instance.

constructor Create(AComponent: TComponent); override;

Description

The Create method is used to create a new TcxWebActionsHelper object.  The AOwner parameter specifies the component owning the newly created object. Do not use this method in applications. The TcxWebActionsHelper object is automatically created when the owning component tries to access it.


TcxWebActionsHelper.Destroy

TcxWebActionsHelper          See Also

Destroys a TcxWebActionsHelper class instance.

destructor Destroy; override;

Description

The Destroy method is used to dispose the TcxWebActionsHelper object and free allocated memory.  Do not use this method in applications.  The TcxWebActionsHelper object is automatically disposed by the owning component.


TcxWebActionsHelper.DoPerformAction

TcxWebActionsHelper          See Also

Runs the server side event handler.

procedure DoPerformAction(const ActionName: string; const ActionParameters: TcxActionParameters);

Description

This method is called within the ProcessActions method of the TcxCustomWebPageModule class.  The ActionName and ActionParameters parameters are extracted from the __ACTIONNAME and __SHIFTSTATE hidden inputs.

The DoPerformAction method finds the event handler by its name (the ActionName parameter) and runs it.  The OnBeforeProcessAction and OnAfterProcessAction event handlers are called right before and after event firing.

This method implements the DoPerformAction method of the IcxWebActions interface.


TcxWebActionsHelper.RegisterAction

TcxWebActionsHelper          See Also

Adds the events name and corresponding handler to the internal collection.

procedure RegisterAction(const ActionName: string; const Action: TcxWebComponentActionProc);

Description

You should use this method when creating EWF descendant controls in order to register the events that can be handled by the component and assign corresponding handlers.  Call this method for every event your control can handle.  It is recommended to register event handlers within the RegisterActions method of the component.  This method is derived from the TcxWebComponent class.

The ActionName parameter specifies the name of the event, which is compared with the __ACTIONNAME hidden input value.  The Action parameter specifies the handler of the event, which will be executed if the compared values coincide.

Let’s consider the implementation of the RegisterActions method of the TcxWebButton control.  Note that the event with an empty string name is registered.  This one specifies the default event handler that is fired in case the value of the __ACTIONNAME is empty for some reason (but the __TARGETNAME isn’t).

procedure TcxWebButton.RegisterActions;

begin

  WebActionsHelper.RegisterAction('', WebClick);

  WebActionsHelper.RegisterAction('CLICK', WebClick);

end;


TcxWebBorder
TcxWebBorder Object

Hierarchy          Properties          Methods          See Also

Represents the control’s border style.

Unit

cxWebClasses

TcxWebBorder = class(TPersistent)

Description

Border style is specified via the properties of the TcxWebBorders class.  The Left, Top, Right and Bottom properties of this class provide access to the styles of the left, top, right and bottom borders.  Each of these properties is represented by the TcxWebBorder class. Its properties allow you to set the color, width and line style of a control’s left, top, right and bottom borders.  You should use the TcxWebStyleController component in order to implement styles (including border style) for a control.  The image below describes how you can access the Left, Top, Right, and Bottom properties of the TcxWebBorders class.


TcxWebBorder Hierarchy
Hierarchy

TPersistent


Properties for TcxWebBorder
TcxWebBorder Properties

TcxWebBorder          Legend

In TcxWebBorder

AssignedValues

Borders

Color

Style

Width


Methods for TcxWebBorder
TcxWebBorder Methods

TcxWebBorder          Legend

In TcxWebBorder

Assign

Create

Changed

RestoreDefaults


TcxWebBorder.AssignedValues

TcxWebBorder          See Also

Contains a set of values that specify which properties contain non-default values.

TcxWebBorderAssignedValue = (wbavColor, wbavStyle, wbavWidth);

TcxWebBorderAssignedValues = set of TcxWebBorderAssignedValue;

property AssignedValues: TcxWebBorderAssignedValues;

Description

The TcxWebBorder class contains Color, Style and Width properties that specify the style of a border.  The AssignedValues property contains a set of values, specified by the TcxWebBorderAssignedValue enumerator that identifies the properties whose values are not default.

This property allows EWF to render as little code as possible.  The HTML code is generated only for the properties, which are identified as assigned.  The AssignedValues property value is also used when assigning the contents of one TcxWebBorder object to another via the Assign method.

Note that when the Color, Style or Width property value is changed from default, the corresponding value is added to the AssignedValues property.  On the other hand, nothing happens when the property gets its default value again.  Thus, you should remove the corresponding value manually in order not to render the code for this property.  The AssignedValues property can also be cleared by the RestoreDefaults method, which sets all properties to their initial values.

The default value of the AssignedValues property is [].


TcxWebBorder.Borders

TcxWebBorder

Returns the TcxWebBorders object, which holds this TcxWebBorder object as its Left, Top, Right or Bottom property.

property Borders: TcxWebBorders;

Description

Use this property to retrieve a reference to the TcxWebBorders object owning this TcxWebBorder class instance.

ReadOnly Property


TcxWebBorder.Color

TcxWebBorder          See Also

Specifies the border color.

property Color: TcxWebColor;

Description

Use this property to get or set the color of the border represented by the TcxWebBorder object.  Once this property value is changed from the default, wbavColor is added to the AssignedValues property.  This means that the HTML code representing this property should be generated.  In order to not render the corresponding HTML code, you should remove the wbavColor value manually or call the RestoreDefaults method.

Let’s explore an example of generated HTML code for a style controller item, which sets the bottom border color of the control to clWebSlateBlue.

<STYLE>

<!--

.cxWebPageModule3_cxWebStyleController1Item2  { border-bottom-color: #6A5ACD; color:windowtext; font-family:"MS Sans Serif"; font-size:10pt;}

//-->

The default value of the Color property is cxclDefaultStyleBorderColor.


TcxWebBorder.Style

TcxWebBorder          See Also

Specifies the border style.

TcxWebBorderStyle = (wbsNone, wbsSolid, wbsDotted, wbsDashed, wbsDouble, wbsGroove, wbsRidge, wbsInset, wbsOutset);

property Style: TcxWebBorderStyle;

Description

Use this property to get or set the border style represented by the TcxWebBorder object.  Once the value of this property is changed from the default, wbavStyle is added to the AssignedValues property.  This means that the HTML code representing this property should be generated.  In order to not render the corresponding HTML code, you should remove the wbavStyle value manually or call the RestoreDefaults method.

Let’s explore an example of the generated HTML code for a style controller item, which sets the bottom border style of the control to wbsDouble.

<STYLE>

<!--

.cxWebPageModule3_cxWebStyleController1Item2  { border-bottom-style: double; color:windowtext; font-family:"MS Sans Serif"; font-size:10pt;}

//-->

</STYLE>

The default value of the Style property is wbsNone.


TcxWebBorder.Width

TcxWebBorder          See Also

Specifies the border width.

TcxWebBorderWidth = 0..32767;

property Width: TcxWebBorderWidth;

Description

Use this property to get or set the border width represented by the TcxWebBorder object.  Once the value of this property is changed from the default, wbavWidth is added to the AssignedValues property.  This means that the HTML code representing this property should be generated.  In order to not render the corresponding HTML code, you should remove the wbavWidth value manually or call the RestoreDefaults method.

Let’s explore an example of the generated HTML code for a style controller item, which sets the bottom border width of the control to medium.

<STYLE>

<!--

.cxWebPageModule3_cxWebStyleController1Item2  { border-bottom-width: medium; color:windowtext; font-family:"MS Sans Serif"; font-size:10pt;}

//-->

</STYLE>

Note: Despite the fact that the Object Inspector allows you to set only thin, medium and thick values, you can set Width to any integer between 0 and 32767 at runtime.  In such instances, the rendered code will contain the numerical representation of the border width instead of thin, medium and thick specifiers.

The default value of the Width property is 2.


TcxWebBorder.Assign

TcxWebBorder

Assigns the contents of one TcxWebBorder object to another.

procedure Assign(Source: TPersistent); override;

Description

Use the Assign method in order to assign the Color, Style and Width property values of one TcxWebBorder object to another.  The Source parameter specifies the source object.  The caller of the method is a destination object.


TcxWebBorder.Changed

TcxWebBorder          See Also

Notifies controls of border style changes.

procedure Changed; dynamic;

Description

This method is used internally to notify the controls referencing a style about border style changes.  When a control receives notification, it redraws itself in order to reflect the last style changes.

Use the BeginUpdate and EndUpdate methods of the TcxWebStyleItem object to prevent your control from repainting itself during consecutive style changes.  Once the BeginUpdate method is called, notification doesn’t result in control redrawing.  When the EndUpdate method is called, all controls redraw themselves if necessary.


TcxWebBorder.Create

TcxWebBorder

Creates a TcxWebBorder class instance.

constructor Create(ABorders: TcxWebBorders);

Description

Do not use this method in applications.  The TcxWebBorder class instances corresponding to the Left, Top, Right and Bottom properties of the TcxWebBorders class created within its constructor.  The ABorders parameter specifies the TcxWebBorders object owning the created TcxWebBorder class instance.  This parameter value is written to the Borders property of the TcxWebBorder object.


TcxWebBorder.RestoreDefaults

TcxWebBorder

Restores the default border style.

procedure RestoreDefaults;

Description

Use this method to set the default values to the Color, Style and Width properties.  This method also empties the AssignedValues property.


TcxWebBorders
TcxWebBorders Object

Hierarchy          Properties          Methods          See Also

Contains properties and methods for border style management.

Unit

cxWebClasses

TcxWebBorders = class(TcxWebStyleObject)

Description

Used to set the width, color and style of all control borders at once or to adjust properties of the left, top, right and bottom borders of a control separately.

You should use the TcxWebStyleController component to set the style (including the border style) of a control.  The image below shows you the way to access the border style (properties of the TcxWebBorders object).


TcxWebBorders Hierarchy
Hierarchy

TPersistent

     |

TcxWebStyleObject


Properties for TcxWebBorders
TcxWebBorders Properties

TcxWebBorders          Legend

In TcxWebBorders

Bottom

Color

Left

Right

Style

Top

Width

Derived from TcxWebStyleObject

WebStyle


Methods for TcxWebBorders
TcxWebBorders Methods

TcxWebBorders          Legend

In TcxWebBorders

Assign

Create

Destroy

DoRestoreDefaults

HorzBordersSize

SameColors

SameStyles

SameWidths

VertBordersSize

WriteHTML

Derived from TcxWebStyleObject

BeginUpdate

Changed

DoRestoreDefaults

EndUpdate

RestoreDefaults


TcxWebBorders.Bottom

TcxWebBorders          See Also

Represents the bottom border style.

property Bottom: TcxWebBorder;

Description

Use this property to access the bottom border style of a control (controls).  You can access styles of other borders via the Left, Top and Right properties.  These properties are of type TcxWebBorder.  They allow you to control line style, color and width of borders.

You can set the style of all borders at once via the Color, Style and Width properties of the TcxWebBorders object.


TcxWebBorders.Color

TcxWebBorders          See Also

Specifies the color of all borders.

property Color: TcxWebColor;

Description

Use this property to set the color of all control borders at once.  In order to accomplish this. the Color properties of the TcxWebBorder objects, which represent the Left, Top, Right and Bottom properties, are set to the value assigned to this property.

Let’s explore the code rendered for the style controller item, which sets the color of all borders (the Color property) to clWebSpringGreen.

<STYLE>

<!--

.cxWebPageModule3_cxWebStyleController1Item1  { border-left-color: #00FF7F; border-top-color: #00FF7F; border-right-color: #00FF7F; border-bottom-color: #00FF7F; color:windowtext; font-family:"MS Sans Serif"; font-size:10pt;}

//-->

Note: This property returns the Color property value of the TcxWebBorder object representing the left border style (the Left property).  Thus you should be careful when reading this property if border colors are not the same.  Use the SameColors method to determine whether all borders have the same color.


TcxWebBorders.WriteHTML

TcxWebBorders          See Also

Writes the HTML code rendered to represent the border style of a control (controls).

procedure WriteHTML(HTMLTextBuilder: TcxHTMLTextBuilder);

Description

The WriteHTML method is used to write the HTML code representing the border style specified by the properties of the TcxWebBorders object.  The code is written to the internal buffer of the object represented by the HTMLTextBuilder parameter.  This is performed via TcxHTMLTextBuilder methods.

Please review the sample code rendered by the WriteHTML method (it is highlighted).

<STYLE>

<!--

.cxWebPageModule3_cxWebStyleController1Item1  { border-color: #00FF7F; border-style: double; border-width: medium; color:windowtext;font-family:"MS Sans Serif";font-size:10pt;}

//-->

</STYLE>

ReadOnly Property


TcxWebBorders.Left

TcxWebBorders          See Also

Represents the left border style.

property Left: TcxWebBorder;

Description

Use this property to access the left border style of a control (controls).  You can access styles of other borders via the Bottom, Top and Right properties.  These properties are of type TcxWebBorder.  They allow you to control the borders’ line style, color and width.

You can set the style of all borders at once via the Color, Style and Width properties of the TcxWebBorders object.


TcxWebBorders.Right

TcxWebBorders          See Also

Represents the right border style.

property Right: TcxWebBorder;

Description

Use this property to access the right border style of a control (controls).  You can access styles of other borders via the Left, Top and Bottom properties.  These properties are of type TcxWebBorder.  They allow you to control the borders’ line style, color and width.

You can set the style of all borders at once via the Color, Style and Width properties of the TcxWebBorders object.


TcxWebBorders.Style

TcxWebBorders          See Also

Specifies the line style of all borders.

TcxWebBorderStyle = (wbsNone, wbsSolid, wbsDotted, wbsDashed, wbsDouble, wbsGroove, wbsRidge, wbsInset, wbsOutset);

property Style: TcxWebBorderStyle;

Description

Use this property to set the line style of all control borders at once.  In order to accomplish this, the Style properties of the TcxWebBorder objects, which represents the Left, Top, Right and Bottom properties, are set to the value assigned to this property.

Consider the code rendered for the style controller item, which sets the color of all borders (the Style property) to wbsDouble.

<STYLE>

<!--

.cxWebPageModule3_cxWebStyleController1Item1  { border-left-style: double; border-top-style: double; border-right-style: double; border-bottom-style: double; color:windowtext;font-family:"MS Sans Serif";font-size:10pt;}

//-->

</STYLE>

Note: This property returns the Style property value of the TcxWebBorder object representing the left border style (the Left property).  Thus you should be careful when reading this property if line styles of borders are not the same.  Use the SameStyles method to determine whether all borders have the same line style.


TcxWebBorders.Top

TcxWebBorders          See Also

Represents the top border style.

property Top: TcxWebBorder;

Description

Use this property to access the top border style of a control (controls).  You can access other border styles via the Left, Bottom and Right properties.  These properties are of type TcxWebBorder.  They allow you to control the border’s line style, color and width.

You can set the style of all borders at once via the Color, Style and Width properties of the TcxWebBorders object.


TcxWebBorders.Width

TcxWebBorders          See Also

Specifies the width of all borders.

property Width: TcxWebBorderWidth;

Description

Use this property to set the width of all control borders at once.  In order to accomplish this, the Width properties of the TcxWebBorder objects, which represent the Left, Top, Right and Bottom properties, are set to the value assigned to this property.

Please review the code rendered for a style controller item, which sets the color of all borders (the Width property) to 2.

<STYLE>

<!--

.cxWebPageModule3_cxWebStyleController1Item1  { border-left-width: medium; border-top-width: medium; border-right-width: medium; border-bottom-width: medium; color:windowtext;font-family:"MS Sans Serif";font-size:10pt;}

//-->

</STYLE>

Note: This property returns the Width property value of the TcxWebBorder object representing the left border style (the Left property).  Thus you should be careful when reading this property if the widths of borders are not the same.  Use the SameWidths method to determine whether all borders are of the same width.


TcxWebBorders.Assign

TcxWebBorders

Assigns the contents of one TcxWebBorders object to another.

procedure Assign(Source: TPersistent); override;

Description

Use this method to assign values of the Left, Top, Right and Bottom properties of one TcxWebBorders class instance to another.  The source object is transmitted to this method as a Source parameter.


TcxWebBorders.Create

TcxWebBorders          See Also

Creates a TcxWebBorders class instance.

constructor Create(AWebStyle: TBasecxWebStyle); override;

Description

This method initializes the TcxWebBorder class instances representing the Left, Top, Right and Bottom properties of the TcxWebBorders object.  Then the inherited constructor is called, which calls the DoRestoreDefaults method.

Do not use this method in applications.  This method is called automatically when the TcxWebStyleItem object is created.


TcxWebBorders.Destroy

TcxWebBorders          See Also

Destroys a TcxWebBorders class instance.

destructor Destroy; override;

Description

This method disposes the TcxWebBorder class instances representing the Left, Top, Right and Bottom properties of the TcxWebBorders object.

Do not use this method in applications.  The TcxWebBorders object is disposed when the TcxWebStyleItem object is destroyed.


TcxWebBorders.DoRestoreDefaults

TcxWebBorders

Restores the default values of the TcxWebBorders object’s properties.

procedure DoRestoreDefaults; override;

Description

This method is called by the inherited RestoreDefaults method.  It calls the RestoreDefaults methods of the TcxWebBorder class instances, which represent the Left, Top, Right and Bottom properties of the TcxWebBorders object.  Thus, the default border style is applied to all borders.


TcxWebBorders.HorzBordersSize

TcxWebBorders          See Also

Returns the sum of the left and right border widths.

function HorzBordersSize: Integer;

Description

Use this method to determine the total width of the left and right borders.  This allows you to determine the width of the area occupied by a control excluding its borders.  The width of the right and left borders is specified by the Width properties of the TcxWebBorder objects, which represent the Left and Right properties.  You can also set the width of all borders at once via the Width property of the TcxWebBorders object.


TcxWebBorders.SameColors

TcxWebBorders          See Also

Determines whether the same colors are assigned to all borders.

function SameColors: Boolean;

Description

This method returns True if the left, top, right and bottom borders have the same colors.  Otherwise, it returns False.  Said differently, it determines whether the Color properties of the TcxWebBorder objects, which represent the Left, Top, Right and Bottom properties of the TcxWebBorders object, are the same.


TcxWebBorders.SameStyles

TcxWebBorders          See Also

Determines whether the same line styles are assigned to all borders.

function SameStyles: Boolean;

Description

This method returns True if the left, top, right and bottom borders have the same line styles.  Otherwise, it returns False.  Said differently, it determines whether the Style properties of the TcxWebBorder objects, which represent the Left, Top, Right and Bottom properties of the TcxWebBorders object, are the same.


TcxWebBorders.SameWidths

TcxWebBorders          See Also

Determines whether the same widths are assigned to all borders.

function SameWidths: Boolean;

Description

This method returns True if the left, top, right and bottom borders have the same widths.  Otherwise, it returns False.  Said differently, it determines whether the Width properties of the TcxWebBorder objects, which represent the Left, Top, Right and Bottom properties of the TcxWebBorders object, are the same.


TcxWebBorders.VertBordersSize

TcxWebBorders          See Also

Returns the sum of the top and bottom border widths.

function VertBordersSize: Integer;

Description

Use this method to determine the total width of the top and bottom borders.  This allows you to determine the height of the area occupied by a control excluding its borders.

The width of the top and bottom borders is specified by the Width properties of the TcxWebBorder objects, which represent the Top and Bottom properties.  You can also set the width of all borders at once via the Width property of the TcxWebBorders object.


TcxWebComponent
TcxWebComponent Object

Hierarchy          Properties          Methods          Events          See Also

Serves as the base class for all EWF components and controls.

Unit

cxWebClasses

TcxWebComponent = class(TComponent, IcxWebProvidersSupport, IcxCodeProvider, IcxWebActions, IcxWebComponentState, IcxWebEvents, IcxWebGetStyles, IcxWebScripts, IcxWebStyleChanged, IcxWebValues, IWebVariableName)

Description

The TcxWebComponent class implements the basic behavior required by all components and controls that can be used in EWF.  It implements a number of interfaces that are enough for component functionality in EWF.  Thus you do not have to use the TcxWebComponent class as the base for your EWF components.  You simply have to implement the listed interfaces in order to create a fully functional web component.  Note that the best way is to use the TcxWebComponent as the ancestor.

Do not create instances of the TcxWebComponent class.  Use this class as a base when declaring your own components.  If you want to create a control, you should derive from the TcxWebControl class or implement the interfaces from which it is derived.

Please refer to the Component Class Structure topic for a complete diagram of control inheritance.


TcxWebComponent Hierarchy
Hierarchy

TComponent


Properties for TcxWebComponent
TcxWebComponent Properties

TcxWebComponent          Legend

In TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebComponent
TcxWebComponent Methods

TcxWebComponent          Legend

In TcxWebComponent

CanSetValues

Create

Destroy

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterActions

RegisterEvents

RegisterRenderers

RegisterValues

ScriptsSubscription

SetState

StyleChanged

ValidateContainer


Events for TcxWebComponent
TcxWebComponent Events

TcxWebComponent          Legend

In TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebComponent.WebRendererClasses

TcxWebComponent

Gets the renderer class corresponding to the specified browser type.

property WebRendererClasses[ABrowser: TcxWebBrowserClass]: TcxWebRendererClass;

Description

Each component is rendered by renderer classes.  Each renderer class produces HTML code representing a component for a specific browser type.  Renderer classes are registered within the RegisterRenderers method.

Access the WebRendererClasses property to retrieve a reference to the renderer object corresponding to the browser type specified by the ABrowser parameter.  If none of the registered renderers corresponds to the specified browser type, a reference to the default renderer class is returned.


TcxWebComponent.GetProviders

TcxWebComponent          See Also

Implements the GetProviders method of the IcxWebProvidersSupport interface.

procedure GetProviders(AList: TList);

Description

This method returns a list of references to the TcxWebStyleController objects, which declare styles used by your component.  The list is returned via the AList parameter.  The GetProviders method cannot be overridden in derived classes.  Thus, this method simply calls the ImplGetProviders method implementing the functionality of the GetProviders method.  You should override the ImplGetProviders method in derived classes, if needed.


TcxWebComponent.ImplGetProviders

TcxWebComponent

Implements the GetProviders method’s functionality.

procedure ImplGetProviders(AList: TList); virtual;

Description

Since the GetProviders method cannot be overridden in derived classes, it simply calls the ImplGetProviders method implementing its functionality.  You should override the ImplGetProviders method in the TcxWebComponent descendants, if needed.

The functionality implemented by the ImplGetProviders method of the TcxWebComponent class obtains the list of references to the TcxWebStyleController objects, which declare styles used by the component.  The list is returned via the AList parameter.


TcxWebComponent.IsLoading

TcxWebComponent

Returns a value indicating whether the component is in a loading state.

function IsLoading: Boolean;

Description

The IsLoading function returns True if the ComponentState property contains a csLoading value.  Otherwise, it returns False.

Note: After the web component is loaded, certain actions are necessary to be performed to provide the component with up-to-date property values.  Thus it is best to determine whether the WebComponentState property contains a wcsLoading value.


TcxWebComponent.CustomEvents

TcxWebComponent          See Also

Specifies the collection of user-defined client side event handlers.

property CustomEvents: TcxCustomEvents;

Description

Use this property to specify the client-side event handlers (written in JScript) for a component.  Each item in the collection contains the event type and text of its handler.  They are represented by the EventType and HandlerText properties of the TcxCustomEventItem object.   This object, in turn, represents a single item within the TcxWebCustomEvents class, which is the type of the CustomEvents property.

In addition to user-defined event handlers, some client event handlers are rendered.  For instance, the OnMouseOver and OnMouseOut event handlers are rendered for the control, which has its hover style assigned. And not just the CustomEvents property can force a component to render its client events. Such events can also be needed to invoke assigned server-side event handlers.  If a client event is needed to be rendered due to both these reasons, two corresponding handlers are concatenated into a single JScript function.  This function is referenced by the corresponding attribute of the tag, representing the control.  Otherwise (in case of a single event handler), handler text is directly written to the tag attribute value.


TcxWebComponent.OnAfterRender

TcxWebComponent          See Also

Fires after a component has been rendered.

property OnAfterRender: TNotifyEvent;

Description

Each component is rendered to get the HTML code representing it.  Write an OnAfterRender event handler to perform specific actions each time your component is rendered.

This event is invoked by the DoAfterRender method of the WebRenderHelper property (the TcxWebRenderHelper object), which simply checks whether the OnAfterRender event handler is assigned and runs it if so.  This method is called from the WriteHTML method.


TcxWebComponent.OnBeforeRender

TcxWebComponent          See Also

Fires before a component is rendered.

property OnBeforeRender: TNotifyEvent;

Description

Each component is rendered to get the HTML code representing it.  Write an OnBeforeRender event handler to perform specific actions each time your component is about to be rendered.

This event is invoked by the DoBeforeRender method of the WebRenderHelper property (the TcxWebRenderHelper object), which simply checks whether the OnBeforeRender event handler is assigned and runs it if so.  This method is called from the WriteHTML method.


TcxWebComponent.Styles

TcxWebComponent          See Also

Specifies the default and hover styles of a control.

property Styles: TcxWebStyles;

Description

You should use the TcxWebStyleController component to specify the styles applied to a control.  Once the desired styles are specified, set the control’s style via its Styles property.  This property is represented by the TcxWebStyles object, whose Default and Hover properties specify the default and hover styles.

If a default style is applied to a component and hover style is not specified, the component will have the specified default style even when the mouse pointer hovers over it.  Said differently, when the hover style is nil, the OnMouseIn and OnMouseOut event handlers, which change control style, are not rendered.


TcxWebComponent.WebActionsHelper

TcxWebComponent          See Also

Returns an object implementing the component’s functionality of server side events handling.

property WebActionsHelper: TcxWebActionsHelper;

Description

The TcxWebComponent class delegates a part of its functionality concerning server side event handling to the TcxWebActionsHelper object.  This object is retrieved via the WebActionsHelper property, which implements the IcxWebValues interface.

The TcxWebActionsHelper object manages registration and execution of event handlers.  In order to register event handlers for a component, you should override the RegisterActions method of the TcxWebComponent class.  This method should call the RegisterAction method of the TcxWebActionsHelper object (the WebActionsHelper property) for each event, which can be handled by your component (control).  The names of the event and corresponding handler are transmitted to this method as parameters.  It is recommended to register an event with an empty string name.  This allows EWF to avoid errors when the request contains an empty __ACTIONNAME hidden input value and non-empty __TARGETNAME.

ReadOnly Property


TcxWebComponent.WebComponentState

TcxWebComponent

Specifies whether a component is in a loading state.

TcxWebComponentState = (wcsLoading);

TcxWebComponentStates = set of TcxWebComponentState;

property WebComponentState: TcxWebComponentStates;

Description

Since the TcxWebComponent is derived from the TComponent class, it is possible to check whether the component is being loaded using the ComponentState property.  This, however, can be insufficient when considering web components.  The reason is that even when a component is created, there is a number of manipulations to be performed against it before it can be used.  These manipulations, for instance, are loading the form state and setting the values changed by the client side of the application.

The WebComponentState property is set to [wcsLoading] within the TcxWebComponent constructor.  When all the operations - which can affect the component’s state - are completed, an empty set is assigned to the state of all components (controls).


TcxWebComponent.WebEventsHelper

TcxWebComponent          See Also

Returns an object implementing the component’s functionality for client side event handling.

property WebEventsHelper: TcxWebEventsHelper;

Description

The TcxWebComponent class delegates a part of its functionality concerning client side event handling to the TcxWebEventsHelper object.  This object is retrieved via the WebEventsHelper property, which implements the IcxWebEvents interface.

All client side events can be divided into three types: custom events (the CustomEvents property), auxiliary events (implementing the hover style or getting and losing focus), and events forcing form submission (resulting in server side event handling).  Each component should override the RegisterEvents method in order to register the required client side events.  This method should call the RegisterEvent method of the TcxWebEventsHelper object (the WebEventsHelper property) for each client side event, which should be rendered.  The name of the event, the procedure returning its handler and the handler type (single-line or multi-line) are transmitted to it as parameters.

The RegisterEvents method of the TcxWebComponent registers custom events and the OnMouseIn and OnMouseOut events (if the hover style is not nil).

ReadOnly Property


TcxWebComponent.WebRenderHelper

TcxWebComponent          See Also

Returns an object implementing the component’s functionality for HTML code rendering.

property WebRenderHelper: TcxWebRenderHelper;

Description

The TcxWebComponent class delegates a part of its functionality concerning HTML code rendering to the TcxWebRenderHelper object.  This object is retrieved via the WebRenderHelper property, which implements the IcxCodeProvider and IcxStylesProvider interfaces.

Each component (control) can be rendered in a number of ways depending upon client browser type.  In order to implement this, each component (control) has a number of renderer classes.  Each is used to render code for a particular browser.  These classes are registered within the RegisterRenderers method of the TcxWebComponent class.  Override this method to register renderer classes you need when designing your own component.  This method should call the RegisterRenderer method of the TcxWebRenderHelper class for each renderer class.

The TcxWebRenderHelper class contains a number of methods, which render specific code for a component.  Each of these methods is implemented similarly.  First, the renderer class, corresponding to the specified browser type is instantiated.  Then the corresponding method of the renderer class is called in order to render the desired code.

ReadOnly Property


TcxWebComponent.WebScriptsHelper

TcxWebComponent          See Also

Returns an object implementing the functionality of the component regarding scripts subscription.

property WebScriptsHelper: TcxWebScriptsHelper;

Description

The TcxWebComponent class delegates a part of its functionality concerning script subscription to the TcxWebScriptsHelper object.  This object is retrieved via the WebScriptsHelper property.

A component (control) may need a number of client side scripts to be rendered.  For instance, if it has a server side event handler assigned, it needs the __doPostBack function, which submits the form to be rendered.  Each client side script has a corresponding object (a TcxWebScript descendant), which implements two methods that return the script’s code and the HTML code needed to be rendered within the form.  If you are designing your own component, you should override the ScriptsSubscription method of the TcxWebComponent class.  This method should call the ScriptSubscription method of the TcxWebScriptsHelper class (the WebScriptsHelper property) for each script required by the component.  The object implementing script rendering (a TcxWebScript descendant) is transmitted to it as a parameter.

This technique allows EWF to get a list of scripts required by the components within the page module (and render these scripts).

ReadOnly Property


TcxWebComponent.WebValuesHelper

TcxWebComponent          See Also

Returns an object implementing the component’s functionality for maintaining values.

property WebValuesHelper: TcxWebValuesHelper;

Description

The TcxWebComponent class delegates a part of its functionality concerning maintaining values to the TcxWebValuesHelper object.  This object is retrieved via the WebValuesHelper property, which implements the IcxWebValues interface.

A user can change values displayed by EWF components (for instance, a user can type a new value within the TcxWebEdit component).  EWF implements a technique to update the component’s property values so as not to lose these values changes.  Each component overrides the RegisterValues method of the TcxWebComponent class.  If you are designing your own component, you should do this as well.  This method should call the RegisterValue method of the TcxWebValuesHelper class (the WebValuesHelper property) for each HTML element comprising the control, whose value should be maintained.  A grid control, for instance, registers edit fields representing each of its cells.  Once the request reaches the server script, the registered values are retrieved from it and the component’s properties are adjusted.

ReadOnly Property


TcxWebComponent.CanSetValues

TcxWebComponent          See Also

Returns a value determining whether the component’s properties can be updated with the values received from a client.

function CanSetValue: Boolean; virtual;

Description

This method implements the CanSetValues method of the IcxWebValues interface.  It is used to determine whether the changes performed by a user can be (or should be) applied to your component.  For instance, if a user has entered something within the TcxWebEdit control, this value is transmitted within the request and is assigned to its Text property.  If the CanSetValues method of the control returns False, the control’s property values aren’t updated.  This method is used to avoid data changes when a control doesn’t need to save changes for specific reasons or to avoid extra processing if a user cannot change data.

The CanSetValues method of the TcxWebComponent class simply returns True.  Thus you may not override it in descendant classes, since the values will be updated in all instances.  On the other hand, you should override this method if you want to set updated values only when certain conditions are met.  For instance, the CanSetValues method of the TcxWebControl class returns True only if the control is enabled and visible.


TcxWebComponent.Create

TcxWebComponent          See Also

Creates a TcxWebComponent class instance.

constructor Create(AOwner: TComponent); override;

Description

The constructor is used to create a new instance of the TcxWebComponent class and instantiate some of the helper classes.  First, it calls the inherited constructor of the TComponent class.  The AOwner parameter is transmitted to the inherited method.

After the inherited method has been executed, the Create method performs the following actions:

•	sets the WebComponentState property to [wcsLoading];

•	calls the RegisterRenderers method to register component renderers for different types of client browsers.

Make certain to call the inherited constructor when designing your own components derived from the TcxWebComponent class.


TcxWebComponent.Destroy

TcxWebComponent          See Also

Destroys a TcxWebComponent class instance.

destructor Destroy; override;

Description

The destructor is used to dispose the TcxWebComponent object and its helper objects.  Before calling the inherited destructor of the TComponent class it does the following:

•	frees the TcxWebEventsHelper object representing the WebEventsHelper property;

•	frees the TcxWebStyles object representing the Styles property;

•	frees the TcxWebActionsHelper object representing the WebActionsHelper property;

•	frees the TcxWebRenderHelper object representing the WebRenderHelper property;

•	frees the TcxWebScriptsHelper object representing the WebScriptsHelper property;

•	frees the TcxWebValuesHelper object representing the WebValuesHelper property.

Remember to call the inherited destructor when designing your own components derived from the TcxWebComponent class.


TcxWebComponent.GetState

TcxWebComponent          See Also

Accesses the WebComponentState property value.

function GetState: TcxWebComponentStates;

Description

This method implements the GetState method of the IcxWebComponentState interface.  It simply returns the WebComponentState property value determining whether the component is being loaded.


TcxWebComponent.GetVariableName

TcxWebComponent          See Also

Returns the component name.

function GetVariableName: string;

Description

This method implements the GetVariableName method of the IWebVariableName interface.  EWF components and controls implement this interface to support Web Broker.

The GetVariableName method simply returns the result of the ImplGetVariableName method call.  This is done so as this method cannot be overridden in derived classes.  The ImplGetVariableName method should be overridden instead.


TcxWebComponent.GetWebActionsHelper

TcxWebComponent

Returns an object implementing the component’s functionality for server side event handling.

function GetWebActionsHelper: TcxWebActionsHelper; virtual;

Description

This method is a ‘read’ of the WebActionsHelper property.  You shouldn’t use this method to access a helper object.  Retrieve the WebActionsHelper property value instead.

You can override this method in descendant classes to perform specific actions when retrieving a helper object or to retrieve an another type of object.  Note that none of the EWF components overrides this method.


TcxWebComponent.GetWebEventsHelper

TcxWebComponent

Returns an object implementing the component’s functionality for client side event handling.

function GetWebEventsHelper: TcxWebEventsHelper; virtual;

Description

This method is a ‘read’ of the WebEventsHelper property.  You shouldn’t use this method to access a helper object.  Retrieve the WebEventsHelper property value instead.

You can override this method in descendant classes to perform specific actions when retrieving a helper object or to retrieve another type of object.  Note that none of the EWF components overrides this method.


TcxWebComponent.GetWebRenderHelper

TcxWebComponent

Returns an object implementing the component’s functionality for HTML code rendering.

function GetWebRenderHelper: TcxWebRenderHelper; virtual;

Description

This method is a ‘read’ of the WebRenderHelper property.  You shouldn’t use this method to access a helper object.  Retrieve the WebRenderHelper property value instead.

You can override this method in descendant classes in order to perform specific actions when retrieving a helper object or to retrieve another type of object.  Note that none of the EWF components overrides this method.


TcxWebComponent.GetWebScriptsHelper

TcxWebComponent

Returns an object implementing the component’s functionality for script subscription.

function GetWebScriptsHelper: TcxWebScriptsHelper; virtual;

Description

This method is a ‘read’ of the WebScriptsHelper property.  You shouldn’t use this method to access a helper object.  Retrieve the WebScriptsHelper property value instead.

You can override this method in descendant classes to perform specific actions when retrieving a helper object or to retrieve another type of object.  Note that none of the EWF components overrides this method.


TcxWebComponent.GetWebValuesHelper

TcxWebComponent

Returns an object implementing the component’s functionality for maintaining values.

function GetWebValuesHelper: TcxWebValuesHelper; virtual;

Description

This method is a ‘read’ of the WebValuesHelper property.  You shouldn’t use this method to access a helper object.  Retrieve the WebValuesHelper property value instead.

You can override this method in descendant classes to perform specific actions when retrieving a helper object or to retrieve another type of object.  Note that none of the EWF components overrides this method.


TcxWebComponent.ImplGetVariableName

TcxWebComponent          See Also

Implements the functionality of the GetVariableName method.

function ImplGetVariableName: string; virtual;

Description

The ImplGetVariableName method is called by the GetVariableName method, which implements the IWebVariableName interface.  EWF components and controls implement this interface to support Web Broker.


TcxWebComponent.DoSetValues

TcxWebComponent          See Also

Updates the component's properties with the values contained within a request message.

procedure InternalSetValue; virtual;

Description

This method implements the DoSetValues method of the IcxWebValues interface.  It is used to set the value(s) received within a request to a component’s property(s).  These values are data displayed by the component via different HTML elements (edits, combo boxes, etc.), which are located within the form.  Assigning these values to the component’s properties aims not to lose changes made by the end-user.  Please refer to IcxWebValues for complete information on this process.

The DoSetValues method of the TcxWebComponent class performs no actions.  It is overridden by derived classes as needed.  In descendant classes this method is implemented to retrieve value(s) from the Values collection of the TcxWebValuesHelper object (the WebValuesHelper property of the TcxWebComponent class).  These values are assigned to the corresponding properties.

If you are designing your own component, make certain to override the DoSetValues method if the component displays values which can be changed by a user.  You should also override the RegisterValues method to register the IDs of the HTML elements, whose values are to be retrieved from the request.  As mentioned earlier, these values are written to the Values collection of the TcxWebValuesHelper object (the WebValuesHelper property of the TcxWebComponent class).


TcxWebComponent.IsDesigning

TcxWebComponent

Returns a value indicating whether a component is accessed at design time.

function IsDesigning: Boolean;

Description

Returns True if a component is accessed at design time.  Otherwise, returns False.  Use this method to determine whether specific actions can be performed on the component.

You can also use the ComponentState property to determine the current state of this component.


TcxWebComponent.Loaded

TcxWebComponent

Initializes a component after the form file has been read in memory.

procedure Loaded; override;

Description

Do not call the protected Loaded method. The streaming system calls this method after loading the component’s form from a stream.

As implemented in the TcxWebComponent class, this method calls the inherited Loaded method of the TComponent class and calls the ScriptsSubscription method.  You can override this method in derived classes to perform certain initializations after the component has been loaded.  Remember to call the inherited method in descendant classes.

Note: Although the Loaded method of the TComponent class removes the csLoading flag from the ComponentState property, the wcsLoading flag isn’t removed from WebComponentState.  The reason is that even when the component is loaded, its property values can still be changed.  Thus it is best to check the WebComponentState property value to find out whether the component is loaded and if its properties have correct values.


TcxWebComponent.Notification

TcxWebComponent

Forwards notification messages to owned components.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

This method is used to respond to creation or deletion of an object which stands for some class property. The AComponent parameter specifies the object, which is about to be inserted or removed, as specified by the Operation parameter.

The Notification method of the TcxWebComponent class calls the inherited Notification method.  Then it checks whether the AComponent parameter is a TcxWebStyleItem class instance.  If true, the Notification method of the TcxWebStyles object (the Styles property) is called with the same parameters.


TcxWebComponent.RegisterActions

TcxWebComponent          See Also

Registers the server side events which can be handled by a component.

procedure RegisterActions; virtual;

Description

The intent of this method is to register the server side events which can be handled by a component (actions).  Registering an action implies calling the RegisterAction method of the TcxWebActionsHelper object (the WebActionsHelper property).  The parameters transmitted to this method are the names of the event and handler.

The RegisterActions method of the TcxWebComponent class performs no actions.  It is overridden in derived classes to register the required server side events.  You should also override this method when designing a component, which must handle server-side events.

Note that only the server side events, invoked at the client side, should be registered.

Note: It is recommended to register an event with a name containing an empty string.  This allows EWF to avoid errors, when the __ACTIONNAME hidden input (specifying the event name) is transmitted empty.  An error may only occur if the __TARGETNAME hidden input (specifying the component) is not empty.


TcxWebComponent.RegisterEvents

TcxWebComponent          See Also

Registers the client side events which should be rendered for a component.

procedure RegisterEvents; virtual;

Description

This method implements the RegisterEvents method of the IcxWebEvents interface.  Its purpose is to register the client side events which should be rendered for a component.  Registering a client side event implies calling the RegisterEvent method of the TcxWebEventsHelper object (the WebEventsHelper property).

The RegisterEvents method of the TcxWebComponent class performs two basic things.  First, it calls the RegisterCustomEvents method of the TcxWebEventsHelper object (the WebEventsHelper property).  The intent of this method is to register the events specified by the CustomEvents property.  After it has been performed, it registers the OnMouseOver and OnMouseOut events if the hover style of the component is not nil.

You should override the RegisterEvents method in descendant classes to register specific client side events.  Remember that each server side event, invoked by the client side of the application, requires a client event to fire it. Make certain to call the inherited RegisterEvents method when overriding.


TcxWebComponent.RegisterRenderers

TcxWebComponent          See Also

Registers the renderer classes, which render the HTML code representing a component for a specific browser.

procedure RegisterRenderers; virtual;

Description

This method provides the facility to register the renderer classes (TcxWebRenderer descendants).  These classes support custom rendering of the HTML code representing a component for a specific browser - providing you with multi-browser support.  Registering a renderer class generates a call to the RegisterRenderer method of the TcxWebRenderHelper object (the WebRenderHelper property).

The RegisterRenderers method of the TcxWebComponent class registers the TcxWebRenderer class for all browser types.  This renderer class doesn’t produce any HTML code representing the component.  You should override this method to register renderers for your descendant components.  To do this, you need to create your own renderer classes derived from TcxWebRenderer.

Do not call the inherited RegisterRenderers in overridden methods.


TcxWebComponent.RegisterValues

TcxWebComponent          See Also

Registers the HTML elements containing data related to a component.

procedure RegisterValues; virtual;

Description

This method implements the RegisterValues method of the IcxWebValues interface.  Its intention is to register the IDs of the HTML elements displaying the component’s data or containing auxiliary information.  Registering a value implies calling the RegisterValue method of the TcxWebValuesHelper object (the WebValuesHelper property).

The RegisterValues method of the TcxWebComponent class performs no actions.  The derived classes override it to register the desired values.  When creating your own component, you should also override this method so as not to lose the changes made by a user.


TcxWebComponent.ScriptsSubscription

TcxWebComponent

Subscribes a component to the required scripts.

procedure ScriptsSubscription; virtual;

Description

This method implements the ScriptsSubscription method of the IcxWebScripts interface.  Its intent is to register the TcxWebScript descendant classes representing the scripts required for component functionality.  Registering a TcxWebScript descendant is called subscribing to a script.  Subscribing to a script implies calling the ScriptSubscription method of the TcxWebScriptsHelper class (the WebScriptsHelper property).

The ScriptsSubscription method of the TcxWebComponent class checks whether a hover style is assigned to a component.  If true, it subscribes to the script, changing the component style.  Descendant components override this method to subscribe to other desired scripts.  You should also override this method when creating your own component.  In such an instance, make certain to call the inherited ScriptsSubscription method.


TcxWebComponent.SetState

TcxWebComponent          See Also

Sets the WebComponentState property value.

procedure SetState(Value: TcxWebComponentStates);

Description

This method implements the SetState method of the IcxWebComponentState interface.  It simply sets the WebComponentState property value to the Value parameter.


TcxWebComponent.StyleChanged

TcxWebComponent          See Also

Performs specific actions after the style applied to a component has been modified.

procedure StyleChanged(Style: TcxWebStyleItem); virtual;

Description

Do not call the StyleChanged method.  It is called automatically after the style (the TcxWebStyleItem object) applied to the component has been modified.

The StyleChanged method of the TcxWebComponent class performs no actions.  It is overridden in descendant classes to perform specific actions each time the component’s style is modified.  You should also override this method if the component you are designing should respond to style changes.  The Style parameter is a TcxWebStyleItem object representing the modified style.

Make certain to call the inherited StyleChanged method when overriding it.


TcxWebComponent.ValidateContainer

TcxWebComponent

Determines whether an object can be inserted in a container.

procedure ValidateContainer(AComponent: TComponent); override;

Description

The ValidateContainer method simply calls the inherited ValidateContainer method.  Override this method to prevent a component from being inserted to specified container types.


TcxWebEventsHelper
TcxWebEventsHelper Object

Hierarchy          Properties          Methods          See Also

Manages client side events registration. (Partially implements the IcxWebEvents interface.)

Unit

cxWebClasses

TcxWebEventsHelper = class(TcxWebHelper)

Description

Each component should register client side events handled by it.  This is required to create a list of client side events for each component.  It simplifies the process of client event rendering.

In order to register client side events, each component overrides the RegisterEvents method of the TcxWebComponent class.  This method is utilized to call the RegisterEvent method for each client side event handled by a component.

Remember that each server side event requires a corresponding client side event to be registered.  The client side event handler should submit the form.


TcxWebEventsHelper Hierarchy
Hierarchy

TObject

     |

TcxWebHelper


Properties for TcxWebEventsHelper
TcxWebEventsHelper Properties

TcxWebEventsHelper          Legend

In TcxWebEventsHelper

CustomEvents

Derived from TcxWebHelper

Component


Methods for TcxWebEventsHelper
TcxWebEventsHelper Methods

TcxWebEventsHelper          Legend

In TcxWebEventsHelper

ClearEvents

Create

Destroy

FindEvents

RegisterCustomEvents

RegisterEvent


TcxWebEventsHelper.CustomEvents

TcxWebEventsHelper          See Also

Contains a collection of custom client side events.

property CustomEvents: TcxCustomEvents;

Description

This property stores a collection of TcxCustomEventItem objects.  Each object within this collection contains the client event type and text of its handler written in JScript.

This property is used to set and get the CustomEvents property value of the TcxWebComponent class and its descendants.


TcxWebEventsHelper.ClearEvents

TcxWebEventsHelper          See Also

Clears the internal collection of client side events handled by a component.

procedure ClearEvents;

Description

Each component can handle different events each time it is rendered.  For instance, if the hover style of a component is not assigned, the component does not need to handle the OnMouseOver event (if a custom handler isn’t assigned to it).  Thus it is necessary to clear the list of registered client side events after each rendering.  The ClearEvents method is used for this purpose.

Remember to clear the list of client side events each time after rendering a component.  This implies that client side events should be registered each time before the component is rendered.  See the description of the RegisterEvents method implemented in the TcxWebComponent class for details on registering client side events.


TcxWebEventsHelper.Create

TcxWebEventsHelper          See Also

Creates a TcxWebEventsHelper class instance.

constructor Create(AComponent: TComponent); override;

Description

This method is used to initialize an internal list of registered client side events and the CustomEvents property.  Do not call this method in applications.  It is called within the GetWebEventsHelper method to initialize the WebEventsHelper property of the TcxWebComponent class and its descendants.

This constructor also calls the inherited Create method of the TcxWebHelper class.


TcxWebEventsHelper.Destroy

TcxWebEventsHelper          See Also

Destroys the TcxWebEventsHelper object.

destructor Destroy; override;

Description

This method frees the objects representing the internal list of registered client side events and the CustomEvents property.  Do not call this method in applications.  An instance of the TcxWebEventsHelper class representing the WebEventsHelper property of a component is freed within the destructor of the TcxWebComponent class (and its descendants).


TcxWebEventsHelper.FindEvents

TcxWebEventsHelper          See Also

Gets the list of handlers assigned to a specific event.

procedure FindEvents(const AEvent: TcxWebComponentEvent; AList: TList);

Description

Each component can have several handlers assigned to a single event.  Assume that the hover style of a component is not nil and the custom handler is assigned to the OnMouseOver event via the CustomEvents property of a TcxWebComponent class descendant.  In such an instance, there are two handlers assigned to the OnMouseOver event.  The FindEvents method is used to get a list of the handlers assigned to the event specified by the AEvent parameter.  The handlers are added to AList.  Each handler is represented by the PcxWebComponentEventRecord pointer.

Note: The items found are added to the AList parameter.  Thus it is necessary to transmit an empty list to the FindEvents method to obtain the correct list of handlers.


TcxWebEventsHelper.RegisterCustomEvents

TcxWebEventsHelper          See Also

Registers the client side events specified by the CustomEvents property of a TcxWebComponent class descendant.

procedure RegisterCustomEvents;

Description

This method scans through the list of custom events and calls the RegisterEvent for each of them.  The list of custom events is stored within the CustomEvents property.

This method is called within the RegisterEvents method of the TcxWebComponent class.  Thus, you shouldn’t call this method in the RegisterEvents method of the component you are designing (if you call the inherited method).


TcxWebEventsHelper.RegisterEvent

TcxWebEventsHelper          See Also

Registers a specific client-side event.

procedure RegisterEvent(const AEvent: TcxWebComponentEvent; const AEventProc: TcxWebComponentEventProc; const AEventProcType: TcxWebComponentEventProcType);

Description

Each component should register the client side events handled by it.  This is done to create a list of client side events for each component.  This simplifies the process of client event rendering.

In order to register client side events, each component overrides the RegisterEvents method of the TcxWebComponent class.  The purpose of this method is to call the RegisterEvent method for each client side event handled by a component.  The AEvent parameter specifies the event type.  A reference to the function returning handler text is transmitted via the AEventProc parameter.  Finally, the AEventProcType parameter specifies whether handler text is "single-line" or "function".  "Single-line" handlers are written directly to the HTML tag representing the control.  "Function" handlers are written to a separate function, which is called to handle the event.

Remember that each server side event requires a corresponding client side event to be registered.  The client side event handler should submit the form.


TcxWebComponentRenderer
TcxWebComponentRenderer Object

Hierarchy          Properties          Methods

Represents a base class for component renderer classes.

Unit

cxWebClasses

TcxWebComponentRenderer = class(TcxWebRenderer)

Description

Components are rendered by means of renderer classes.  Each renderer class is designed to generate HTML code representing the associated component within a specific browser.  The TcxWebComponentRenderer class implements the basic functionality of renderer classes.  It provides a means to render HTML code representing the default style of the associated component and its client scripts.


TcxWebComponentRenderer Hierarchy
Hierarchy

TcxWebRenderer


Properties for TcxWebComponentRenderer
TcxWebComponentRenderer Properties

TcxWebComponentRenderer          Legend

In TcxWebComponentRenderer

WebComponent


Methods for TcxWebComponentRenderer
TcxWebComponentRenderer Methods

TcxWebComponentRenderer          Legend

In TcxWebComponentRenderer

WriteDefaultStyle

WriteEvents

WriteEventsScript

WriteScripts


TcxWebComponentRenderer.WebComponent

TcxWebComponentRenderer

Returns the component which makes use of the renderer object.

property WebComponent: TcxWebComponent;

Description

The WebComponent property is used to access the component, for which HTML code is rendered.  This property returns the value of the Component property initialized within the constructor.

ReadOnly Property


TcxWebComponentRenderer.WriteDefaultStyle

TcxWebComponentRenderer

Writes the attribute specifying the default style of the component.

procedure WriteDefaultStyle; virtual;

Description

The WriteDefaultStyle method renders the CLASS attribute of the tag containing the control.   This attribute specifies the component style.  The Default property of the TcxWebStyles object representing the component’s Styles property is used to perform this task.


TcxWebComponentRenderer.WriteEvents

TcxWebComponentRenderer

Writes attributes specifying client event handlers for the component.

procedure WriteEvents; virtual;

Description

The WriteEvents method is used to render event attributes for the tag containing the component.  These attributes specify the client side events.  The WriteEvents method makes use of the component’s WebEventsHelper property to perform this task.


TcxWebComponentRenderer.WriteEventsScript

TcxWebComponentRenderer

Writes JScript code handling client side events for the component.

procedure WriteEventsScript; virtual;

Description

The WriteEventsScript method is used to render JScript handlers for client side events of the component.  These handlers are called by event attributes rendered by the WriteEvents method.  The WriteEventsScript method makes use of the component’s WebEventsHelper property to perform this task.


TcxWebComponentRenderer.WriteScripts

TcxWebComponentRenderer

Writes client scripts for the associated web component.

procedure WriteScripts; override;

Description

The WriteScripts method is used to render client side (JScript) scripts required for proper functionality.  The TcxWebComponentRenderer class implements this method to render client side event handlers.  Thus the WriteScripts method simply calls the WriteEventsScript method, which performs the task.


TcxURL
TcxURL Object

Hierarchy          Properties          Methods

Contains information about hyperlinks.

Unit

cxWebClasses

TcxURL = class(TPersistent)

Description

The TcxURL class is used to represent information about hyperlinks.  It provides the Href and Target properties, which specify the destination document and the window in which it must be displayed.


TcxURL Hierarchy
Hierarchy

TPersistent


Properties for TcxURL
TcxURL Properties

TcxURL          Legend

In TcxURL

Href

Target


Methods for TcxURL
TcxURL Methods

TcxURL          Legend

In TcxURL

 Assign

 Write


TcxURL.Href

TcxURL          See Also

Specifies the hyperlink.

property Href: string;

Description

Use the Href property to specify the hyperlink represented by the TcxURL object.  As well as destination document’s name other values are also supported.  For example, the Href property can be set to invoke a user’s mailer or run client scripts.  Consider the table below for examples of setting the Href property value:

Value	Description
http://www.devexpress.com	The hyperlink refers to a document.
mailto:someone@devexpress.com	The hyperlink invokes the client’s mailer.
javascript:alert(‘Developer Express Inc.’)	The hyperlink executes JScript code.


TcxURL.Target

TcxURL          See Also

Specifies the window where the destination document is opened.

property Target: string;

Description

Use the Target property to specify the window, in which the destination document is displayed.  The destination document is specified by the Href property.  If the Target property value is left blank, the new document replaces the document in the current window.

The Target property corresponds to the target attribute of the A tag.


TcxURL.Assign

TcxURL

Assigns the contents of one TcxURL object to another.

procedure Assign(Source: TPersistent); override;

Description

Use the Assign method to copy the contents of one TcxURL object to another.  The Source parameter specifies the source object.  The caller is the destination object.


TcxURL.Write

TcxURL

Renders the contents of the TcxURL object.

procedure Write(AHTMLTextBuilder: TcxHTMLTextBuilder); virtual;

Description

The Write method is used to generate HTML code corresponding to the TcxURL object’s contents.  HTML code is written to the inner buffer of the TcxHTMLTextBuilder object passed as the AHTMLTextBuilder parameter.


cxWebIntf Unit Overview
cxWebIntf Unit

Interfaces

IcxCodeProvider

IcxContainerCodeProvider

IcxStylesProvider

IcxWebActions

IcxWebClientData

IcxWebComponentState

IcxWebContainerControl

IcxWebControl

IcxWebDesignerControlNotify

IcxWebEvents

IcxWebModule

IcxWebModuleDesignerNotify

IcxWebPage

IcxWebPageModule

IcxWebScripts

IcxWebTabOrderable

IcxWebValues

Other Types

TcxActionParameters

TcxWebCaption

TcxWebComponentActionProc

TcxWebComponentEventProc

TcxWebComponentEventProcType

TcxWebComponentState

TcxWebComponentStates

TcxWebPositioningType

TcxWebTabOrder

IcxCodeProvider Interface

Hierarchy          Methods

The IcxCodeProvider declares methods to render HTML and JScript code for web components.

Unit

cxWebIntf

IcxCodeProvider = interface(IUnknown)

Description

The IcxCodeProvider declares methods that, when implemented, provide functionality for rendering for HTML and JScript code for individual web components.  The methods of this interface can be classified into two categories.  The first includes methods rendering code for each individual component (control).  The second contains methods that generate code used by all the components (controls) within the same class.

The GetRendererClass method provides a way to delegate the code rendering functionality to a specially designed object.  It is designed to return the class of renderer object used to render a particular component within a specific browser.  The base class for all the renderers is the TcxWebRenderer class.

Most of the methods in the IcxCodeProvider interface have a parameter of type TcxHTMLTextBuilder.  Methods should write the code representing the component to this object using its methods.  The EWF engine transmits the same variable -of type TcxHTMLTextBuilder -to all of the called methods when rendering.  Thus this variable contains the complete text of a generated page at the end of rendering.

For instance, this interface is implemented by the TcxWebComponent and TcxCustomWebDataSource classes.  The TcxWebComponent class delegates the implementation of the IcxCodeProvider interface to the TcxWebRenderHelper class.

Container controls should also implement the IcxContainerCodeProvider interface in order to render its code properly.


IcxCodeProvider Hierarchy
Hierarchy

IUnknown


Methods for IcxCodeProvider
IcxCodeProvider Methods

IcxCodeProvider          Legend

In IcxCodeProvider

GetRendererClass

GetScriptFiles

WriteClassHTML

WriteClassOutOfFormHTML

WriteClassScripts

WriteHiddenFormElements

WriteHTML

WriteOutOfFormHTML

WriteScripts

WriteStyles

WriteXML


IcxCodeProvider.GetRendererClass

IcxCodeProvider          See Also

Designed to return the class of the renderer object used to render HTML code within a specific browser.

function GetRendererClass(Browser: TcxWebBrowserClass): TcxWebRendererClass;

Description

Each component can be rendered by different object types based upon the client browser.  The IcxCodeProvider interface’s methods, when implemented, should call the methods of the appropriate renderer object.  The Browser parameter of this method specifies the client browser type.

This method is implemented by the GetRendererClass method of the TcxWebRenderHelper object.  Please refer to its description for details.


IcxCodeProvider.GetScriptFiles

IcxCodeProvider          See Also

Designed to specify external script files used by a component.

procedure GetScriptFiles(HTMLTextBuilder: TcxHTMLTextBuilder; AList: TStrings);

Description

The GetScriptFiles method is designed to specify the names of JScript external files used by a component.  The strings specifying the file names should be added to the AList parameter.  This can be performed via the Add method of the TStrings class.

The HTMLTextBuilder parameter contains the contents of the web page being generated.  It also provides information about client browser type.

This method is called once for a component class to avoid multiple inclusions of JScript files.  The GetScriptFiles method is sequentially called for each component class available on a web page.  The same variable is transmitted to each called method as an AList parameter.  Thus, the variable contains the complete list of files to include after all the component classes are scanned.

As implemented by the TcxWebCalendar class, the GetScriptFiles method adds a ‘calendar.js’ string to the AList parameter.


IcxCodeProvider.WriteClassHTML

IcxCodeProvider          See Also

Designed to render HTML code, placed within the form, used by all components of a given class.

procedure WriteClassHTML(HTMLTextBuilder: TcxHTMLTextBuilder);

Description

The WriteClassHTML method is designed to render HTML code common to all components of a particular class.  The rendered code is placed within the form (the FORM tag).  The code should be written to the HTMLTextBuilder parameter.  The methods of the TcxHTMLTextBuilder class should be used for this purpose.

The grid control implements the WriteClassHTML method to render the arrows indicating whether the column header can be dropped.  The WtiteClassHTML method is used since several column headers cannot be dragged at the same time.  Thus a single copy of code representing the arrows is required for all grid controls residing on a web page.


IcxCodeProvider.WriteClassOutOfFormHTML

IcxCodeProvider          See Also

Designed to render HTML code, placed outside the form, used by all components of a particular class.

procedure WriteClassOutOfFormHTML(HTMLTextBuilder: TcxHTMLTextBuilder);

Description

The WriteClassHTML method is designed to render HTML code common for all components of a particular class.  The rendered code is placed outside the form (the FORM tag).  The code should be written to the HTMLTextBuilder parameter.  The methods of the TcxHTMLTextBuilder class should be used for this purpose.

This method can be implemented to render HTML elements whose values shouldn’t be transmitted to the server script.  This allows for more efficient client-server data transmission.


IcxCodeProvider.WriteClassScripts

IcxCodeProvider          See Also

Designed to render JScript code used by all components of a given class.

procedure WriteClassScripts(HTMLTextBuilder: TcxHTMLTextBuilder);

Description

The WriteClassScripts method is designed to render JScript code used by all components of a particular class.  The rendered code is placed within the SCRIPT tag.  The code should be written to the HTMLTextBuilder parameter.  The WriteText method of the TcxHTMLTextBuilder class should be used for this purpose.

The WriteClassScripts method is implemented, for instance, by the grid control.  It loads images used by grid controls to its cache.


IcxCodeProvider.WriteHiddenFormElements

IcxCodeProvider          See Also

Designed to write hidden form elements for a particular component.

procedure WriteHiddenFormElements(HTMLTextBuilder: TcxHTMLTextBuilder);

Description

The WriteHiddenFormElements method is designed to render hidden inputs used by components to transmit information to the server script.  The code should be written to the HTMLTextBuilder parameter.  The WriteHiddenField method of the TcxHTMLTextBuilder class should be used for this purpose.

The WriteHiddenFormElements method is implemented by the tree view control.  It renders a hidden input containing the state of the control’s nodes.  This allows a tree view control to refresh its state each time a web page is reloaded.


IcxCodeProvider.WriteHTML

IcxCodeProvider          See Also

Designed to render HTML code representing a component.

procedure WriteHTML(HTMLTextBuilder: TcxHTMLTextBuilder);

Description

The WriteHTML method is designed to write HTML code representing the component on a web page.  The rendering of the component’s appearance should be implemented in this method.  The code should be written to the HTMLTextBuilder parameter.  The methods of the TcxHTMLTextBuilder class should be used for this purpose.


IcxCodeProvider.WriteOutOfFormHTML

IcxCodeProvider          See Also

Designed to render HTML code, placed outside the form, for a component.

procedure WriteOutOfFormHTML(HTMLTextBuilder: TcxHTMLTextBuilder);

Description

The WriteOutOfFormHTML method is designed to write HTML code for a particular component.  The rendered code is placed outside the form.  The code should be written to the HTMLTextBuilder parameter.  The methods of the TcxHTMLTextBuilder class should be used for this purpose.

The WriteOutOfFormHTML method is implemented by the grid control.  It renders column headers to implement column header dragging.


IcxCodeProvider.WriteScripts

IcxCodeProvider          See Also

Designed to render JScript code for a particular component.

procedure WriteScripts(HTMLTextBuilder: TcxHTMLTextBuilder);

Description

The WriteScripts method is used to render JScript code required for proper functionality of a specific  component.  The code should be written to the HTMLTextBuilder parameter.  The WriteText method of the TcxHTMLTextBuilder class should be used for this purpose.


IcxCodeProvider.WriteStyles

IcxCodeProvider          See Also

Designed to render styles provided by the component class to change the default look and feel of components.

procedure WriteStyles(HTMLTextBuilder: TcxHTMLTextBuilder);

Description

The WriteStyles method is designed to write HTML code representing styles used by components of the same class.  The generated style is used to change the default look and feel of components.

The code should be written to the HTMLTextBuilder parameter.  The methods of the TcxHTMLTextBuilder class should be used for this purpose.


IcxCodeProvider.WriteXML

IcxCodeProvider

Designed to write XML code for the component.

procedure WriteXML(HTMLTextBuilder: TcxHTMLTextBuilder);

Description

When implemented, the WriteXML method should write XML code required for a component’s proper functionality.  The code should be written to the HTMLTextBuilder parameter.  The methods of the TcxHTMLTextBuilder class should be used for this purpose.


IcxContainerCodeProvider
IcxContainerCodeProvider Interface

Hierarchy          Methods

The IcxContainerCodeProvider interface declares methods designed to render container controls.

Unit

cxWebIntf

IcxContainerCodeProvider = interface(IUnknown)

Description

Container controls should implement the IcxContainerCodeProvider interface together with IcxCodeProvider.  The methods of the IcxContainerCodeProvider interface are implemented to render HTML code placed before and after code representing its child controls.  The TcxWebPanel control implements this interface.

The presence of two methods is explained by the HTML and template file structure.  The opening and closing container control tags (<ewf: > and </ewf: >) correspond to the return values of the WriteBeginHTML and WriteEndHTML methods of the IcxContainerCodeProvider interface.  Note that container controls can accommodate any HTML code within their area due to this structure.


IcxContainerCodeProvider Hierarchy
Hierarchy

IUnknown


Methods for IcxContainerCodeProvider
IcxContainerCodeProvider Methods

IcxContainerCodeProvider          Legend

In IcxContainerCodeProvider

WriteBeginHTML

WriteEndHTML


IcxContainerCodeProvider.WriteBeginHTML

IcxContainerCodeProvider          See Also

Designed to render the HTML code preceding child control code and contained HTML code.

procedure WriteBeginHTML(HTMLTextBuilder: TcxHTMLTextBuilder);

Description

Container controls can have a number of child controls and custom HTML code placed within them.  The WriteBeginHTML method is designed to render HTML code preceding the code representing child controls and custom HTML.  The code should be written to the HTMLTextBuilder parameter.  The methods of the TcxHTMLTextBuilder class should be used for this purpose.


IcxContainerCodeProvider.WriteEndHTML

IcxContainerCodeProvider          See Also

Designed to render the HTML code following child control code and contained HTML code.

procedure WriteEndHTML(HTMLTextBuilder: TcxHTMLTextBuilder);

Description

Container controls can have a number of child controls and custom HTML code placed within them.  The WriteEndHTML method is designed to render HTML code following the code representing child controls and custom HTML.  The code should be written to the HTMLTextBuilder parameter.  The methods of the TcxHTMLTextBuilder class should be used for this purpose.


IcxDesignCodeProvider
IcxDesignCodeProvider Interface

Hierarchy          Methods

Should be implemented by components to provide design-time rendering.

Unit

cxWebIntf

IcxDesignCodeProvider = interface(IUnknown)

Description

When used within the HTML designer, components should provide HTML code representing themselves at design-time.  This is done by implementing the methods of the IcxDesignCodeProvider interface.


IcxDesignCodeProvider Hierarchy
Hierarchy

IUnknown


Methods for IcxDesignCodeProvider
IcxDesignCodeProvider Methods

IcxDesignCodeProvider          Legend

In IcxDesignCodeProvider

GetRendererClass

WriteHTML


IcxDesignCodeProvider.GetRendererClass

IcxDesignCodeProvider

Designed to return the class of renderer object used to render HTML code to represent a component within the designer.

function GetRendererClass: TcxWebRendererClass;

Description

When implemented, the GetRendererClass method should return the type of object used to render HTML code representing the component in the designer.  Note, that rendering the code for designer is identical to rendering HTML code for Internet Explorer 6.0.


IcxDesignCodeProvider.WriteHTML

IcxDesignCodeProvider

Designed to generate HTML code representing the component.

procedure WriteHTML(HTMLTextBuilder: TcxHTMLTextBuilder);

Description

The WriteHTML method is designed to write HTML code representing the component within the designer.  The rendering of the component’s appearance should be implemented in this method.  The code should be written to the HTMLTextBuilder parameter.  The methods of the TcxHTMLTextBuilder class should be used for this purpose.


IcxStylesProvider
IcxStylesProvider Interface

Hierarchy          Methods

Should be implemented by components that provide styles used by other components.

Unit

cxWebIntf

IcxStylesProvider = interface(IUnknown)

Description

Components providing styles for other components are used to avoid code duplication when assigning the same style to several components.  Such components should implement the IcxStylesProvider interface to render the HTML code for the styles they provide.

The IcxStylesProvider interface is implemented by the TcxWebStyleController component.


IcxStylesProvider Hierarchy
Hierarchy

IUnknown


Methods for IcxStylesProvider
IcxStylesProvider Methods

IcxStylesProvider          Legend

In IcxStylesProvider

WriteStyles


IcxStylesProvider.WriteStyles

IcxStylesProvider

Designed to generate HTML code representing styles provided by a component.

procedure WriteStyles(HTMLTextBuilder: TcxHTMLTextBuilder);

Description

Components providing styles for other components are used to avoid code duplication when assigning the same style to several components.  Such components should implement the WriteStyles method of the IcxStylesProvider interface.  This method is designed to render HTML representations of styles provided by the component.

The code should be written to the HTMLTextBuilder parameter.  The methods of the TcxHTMLTextBuilder class should be used for this purpose.


IcxWebActions
IcxWebActions Interface

Hierarchy          Methods

Should be implemented by components to perform server side event handling.

Unit

cxWebIntf

IcxWebActions = interface(IUnknown)

Description

Components should implement the IcxWebActions interface in order to support server-side handlers for client side events.  In other words, this interface should be supported by those components that contain events that are invoked by end-user actions.

Implementing the IcxWebActions interface is necessary but not a sufficient condition for supporting server-side event handlers.  Components should also perform their rendering in the manner described here.  Each client-side event, which should invoke a server-side handler, has to submit the form after it has populated necessary hidden input fields.  These are the __TARGETNAME and __ACTIONNAME hidden inputs.  The inputs should contain the name of the component responsible for event handling and the name of the action performed (with parameters) respectively.  Parameters should be separated from the action name and each other by a colon.

Each time a request arrives to the server script, the following actions are performed to implement server-side event handling.

•	the value of the __TARGETNAME hidden input is used to determine the component responsible for event handling.  A reference to the IcxWebActions interface implemented by the component is obtained;

•	the RegisterActions method of the interface is called to perform preparatory actions before handling the event;

•	the DoPerformAction method of the interface is called in order to handle the event.  The name of the action and its parameters are transmitted to it.  These are obtained from the __ACTIONNAME hidden input field;

•	the ClearActions method of the interface is called in order to perform clean-up actions after the event has been handled.

The IcxWebActions interface is implemented by the TcxWebComponent class (and thus its descendants).  The TcxWebComponent class partially delegates the implementation of this interface to the TcxWebActionsHelper class.

Note: If an event handler requires the information about key presses, the __SHIFTSTATE hidden input should be populated by the corresponding client-side event handler.


IcxWebActions Hierarchy
Hierarchy

IUnknown


Methods for IcxWebActions
IcxWebActions Methods

IcxWebActions          Legend

In IcxWebActions

ClearActions

DoPerformAction

RegisterActions


IcxWebActions.ClearActions

IcxWebActions          See Also

Designed to perform clean-up actions after server-side events are handled.

procedure ClearActions;

Description

The ClearActions method should be implemented to perform clean-up actions after the server-side event is handled, if necessary.  This is necessary to free resources allocated in the RegisterActions method, which is called before event handling.

The TcxWebComponent class delegates the implementation of the ClearActions method to the TcxWebActionsHelper class.  As implemented, the ClearActions method frees the list of actions and corresponding handlers.  This list is created in the RegisterActions method, implemented by each component in its own manner.


IcxWebActions.DoPerformAction

IcxWebActions          See Also

Designed to process an action.

procedure DoPerformAction(const ActionName: string; const ActionParameters: TcxActionParameters);

Description

If a component is properly rendered, client side events requiring server side handling submit the form.  The __ACTIONNAME hidden input field is populated with a proper value beforehand.  The DoPerformAction method is designed to process an action specified by the value of the __ACTIONNAME input.  Processing an action implies determining the event by the action name and running the appropriate handler.

The __ACTIONNAME input can also contain a number of parameters separated from action name and each other by a colon.  Additional parameters, specifying the keys pressed when an event was invoked, are transmitted within the __SHIFTSTATE hidden input.  All the parameters are transmitted to the DoPerformAction method in the ActionParameters parameter.  The ActionName parameter contains only the name of the action, which should be processed.

The TcxWebComponent class delegates the implementation of the DoPerformAction method to the TcxWebActionsHelper class.  As implemented, the DoPerformAction method searches for the handler assigned to the action and runs it.  Handlers are assigned to the actions by the RegisterActions method, which creates an appropriate list of correspondence.  The last method is implemented by each component in its own manner.


IcxWebActions.RegisterActions

IcxWebActions          See Also

Designed to perform preliminary actions before a server-side event is handled.

procedure RegisterActions;

Description

The RegisterActions method should be implemented to perform preliminary actions before the server-side event is handled, if necessary.  The ClearActions method should be implemented to free resources allocated in this method.

The RegisterActions method is implemented by each component in its own manner.  These overridden methods, however, have a common feature.  Each of them creates a list of action names with corresponding handlers.  This allows the DoPerformAction method to determine the appropriate handler for the action and run it.  The list is freed within the ClearActions method.


IcxWebClientData
IcxWebClientData Interface

Hierarchy          Methods

Should be implemented by page module classes to provide information from the client side of an application.

Unit

cxWebIntf

IcxWebClientData = interface(IUnknown)

Description

A page module provides information from the client side of your application to other classes.  This information is accessed via the IcxWebClientData interface’s methods.  Each method, when implemented, returns a client-side application's characteristics.  These characteristics are browser type, the position to which the page is scrolled, the active control, the pressed key set, etc.

The IcxWebClientData interface is implemented by the TcxWebPageModule class.


IcxWebClientData Hierarchy
Hierarchy

IUnknown


Methods for IcxWebClientData
IcxWebClientData Methods

IcxWebClientData          Legend

In IcxWebClientData

GetActiveControl

GetBrowser

GetIsFirstRequest

GetLeftPos

GetReferer

GetShiftState

GetTopPos

SetActiveControl

SetLeftPos

SetShiftState

SetTopPos


IcxWebClientData.GetActiveControl

IcxWebClientData          See Also

Designed to return an interface representing the currently active control.

function GetActiveControl: IcxWebControl;

Description

The GetActiveControl method is designed to provide information on the currently active control.  When implemented, this method returns a reference to the IcxWebControl interface implemented by the control.  When the end user selects it on a web page, the control’s name is written to a special hidden input.  This allows the server side of the application to determine the currently active control.


IcxWebClientData.GetBrowser

IcxWebClientData          See Also

Designed to return the client browser type.

function GetBrowser: TcxWebBrowserClass;

Description

When working with web applications you can use a number of different browsers.  The client browser type affects HTML code generated to represent controls on a web page.  The GetBrowser method is designed to provide information about the browser type the end user utilizes. It is retrieved from the request string.


IcxWebClientData.GetIsFirstRequest

IcxWebClientData          See Also

Designed to determine whether the same page was previously requested.

function GetIsFirstRequest: Boolean;

Description

The GetIsFirstRequest method is designed to return a value indicating whether the same page was previously requested.  If so, it returns True; False otherwise.  When implemented, this method allows the server script to determine whether the form state should be loaded.  If the same page was requested previously, the changes made by the end user are applied to the page.  Otherwise, the requested page is loaded in its initial state (retrieved from the DFM file).


IcxWebClientData.GetLeftPos

IcxWebClientData          See Also

Designed to return the left position of the form within a page.

function GetLeftPos: Integer;

Description

Use the GetLeftPos method to return the left position of the form within a web page.  This method sets an additional offset each control has relative to the left edge of the page.


IcxWebClientData.GetReferer

IcxWebClientData          See Also

Designed to return information on the internal module’s name aggregated with the path info section of the URL specifying the location of a message.

function GetReferer: string;

Description

Utilize this method to obtain the current module’s name specifying the name of a Web server application and the path info section of the URL, which identifies the location of the message.


IcxWebClientData.GetScrollLeft

IcxWebClientData

Designed to return the horizontal scrolling offset of a page.

function GetScrollLeft: Integer;

Description

The GetScrollLeft method is designed to determine the horizontal scrolling offset of the current page.  The horizontal scrolling offset is written to a special hidden input field each time the form is submitted.  When implemented, the GetScrollLeft method is used to access a value that allows the server script to restore its position within the page.


IcxWebClientData.GetScrollTop

IcxWebClientData

Designed to return the vertical scrolling offset of a page.

function GetScrollTop: Integer;

Description

The GetScrollTop method is designed to determine the vertical scrolling offset of the current page.  The vertical scrolling offset is written to a special hidden input field each time the form is submitted.  When implemented, the GetScrollTop method is used to access a value that allows the server script to restore its position within the page.


IcxWebClientData.GetShiftState

IcxWebClientData          See Also

Designed to determine which of the SHIFT, ALT and CTRL keys were pressed on post back.

function GetShiftState: Integer;

Description

The GetShiftState method is designed to determine which of the SHIFT, ALT and CTRL keys were pressed on post back.  The result is an integer value representing a bit mask of shift states.

Bit Mask	Explanation
1	The Alt key was pressed on post back.
2	The Ctrl key was pressed on post back.
4	The Shift key was pressed on post back.

If several keys were pressed on post back, the return value will be the sum of corresponding bit masks.  For instance, if the ALT and CTRL keys were pressed, the GetShiftState method returns 3.

Information on the keys pressed is written to a special hidden input field each time the form is submitted.


IcxWebClientData.GetTopPos

IcxWebClientData          See Also

Designed to return the top position of the form within a page.

function GetTopPos: Integer;

Description

Implement the GetTopPos method to return the top position of the form within a web page.  This method sets an additional offset each control has relative to the top edge of the page.


IcxWebClientData.GetValues

IcxWebClientData

Designed to return a list of values required by individual controls to update themselves and thus to reflect changes made at the client side.

function GetValues: TStrings;

Description

Implement the GetValues method to return field values for the request message registered by controls.  These values are necessary to update controls to respond to those changes made by the end user.  Values are registered and assigned to control properties via implemented methods of the IcxWebValues interface.


IcxWebClientData.SetActiveControl

IcxWebClientData          See Also

Designed to activate a specific control (focus).

procedure SetActiveControl(const AValue: IcxWebControl);

Description

Implement this method to activate a specific control (focus).  A control is specified by a reference to the IcxWebControl interface it implements via the AValue parameter.


IcxWebClientData.SetLeftPos

IcxWebClientData          See Also

Designed to set the left position of the form within a page.

function SetLeftPos(const Value: Integer);

Description

Implement the SetLeftPos method to set the left position of the form within a web page.  This method sets an additional offset each control has relative to the left edge of the page.


IcxWebClientData.SetShiftState

IcxWebClientData          See Also

Used to obtain information on the keys pressed by a user.

procedure SetShiftState(const Value: Integer);

Description

The SetShiftState method is implemented to assign a value, specifying the keys pressed by a user, to an internal variable.  The information is retrieved from a request message.  It is transmitted to the method as a Value parameter.

The parameter specifies a bit mask of shift states.  The following is a table of correspondences between the bit masks and their meanings.

Bit Mask	Explanation
1	The Alt key was pressed on post back.
2	The Ctrl key was pressed on post back.
4	The Shift key was pressed on post back.

This method appropriately populates the SHIFTSTATE hidden field.


IcxWebClientData.SetTopPos

IcxWebClientData          See Also

Designed to set the top position of the form within a page.

function SetTopPos(const Value: Integer);

Description

Implement the SetTopPos method to specify the top position of the form within a web page.  This method sets an additional offset each control has relative to the top edge of the page.


IcxWebComponentState
IcxWebComponentState Interface

Hierarchy          Properties          Methods

Implemented by web components to provide additional information on their states.

Unit

cxWebIntf

IcxWebComponentState = interface(IUnknown)

Description

Since classes representing web components are descendants of the TComponent class, you can determine the state of a web component via the ComponentState property.  EWF provides one more possible state for a web component.  Web components load their values from a request message after being created.  Thus, the IcxWebComponentState interface declares the State property used to implement an additional state control for web components.

The IcxWebComponentState is implemented by the TcxWebComponent class.


IcxWebComponentState Hierarchy
Hierarchy

IUnknown


Properties for IcxWebComponentState
IcxWebComponentState Properties

IcxWebComponentState          Legend

In IcxWebComponentState

State


Methods for IcxWebComponentState
IcxWebComponentState Methods

IcxWebComponentState          Legend

In IcxWebComponentState

GetState

SetState


IcxWebComponentState.State

IcxWebComponentState          See Also

Designed to determine whether a specific component loads its values from a request message.

TcxWebComponentState = (wcsLoading);

TcxWebComponentStates = set of TcxWebComponentState;

property State: TcxWebComponentStates;

Description

The State property is designed to provide information on whether values of a specific component are being loaded from a request message.  You should implement the GetState and SetState methods.

When implemented, you should not set the State property value manually.  It is set to wscLoading when the component’s values are being loaded from the request.  When this process is completed, the State property is automatically cleared.


IcxWebComponentState.GetState

IcxWebComponentState          See Also

Designed to return the State property value.

TcxWebComponentState = (wcsLoading);

TcxWebComponentStates = set of TcxWebComponentState;

function GetState: TcxWebComponentStates;

Description

Implement this function to provide the correct functioning of the State property.  The GetState method returns a value set by the SetState method.


IcxWebComponentState.SetState

IcxWebComponentState          See Also

Designed to set the State property value.

TcxWebComponentState = (wcsLoading);

TcxWebComponentStates = set of TcxWebComponentState;

procedure SetState(Value: TcxWebComponentStates);

Description

Implement this function to provide the correct functioning of the State property.  The GetState method should return a value set by the SetState method.


IcxWebContainerControl
IcxWebContainerControl Interface

Hierarchy          Properties             Methods

Implemented by container controls to manage the controls stored within them.

Unit

cxWebIntf

IcxWebContainerControl = interface(IUnknown)

Description

EWF checks whether a control supports the IcxWebContainerControl interface to determine whether it is a container.  It uses the implemented methods of this interface to manage controls stored within it.

The IcxWebContainerControl interface is implemented by the TcxWebPageModule and TcxWebContainerControl (the TcxWebPanel ancestor) classes.

Note that container controls also implement the IcxContainerCodeProvider interface.


IcxWebContainerControl Hierarchy
Hierarchy

IUnknown


Properties for IcxWebContainerControl
IcxWebContainerControl Properties

IcxWebContainerControl          Legend

In IcxWebContainerControl

ControlContainerCount

ControlContainers

ControlCount

Controls

Parent


Methods for IcxWebContainerControl
IcxWebContainerControl Methods

IcxWebContainerControl          Legend

In IcxWebContainerControl

CanAcceptsControls

ContainsControl

GetClientLeft

GetClientTop

GetControl

GetControlContainer

GetControlContainerCount

GetControlCount

GetParent

GetTabOrderList

IndexOf

InsertControl

RemoveControl

SetTabOrderList

TabOrderOf

UpdateControlsPosition

UpdateTabOrder


IcxWebContainerControl.ControlContainerCount

IcxWebContainerControl          See Also

Designed to return the number of child container controls.

property ControlContainerCount: Integer;

Description

The ControlContainerCount property is designed to return the number of child container controls.  The GetControlContainerCount method should be implemented for this purpose.  Utilize the ControlContainers property to access child containers by their indexes.

ReadOnly Property


IcxWebContainerControl.ControlContainers

IcxWebContainerControl          See Also

Designed to access the first-level child container controls by their indexes.

property ControlContainers[Index:Integer]: IcxWebContainerControl;

Description

The ControlContainers property is designed to return a reference to the IcxWebContainerControl interface implemented by a specific child container control.  Use the Index parameter to specify its index.  Control indexing should be zero-based.  The GetControlContainer method should be implemented to provide correct functioning of the ControlContainers property.

ReadOnly Property


IcxWebContainerControl.ControlCount

IcxWebContainerControl          See Also

Designed to return the number of child controls.

property ControlCount: Integer;

Description

The ControlContainerCount property is designed to return the number of child controls.  These controls can either be containers or not.  The GetControlCount method should be implemented for this purpose.

Use the Controls property to access all child controls by their indexes.

ReadOnly Property


IcxWebContainerControl.Controls

IcxWebContainerControl          See Also

Designed to access all first-level child controls by their indexes.

property Controls[Index:Integer]: IcxWebControl;

Description

The Controls property is designed to return a reference to the IcxWebControl interface implemented by a specific child control.  Use the Index parameter to specify its index.  Control indexing should be zero-based.  The GetControl method should be implemented to provide correct functioning of the Controls property.

ReadOnly Property


IcxWebContainerControl.Parent

IcxWebContainerControl          See Also

Designed to return the parent of a container control.

property Parent: IcxWebContainerControl;

Description

The Parent property is designed to return a reference to the IcxWebContainerControl interface implemented by its parent control.  A parent control visually contains its children and is responsible for writing them to a stream when the form is saved.

The GetParent method should be implemented to provide the Parent property’s correct functionality.

Container controls can also support the IcxWebControl interface, which also provides its Parent property.  This property is not read-only, thus can be set manually when implemented.  This property value can also be automatically set via the InternalSetParent method of the IcxWebControl interface.

It is enough to return the value of the implemented Parent property of the IcxWebControl interface when accessing the Parent property of the IcxWebContainerControl interface.  You can perform this by implementing the GetParent method.

ReadOnly Property


IcxWebContainerControl.CanAcceptsControls

IcxWebContainerControl          See Also

Designed to return a value indicating whether the container control can accept child controls.

function CanAcceptsControls: Boolean;

Description

The CanAcceptControls method is designed to determine whether the container can accept child controls at the moment.  When implemented it returns True when controls can be placed onto it.  Otherwise, it returns False.


IcxWebContainerControl.ContainsControl

IcxWebContainerControl          See Also

Designed to determine whether the container contains a specific control.

function ContainsControl(const AControl: IcxWebControl): Boolean;

Description

The ContainsControl method is designed to indicate whether a specific control is a child of the container control.  The AControl parameter specifies the tested control by a reference to the implemented IcxWebControl interface.  When implemented, the ContainsControl method returns True, if the specified control appears within the child list.  Otherwise, it returns False.


IcxWebContainerControl.GetClientLeft

IcxWebContainerControl

Designed to return the horizontal offset child controls have relative to the container’s left edge.

function GetClientLeft: Integer;

Description

Implement the GetClientLeft method to return a value determining the horizontal offset of child controls relative to their container’s edge.  If child controls do not contain the mentioned offset, this method returns 0.


IcxWebContainerControl.GetClientTop

IcxWebContainerControl

Designed to return the vertical offset child controls have relative to the container’s top edge.

function GetClientTop: Integer;

Description

Implement the GetClientTop method to return a value determining the vertical offset of child controls relative to their container’s edge.  If child controls do not have the mentioned offset, this method returns 0.


IcxWebContainerControl.GetControl

IcxWebContainerControl          See Also

Designed to return the Controls property value.

function GetControl(Index: Integer): IcxWebControl;

Description

The GetControl method is designed to be a ‘read’ of the Controls property.  When implemented, it provides access to stored controls by their indexes.  The Index parameter specifies the index of the accessed item.  Note: indexing must be zero-based.


IcxWebContainerControl.GetControlContainer

IcxWebContainerControl          See Also

Designed to return the ControlContainers property value.

function GetControlContainer(Index: Integer): IcxWebContainerControl;

Description

The GetControlContainer method is designed to be a ‘read’ of the ControlContainers property.  When implemented, it provides access to stored containers by their indexes.  The index of the accessed item is specified by the Index parameter.

Note: indexing must be zero-based.


IcxWebContainerControl.GetControlContainerCount

IcxWebContainerControl          See Also

Designed to return the ControlContainerCount property value.

function GetControlContainerCount: Integer;

Description

The GetControlContainerCount property is designed to be a ‘read’ of the ControlContainerCount property.  When implemented, it returns the number of child containers, i.e. it returns the number of items within the ControlContainers collection.


IcxWebContainerControl.GetControlCount

IcxWebContainerControl          See Also

Designed to return the ControlCount property value.

function GetControlCount: Integer;

Description

The GetControlCount property is designed to be a ‘read’ of the ControlCount property.  When implemented, it returns the number of child controls, i.e. it returns the number of items within the Controls collection.


IcxWebContainerControl.GetParent

IcxWebContainerControl          See Also

Designed to return the Parent property value.

function GetParent: IcxWebContainerControl;

Description

The GetParent function is designed to be a ‘read’ of the Parent property.  When implemented, it returns a reference to the IcxWebContainerControl interface implemented by the parent control.

Since the IcxWebControl also declares the Parent property, both properties can reference the same field, when implemented.


IcxWebContainerControl.GetTabOrderList

IcxWebContainerControl          See Also

Designed to return a list of child controls gradated by their tab order.

procedure GetTabOrderList(const AList: TList);

Description

The GetTabOrderList method is designed to obtain the list of first-level child controls.  Controls in the list should be gradated by their tab order.


IcxWebContainerControl.IndexOf

IcxWebContainerControl          See Also

Designed to return the index of a specific control within the Controls collection.

function IndexOf(const AControl: IcxWebControl): Integer;

Description

The IndexOf method is designed to determine the index of a specific control in the Controls collection.  The AControl parameter specifies this control by a reference to the implemented IcxWebControl interface.  The IndexOf method must be implemented zero-based.  It returns –1 if the specified control is not in the list.


IcxWebContainerControl.InsertControl

IcxWebContainerControl          See Also

Designed to add a specific control to the child controls collection.

procedure InsertControl(const AControl: IInterface);

Description

The InsertControl method is designed to add a specific control to the child controls collection.  The control to add is specified by the AControl parameter.

Note that if the added control is a container, it should be added both to the Controls and ControlContainers collections.  Otherwise, it will be added to the Controls collection only.


IcxWebContainerControl.RemoveControl

IcxWebContainerControl          See Also

Designed to remove a specific control from the child controls collection.

procedure RemoveControl(const AControl: IInterface);

Description

The RemoveControl method is designed to delete a specific control from the child controls collection.  The control to remove is specified by the AControl parameter.

Note that if the deleted control is a container, it should be removed from both the Controls and ControlContainers collections.  Otherwise, it will be removed from the Controls collection only.


IcxWebContainerControl.SetTabOrderList

IcxWebContainerControl          See Also

Designed to rearrange tab orders of child controls.

procedure SetTabOrderList(const AList: TList);

Description

The SetTabOrderList method is designed to update tab orders of child controls.  Tab orders are set with respect to the position of a control in the ordered list.  This list is transmitted to the SetTabOrderList method as a parameter.

The first control in the list receives a tab order of 0, etc.


IcxWebContainerControl.TabOrderOf

IcxWebContainerControl          See Also

Designed to determine the tab order value of a specific child control.

function TabOrderOf(const AControl: IcxWebControl): Integer;

Description

The TabOrderOf method is designed to determine the tab order position of a specific control.  The AControl parameter specifies the control by a reference to the implemented IcxWebControl interface.


IcxWebContainerControl.UpdateControlsPosition

IcxWebContainerControl

Designed to update the position of child controls.

procedure UpdateControlsPosition;

Description

Implement the UpdateControlsPosition method to respond to child controls layout changes.  Perform necessary operations to update child controls’ positions in the implemented method.


IcxWebContainerControl.UpdateTabOrder

IcxWebContainerControl          See Also

Designed to change the tab order index of a specific child control.

TcxWebTabOrder = -1..32766;

procedure UpdateTabOrder(ACurIndex, ANewIndex: TcxWebTabOrder);

Description

The UpdateTabOrder method is designed to change the tab order index of a specific web control.  The ACurIndex parameter specifies the control by its previous tab order.  The ANewIndex parameter specifies a new tab order of the web control.

Make certain to handle situations when the ANewIndex parameter value is negative or more than the last available tab order value.  The control, whose tab order is the ANewIndex value, receives the tab index equal to the ACurIndex parameter value.


IcxWebControl
IcxWebControl Interface

Hierarchy          Properties             Methods

The IcxWebControl interface declares properties and methods required for the EWF control’s proper functionality.

Unit

cxWebIntf

IcxWebControl = interface(IUnknown)

Description

Implement the methods and properties listed in the IcxWebControl interface to provide proper functioning of the designed web control.

The IcxWebControl interface is implemented by the TcxWebControl class.


IcxWebControl Hierarchy
Hierarchy

IUnknown


Properties for IcxWebControl
IcxWebControl Properties

IcxWebControl          Legend

In IcxWebControl

BoundsRect

DesignerControl

Parent

TabOrder

TabStop

Visible

ZIndex


Methods for IcxWebControl
IcxWebControl Methods

IcxWebControl          Legend

In IcxWebControl

GetBoundsRect

GetDesignerControl

GetInternalTabOrder

GetParent

GetTabOrder

GetTabStop

GetVisible

GetZIndex

InternalSetParent

SetBoundsRect

SetDesignerControl

SetParent

SetVisible

UpdateControlPosition


IcxWebControl.BoundsRect

IcxWebControl          See Also

Designed to specify the bound rectangle for a specific web control.

property BoundsRect: TRect;

Description

Implement the BoundsRect property to specify the bounding rectangle for a specific web control, expressed in the coordinate system of the parent control.  Implement the SetBoundsRect and GetBoundsRect methods used to set and get this property’s value.


IcxWebControl.DesignerControl

IcxWebControl          See Also

Designed to specify a reference to the interface used to notify the designer of changes to a web control.

property DesignerControl: IcxWebDesignerControlNotify;

Description

The DesignerControl property returns a reference to the methods that notify the designer that a specific web control has been changed.


IcxWebControl.Parent

IcxWebControl

Designed to specify the parent for a control.

property Parent: IcxWebContainerControl;

Description

Implement the Parent property to get or set the parent for a web control.  The parent is the control’s container.  The returned parent control is specified by a reference to the IcxWebContainerControl interface it implements.


IcxWebControl.TabOrder

IcxWebControl          See Also

Designed to specify the position of a control in its parent's tab order.

TcxWebTabOrder = -1..32766;

property TabOrder: TcxWebTabOrder;

Description

Tab order is the order in which child windows are visited when a user presses the Tab key. The control with the TabOrder value of 0 is a control that has focus when the web page appears first.

Initially, the tab order is the order in which controls are added to a page. The first control added to the page has a TabOrder value of 0, the second of 1, the third of 2, and etc.

Each control has a unique tab-order value within its parent.  If the TabOrder property value of one control is changed to be the same as the value of the second control, the TabOrder value for all other controls will be changed.

The TabOrder property is meaningful if the TabStop property is True and the control has a parent.  A control with a TabOrder of -1 has no parent, and therefore cannot be reached by pressing the Tab key.  To remove a parented control from the Tab order, its TabStop property should be set to False.

ReadOnly Property


IcxWebControl.TabStop

IcxWebControl          See Also

Designed to specify whether a user can tab to a control.

property TabStop: Boolean;

Description

Implement the TabStop property to allow or disallow access to a control using the Tab key.  If the TabStop property is True, the control is included in the tab order.  If it is False, the control is excluded from the tab order and a user can tab to it.

ReadOnly Property


IcxWebControl.Visible

IcxWebControl

Designed to specify whether a control is visible.

property Visible: Boolean;

Description

Implement the Visible property to specify the visibility for a control.


IcxWebControl.ZIndex

IcxWebControl

Designed to specify the stack order for a web control.

property ZIndex: Integer;

Description

Implement the ZIndex property to specify the stack order for a web control.  This property value specifies the order in which web controls should be drawn when two or more controls occupy the same area.  Setting the ZIndex property is useful whenever you have absolute positioned web controls that overlap other web controls on the web page.

ReadOnly Property


IcxWebControl.GetBoundsRect

IcxWebControl          See Also

Designed to return the BoundsRect property value.

function GetBoundsRect: TRect;

Description

The GetBoundsRect function is used by the BoundsRect property as a read method to specify the bound rectangle of a control, expressed in the coordinate system of the parent control.


IcxWebControl.GetDesignerControl

IcxWebControl          See Also

Designed to return the DesignerControl property value.

function GetDesignerControl: IcxWebDesignerControlNotify;

Description

The GetDesignerControl method is used to return the DesignerControl property value.


IcxWebControl.GetInternalTabOrder

IcxWebControl          See Also

Designed to return the internal tab order for a control.

function GetInternalTabOrder: TcxWebTabOrder;

Description

Implement the GetInternalTabOrder method to return the tab order position of a control.  Unlike the GetTabOrder method, which is designed to return the tab order of a control within its parent list, the GetInternalTabOrder method returns a value set assigned to the TabOrder property.


IcxWebControl.GetParent

IcxWebControl          See Also

Designed to return the Parent property value.

function GetParent: IcxWebContainerControl;

Description

Implement the GetParent function to read the Parent property value.  This method returns a reference to the IcxWebContainerControl interface implemented by the parent control.


IcxWebControl.GetTabOrder

IcxWebControl          See Also

Designed to return the TabOrder property value.

function GetTabOrder: TcxWebTabOrder;

Description

Implement the GetTabOrder method to return the tab order for a control.  Unlike the GetInternalTabOrder method, this method is designed to read the returned value from the parent’s tab order.


IcxWebControl.GetTabStop

IcxWebControl          See Also

Designed to return the TabStop property value.

function GetTabStop: Boolean;

Description

The GetTabStop function is used to return the TabStop property value.  This value determines whether a user can tab to a control.


IcxWebControl.GetVisible

IcxWebControl          See Also

Designed to return the Visible property value.

function GetVisible: Boolean;

Description

The GetVisible function is used to read the Visible property value.  This value determines whether a control is currently visible.


IcxWebControl.GetZIndex

IcxWebControl

Designed to return the ZIndex property value.

function GetZIndex: Integer;

Description

The GetZIndex function is used to read the ZIndex property value.  This value determines the stack order for a control.


IcxWebControl.InternalSetParent

IcxWebControl          See Also

Designed to assign a specific parent control.

procedure InternalSetParent(const Value: IcxWebContainerControl);

Description

The InternalSetParent method is designed to assign a container for a web control.  The Value parameter specifies the assigned container by a reference to the IcxWebContainerControl interface.


IcxWebControl.SetBoundsRect

IcxWebControl          See Also

Designed to set the BoundsRect property value.

procedure SetBoundsRect(const Value: TRect);

Description

The SetBoundsRect method is used by the BoundsRect property as a read method to specify the bound rectangle of a control, expressed in the coordinate system of the parent control.

The Value parameter determines new rectangular dimensions of a web control.


IcxWebControl.SetDesignerControl

IcxWebControl          See Also

Designed to set the DesignerControl property value.

procedure SetDesignerControl(const Value: IcxWebDesignerControlNotify);

Description

The SetDesignerControl method is used by the DesignerControl property to set its value.  This property returns the interface that notifies the designer of changes to it.


IcxWebControl.SetParent

IcxWebControl          See Also

Designed to set the Parent property value.

procedure SetParent(const Value: IcxWebContainerControl);

Description

The SetParent method is used by the Parent property to set its value.  This property specifies the container for a control.  The Value parameter specifies a new parent for the control.


IcxWebControl.SetVisible

IcxWebControl          See Also

Designed to set the Visible property value.

procedure SetVisible(const Value: Boolean);

Description

The SetVisible method is used by the Visible property to set its value.


IcxWebControl.UpdateControlPosition

IcxWebControl

Designed to rearrange web controls so that they do not overlap.

procedure UpdateControlPosition;

Description

The UpdateControlPosition method should be implemented to update the position of web controls so that they do not overlap.  This method is called when the control changes its visibility state or after it has been resized.


IcxWebControlAttributes
IcxWebControlAttributes Interface

Hierarchy          Methods

Implemented by web controls to support assigning attributes to stored tags.

Unit

cxWebIntf

IcxWebControlAttributes = interface(IUnknown)

Description

Each web control is rendered within a tag, for instance the DIV tag.  Custom attributes can be thus applied to the container tag to affect the entire contents of the tag (all consistent parts of the control).  If a control implements the IcxWebControlAttributes interface, attributes can be assigned to its container tag when necessary.


IcxWebControlAttributies Hierarchy
Hierarchy

IUnknown


Methods for IcxWebControlAttributies
IcxWebControlAttributes Methods

IcxWebControlAttributes          Legend

In IcxWebControlAttributes

SetAttribute

SetStyleAttribute


IcxWebControlAttributes.SetAttribute

IcxWebControlAttributes

Designed to set a specific attribute and its value to the control’s container tag.

procedure SetAttribute(Name, Value: string);

Description

Implement the SetAttribute method so that your control renders a specific attribute and its value within its container tag.  The attribute’s name is specified by the Name parameter.  The Value parameter specifies the attribute’s value.


IcxWebControlAttributes.SetStyleAttribute

IcxWebControlAttributes

Designed to set a specific style attribute and its value to the control’s container tag.

procedure SetStyleAttribute(Name, Value: string);

Description

Implement the SetAttribute method so that your control renders a specific style attribute and its value within its container tag.  The attribute’s name is specified by the Name parameter.  The Value parameter specifies the attribute’s value.


IcxWebDesignerControlNotify
IcxWebDesignerControlNotify Interface

Hierarchy          Methods

Implemented by design-time controls to update corresponding controls.

Unit

cxWebIntf

IcxWebDesignerControlNotify = interface(IUnknown)

Description

Each web control has a corresponding design-time control assigned.  It can be accessed via the DesignerControl property of the IcxWebControl interface, implemented by web controls.  Methods of design-time controls are used to update a corresponding web control when changes are applied to it.  Note that all methods of this interface are called at design time only.


IcxWebDesignerControlNotify Hierarchy
Hierarchy

IUnknown


Methods for IcxWebDesignerControlNotify
IcxWebDesignerControlNotify Methods

IcxWebDesignerControlNotify          Legend

In IcxWebDesignerControlNotify

BoundsChanged

ParentChanged

UpdateContext


IcxWebDesignerControlNotify.BoundsChanged

IcxWebDesignerControlNotify

Responds to changes to the corresponding control’s bounds.

procedure BoundsChanged;

Description

Implement the BoundsChanged method to perform specific actions when the corresponding control’s bounds change.  This allows repainting the corresponding control when it is resized.


IcxWebDesignerControlNotify.ParentChanged

IcxWebDesignerControlNotify

Responds to changes to the corresponding control’s parent.

procedure ParentChanged;

Description

Implement the ParentChanged method to perform specific actions when the parent of the corresponding control is changed.  This allows repainting the corresponding control due to changing its container control.


IcxWebDesignerControlNotify.UpdateContext

IcxWebDesignerControlNotify

Responds to changes to the corresponding control’s properties affecting its look & feel.

procedure UpdateContext;

Description

Implement the UpdateContext method to perform specific actions when properties affecting the look & feel of a control change their values.


IcxWebEvents
IcxWebEvents Interface

Hierarchy          Methods

Implemented by controls to manage their client-side events.

Unit

cxWebIntf

IcxWebEvents = interface(IUnknown)

Description

The IcxWebEvents interface declares methods to manage a web control’s client-side events, namely to register new events and clear the list of registered events.  The TcxWebComponent class partially delegates the implementation of this interface to the TcxWebEventsHelper object.  This object contains a number of additional methods and properties for managing client-side events.

Call the RegisterEvent method of the TcxWebEventsHelper object to register the client-side event to render.  This object is accessed via the WebEventsHelper property of the TcxWebComponent class and its descendants.  The above-mentioned method constructs a list of events to be rendered.  Component rendering classes (TcxWebRenderer descendants) use this list to generate proper HTML code.

The RegisterEvent method should be called from the implemented RegisterEvents method of the IcxWebEvents interface.


IcxWebEvents Hierarchy
Hierarchy

IUnknown


Methods for IcxWebEvents
IcxWebEvents Methods

IcxWebEvents          Legend

In IcxWebEvents

ClearEvents

RegisterEvents


IcxWebEvents.ClearEvents

IcxWebEvents          See Also

Designed to clear the list of registered client-side events.

procedure ClearEvents;

Description

Implement the ClearEvents method to clear the registered events.  You will need this when clearing the list of client-side events constructed by the RegisterEvents method.

The TcxWebComponent class delegates the implementation of the ClearEvents method to the TcxWebEventsHelper object.  This object is accessed via the WebEventsHelper property.


IcxWebEvents.RegisterEvents

IcxWebEvents          See Also

Designed to construct a list of client-side events used by a component.

procedure RegisterEvents;

Description

Each component implements the RegisterEvents method in its own manner.  This method is used to call the RegisterEvent method of the TcxWebEventsHelper object for each of the events to be rendered.  Please refer to the description of the IcxWebEvents interface for details on event registering.


IcxWebModule
IcxWebModule Interface

Hierarchy          Methods

The IcxWebModule interface declares methods that control the active state of a particular web module.

Unit

cxWebIntf

IcxWebModule = interface(IUnknown)

Description

The IcxWebModule interface declares methods that control the active state of a particular web module.  These methods should be implemented to perform specific actions on start-up and shut down of the module.  The TcxCustomWebDataModule class implements the IcxWebModule interface.


IcxWebModule Hierarchy
Hierarchy

IUnknown


Methods for IcxWebModule
IcxWebModule Methods

IcxWebModule          Legend

In IcxWebModule

Activate

Deactivate


IcxWebModule.Activate

IcxWebModule          See Also

Designed to initialize a web module.

procedure Activate;

Description

The Activate method should be implemented to perform specific actions when a specific web module is being activated.


IcxWebModule.Deactivate

IcxWebModule          See Also

Designed to shut down a web module.

procedure Deactivate;

Description

The Deactivate method should be implemented to perform specific actions when deactivating a specific module.


IcxWebModuleComponentPersistent
IcxWebModuleComponentPersistent Interface

Hierarchy          Methods

Implemented by classes representing web modules to determine which of the owned components are persistent.

Unit

cxWebIntf

IcxWebModuleComponentPersistent = interface(IUnknown)

Description

The IcxWebModuleComponentPersistent interface is implemented by web modules.  This interface has a single method, which is designed to determine whether a specified component is persistent.  The interface thus allows implementing component persistency.


IcxWebModuleComponentPersistent Hierarchy
Hierarchy

IUnknown


Methods for IcxWebModuleComponentPersistent
IcxWebModuleComponentPersistent Methods

IcxWebModuleComponentPersistent          Legend

In IcxWebModuleComponentPersistent

IsComponentPersistent


IcxWebModuleComponentPersistent.IsComponentPersistent

IcxWebModuleComponentPersistent

Designed to determine whether a specific component is persistent.

function IsComponentPersistent(AComponent: TComponent): Boolean;

Description

When implemented, the IsComponentPersistent method returns a value indicating whether a module provides the specified component's persistency.  This component is specified by the AComponent parameter.


IcxWebModuleDesignerNotify
IcxWebModuleDesignerNotify Interface

Hierarchy          Methods

Implemented by the module designer to support design-time notifications.

Unit

cxWebIntf

IcxWebModuleDesignerNotify = interface(IUnknown)

Description

EWF web modules have corresponding designers, which manage the contents of a module at design time.  The module designer implements the IcxWebModuleDesignerNotify interface to respond to notifications of changes applied to the corresponding module at design time.


IcxWebModuleDesignerNotify Hierarchy
Hierarchy

IUnknown


Methods for IcxWebModuleDesignerNotify
IcxWebModuleDesignerNotify Methods

IcxWebModuleDesignerNotify          Legend

In IcxWebModuleDesignerNotify

DesignerIDChanged

DesignerPositioningTypeChanged

GetControlPositioningType

GetDesignerCount

GetDesignerName

IsSupportPositioningTypeChanged


IcxWebModuleDesignerNotify.DesignerIDChanged

IcxWebModuleDesignerNotify          See Also

Responds to changing the type of the web module designer.

procedure DesignerIDChanged;

Description

Implement the DesignerIDChanged method to perform specific actions when the module designer’s type has been changed.

The designer used for EWF page modules is specified by the DesignerID property of the TcxWebPageModule object.


IcxWebModuleDesignerNotify.DesignerPositioningTypeChanged

IcxWebModuleDesignerNotify          See Also

Responds to changing the positioning type of controls within a web module.

procedure DesignerPositioningTypeChanged;

Description

Implement the DesignerPositioningTypeChanged method to perform specific actions when the type of the controls positioning has been changed.

The positioning type of controls within an EWF page module is specified by the PositioningType property.


IcxWebModuleDesignerNotify.GetControlPositioningType

IcxWebModuleDesignerNotify

Returns the positioning type of controls within a page module.

function GetControlPositioningType: TcxWebPositioningType;

Description

Implement the GetControlPositioningType method to determine the positioning type of controls within a page module.  This method can return one of the values specified by the TcxWebPositioningType type.


IcxWebModuleDesignerNotify.GetDesignerCount

IcxWebModuleDesignerNotify          See Also

Returns the number of designers available for a module.

function GetDesignerCount: Integer;

Description

Implement the GetDesignerCount method to determine the number of designers available for a web module.


IcxWebModuleDesignerNotify.GetDesignerName

IcxWebModuleDesignerNotify          See Also

Designed to return the designer name of a specific module.

function GetDesignerName(Index: Integer): string;

Description

Implement the GetDesignerName method to determine the designer’s name with the index specified by the Index parameter.  The total number of available designers is available as the GetDesignerCount method’s return value.


IcxWebModuleDesignerNotify.IsSupportPositioningTypeChanged

IcxWebModuleDesignerNotify

Designed to return a value indicating whether the positioning type can be changed to a specific value.

function IsSupportPositioningTypeChanged(APositioningType: TcxWebPositioningType): Boolean;

Description

Implement the IsSupportPositioningTypeChanged method to apply constraints when changing the positioning type of controls within a module.  This method is called when a new value is assigned to the PositioningType property of the module.  It returns True if the value, specified by the APositioningType parameter, can be assigned.  Otherwise, it returns False.


IcxWebPage
IcxWebPage Interface

Hierarchy          Methods

Should be implemented by classes representing page modules to manipulate page contents.

Unit

cxWebIntf

IcxWebPage = interface(IUnknown)

Description

The IcxWebPage interface declares methods to control particular web page contents.  These methods should be implemented by classes representing page modules in order to manipulate page contents.

The TcxCustomWebPageModule class implements the IcxWebPage interface.


IcxWebPage Hierarchy
Hierarchy

IUnknown


Methods for IcxWebPage
IcxWebPage Methods

IcxWebPage          Legend

In IcxWebPage

DispatchPage

IncludePage

RedirectToPage


IcxWebPage.DispatchPage

IcxWebPage          See Also

Designed to dispatch a specified web page.

function DispatchPage(const APageName: string; AWebResponse: TWebResponse): Boolean;

Description

Implement the DispatchPage method to fill out a specified response message with the specified web page contents.  The APageName parameter is the name of the web page to fetch.  The AWebResponse parameter is a response object whose Content property should receive the requested web page.

The DispatchPage method should return True if it successfully fetched the requested page, False if it failed to obtain the requested page.


IcxWebPage.IncludePage

IcxWebPage          See Also

Includes the specified page contents to the current page.

function IncludePage(const APageName: string; var AOwned: Boolean): TStream;

Description

The IncludePage method is used to include the contents of the web page specified via the APageName parameter to the contents of the current page.  The AOwned parameter determines whether the resulting stream is freed after it is sent.  The IncludePage method is designed to return the stream representation of the included page.


IcxWebPage.RedirectToPage

IcxWebPage          See Also

Designed to fill out a response message so that it redirects a caller to another page within the application.

function RedirectToPage(const APageName: string; const AParams: string; AWebResponse: TWebResponse): Boolean;

Description

Implement the RedirectToPage method to generate a response that redirects a caller to another web page within the web application.  The APageName parameter specifies the name of the web page to which the request should be redirected.  The AParams parameter specifies a string containing application-defined name-value pairs.  These name-value pairs supply query fields of the redirected request message.  The AWebResponse parameter is a response object that should be filled.

The RedirectToPage method should return True if it successfully redirected to the specified page.


IcxWebPageModule
IcxWebPageModule Interface

Hierarchy          Methods

Should be implemented by classes representing page modules in order to manipulate related information.

Unit

cxWebIntf

IcxWebPageModule = interface(IUnknown)

Description

The IcxWebPageModule interface declares methods that allow you to control the web module, namely to retrieve and set positioning type, encoding, designer type.  When implemented, the methods of this interface also allow saving the page module contents to and loading from a text string.

The IcxWebPageModule interface is implemented by the TcxCustomWebPageModule class.


IcxWebPageModule Hierarchy
Hierarchy

IUnknown


Methods for IcxWebPageModule
IcxWebPageModule Methods

IcxWebPageModule          Legend

In IcxWebPageModule

GetAsString

GetDesignerID

GetEncoding

GetPositioningType

LoadState

PerformScript

SetAsString

SetDesignerID

SetPositioningType


IcxWebPageModule.GetAsString

IcxWebPageModule          See Also

Designed to return the string representation of the current page module contents.

function GetAsString: string;

Description

When implemented, the GetAsString function is used to obtain the string representation of the current page module.  The returned value is used to set a so-called form state, which allows you to save the changes applied to the page layout between requests.


IcxWebPageModule.GetDesignerID

IcxWebPageModule          See Also

Designed to return the type of the designer used to represent the page module at design-time.

function GetDesignerID: Integer;

Description

When implemented, the GetDesignerID method is used to retrieve an integer value corresponding to the type of the designer used for the page module.

The type of the designer is specified via the DesignerID property of the TcxWebPageModule class.


IcxWebPageModule.GetEncoding

IcxWebPageModule

Designed to return the type of encoding used to transmit application data.

function GetEncoding: string;

Description

When implemented, the GetEncoding method is used to obtain the type of encoding used to transmit form values.

Encoding determines the type of the data the current page module produces.  The EncodingType property of the TcxWebPageModule class determines encoding to use.

The following values can be returned by the GetEncoding method.  The ‘application/x-www-form-urlencoded’ property value  is the most commonly used.  It is utilized if the client side transmits the information contained in form elements to the server script.  The ‘multipart/form-data’ property value is used when your application uploads files to the server.  The ‘text/plain’ property value is used when utilizing the mailto protocol (i.e. if it sends e-mail messages based on the data from form elements).


IcxWebPageModule.GetPositioningType

IcxWebPageModule

Designed to return the type of positioning used for controls within page modules.

function GetPositioningType: TcxWebPositioningType;

Description

When implemented, the GetPositioningType method is used to determine the manner in which controls are positioned within the web page.

The table below shows possible values returned by the method:

Positioning value	Description
cxptGrid	Controls are positioned within cells of a table.
cxptAbsolute	Controls are absolutely positioned.
cxptFlow	Controls are positioned in the flow, one by one.

The PositioningType property of the TcxWebPageModule object specifies the positioning type of module components.


IcxWebPageModule.LoadState

IcxWebPageModule

Designed to load module state from the form state.

procedure LoadState;

Description

When implemented, the LoadState method is used to load components’ state from the form state.  LoadState is executed in all but the very first request to the same page module. In other words if the previous request has pointed to the same page module, the LoadState method is executed.


IcxWebPageModule.PerformScript

IcxWebPageModule

Designed to perform a specified server script.

function PerformScript(const Value: string): string;

Description

When implemented, the PerformScript function is used to perform the specified server script.  The script to be performed is transmitted to the method via the Value parameter.


IcxWebPageModule.SetAsString

IcxWebPageModule          See Also

Designed to restore the page module contents from its string representation.

procedure SetAsString(const Value: string);

Description

When implemented, the SetAsString method is used to read the page module contents from a string.  The Value parameter specifies the string used to restore the state of the page module.


IcxWebPageModule.SetDesignerID

IcxWebPageModule          See Also

Designed to set the type of the designer used for the page module.

procedure SetDesignerID(Value: Integer);

Description

When implemented, the SetDesignerID method is used to set the specified designer for the page module.  The designer to apply is specified via the Value parameter.

The type of the designer used for the page module is specified via the DesignerID property of the TcxWebPageModule object.


IcxWebPageModule.SetPositioningType

IcxWebPageModule

Designed to set the type of positioning used for controls within the page modules.

procedure SetPositioningType(const Value: TcxWebPositioningType);

Description

When implemented, the GetPositioningType method is used to set the manner in which controls are positioned within the web page.

The table below shows possible values returned by the method:

Positioning value	Description
cxptGrid	Controls are positioned within cells of a table.
cxptAbsolute	Controls are absolutely positioned.
cxptFlow	Controls are positioned in the flow, one by one.

The PositioningType property of the TcxWebPageModule object specifies the positioning type of module components.


IcxWebProvidersSupport
IcxWebProvidersSupport Interface

Hierarchy          Methods

Should be implemented by components that use the code provided by other objects.

Unit

cxWebIntf

IcxWebProvidersSupport = interface(IUnknown)

Description

The IcxWebProvidersSupport interface should be implemented by the components that cannot provide their whole HTML code by themselves. For instance, all controls require the style controller object to generate the code provided to render styles.


IcxWebProvidersSupport Hierarchy
Hierarchy

IUnknown


Methods for IcxWebProvidersSupport
IcxWebProvidersSupport Methods

IcxWebProvidersSupport          Legend

In IcxWebProvidersSupport

GetProviders


IcxWebProvidersSupport.GetProviders

IcxWebProvidersSupport

Designed to return a list of objects, providing code for the component.

procedure GetProviders(AList: TList);

Description

When implemented, the GetProviders method is used to obtain a list of objects used by the component to generate its complete HTML code.  The constructed list should be returned via the AList parameter.


IcxWebScripts
IcxWebScripts Interface

Hierarchy          Methods

Should be implemented by components using predefined client scripts.

Unit

cxWebIntf

IcxWebScripts = interface(IUnknown)

Description

The IcxWebScripts interface declares a method used to subscribe a component to predefined client scripts.  Client scripts are represented by TcxWebScript class descendants.  These classes have several methods which provide means of rendering scripts and additional HTML required for proper script functioning.

Script subscription is performed by calling the ScriptSubscription method of the TcxWebScriptsHelper object.  This object stands for the WebScriptsHelper property of the TcxWebComponent class (and descendants).  The type of the script-representing class is transmitted to the method as a parameter.  The method is called for each client script required by the component.

The IcxWebScripts interface is implemented by the TcxWebComponent class.


IcxWebScripts Hierarchy
Hierarchy

IUnknown


Methods for IcxWebScripts
IcxWebScripts Methods

IcxWebScripts          Legend

In IcxWebScripts

ScriptsSubscription


IcxWebScripts.ScriptsSubscription

IcxWebScripts

Designed to subscribe a component to client scripts.

procedure ScriptsSubscription;

Description

When implemented, the ScriptsSubscription method is used to subscribe a component to client scripts.  Subscribing a component to client scripts implies calling the ScriptSubscription method of the TcxWebScriptsHelper object for each script.  This object can be accessed via the WebScriptsHelper property of TcxWebComponent class descendants.  The appropriate descendant of the TcxWebScript class is transmitted to this method.

Please refer to the IcxWebScripts interface description for details regarding web component subscribtion to client scripts.


IcxWebTabOrderable
IcxWebTabOrderable Interface

Hierarchy

Should be implemented by tab orderable controls.

Unit

cxWebIntf

IcxWebTabOrderable = interface(IUnknown)

Description

Controls should implement the IcxWebTabOrderable interface to denote that they can be included in the tab order list of parent components.  This interface doesn’t contain any methods and is used to distinguish between tab orderable and not tab orderable controls.


IcxWebTabOrderable Hierarchy
Hierarchy

IUnknown


IcxWebValues
IcxWebValues Interface

Hierarchy          Properties             Methods

Should be implemented by controls to update their properties with respect to the changes made by end users.

Unit

cxWebIntf

IcxWebValues = interface(IUnknown)

Description

Controls display their contents by means of HTML elements.  Some controls are used to allow users to edit data they display.  In such an instance controls’ data is displayed by means of HTML form elements which allow editing their contents.  Such HTML elements include contained values to the request message when the container form is submitted.  The values received within the request message are used to update control properties.  This is performed to avoid losing the data changes made by end users.  Controls should implement the IcxWebValues interface in order to support the described process.

The TcxWebComponent class partially delegates the implementation of the IcxWebValues interface to the TcxWebValuesHelper object.  This object is accessed via the WebValuesHelper property.


IcxWebValues Hierarchy
Hierarchy

IUnknown


Properties for IcxWebValues
IcxWebValues Properties

IcxWebValues          Legend

In IcxWebValues

Values


Methods for IcxWebValues
IcxWebValues Methods

IcxWebValues          Legend

In IcxWebValues

CanSetValues

DoSetValues

GetValues

RegisterValues


IcxWebValues.Values

IcxWebValues          See Also

Designed to contain a list of values used to update control properties.

property Values: TStrings;

Description

Each control supporting the IcxWebValues interface implements its RegisterValues method.  This method is used to create a list of strings containing IDs of HTML elements containing data related to the control.  This list is represented by the Values property.

When the request message is received, the values of the registered elements are also written to the Values property.  At this stage this property contains a list of strings in the name=value format.  These values are used to update the properties of the components via the DoSetValues method.

The Values property uses the GetValues method to read its value.

ReadOnly Property


IcxWebValues.CanSetValues

IcxWebValues          See Also

Designed to return a value indicating whether the received request message contains the information needed to update the control.

function CanSetValues: Boolean;

Description

When implemented, the CanSetValues method is used to determine whether it is possible to update the control with respect to the changes made at the client-side of the application.  In other words it should determine whether the request message contains information that can be used to update the control.  For instance, the control cannot be updated if it is invisible, since the values it contains are not sent within the request message.

The CanSetValue method should return True if the control can be updated.  Otherwise it should return False.  The DoSetValues method is called only if the CanSetValue method returns True.


IcxWebValues.DoSetValues

IcxWebValues          See Also

Designed to update the control with respect to the changes made by the end user.

procedure DoSetValues;

Description

When implemented, the DoSetValues method is used to update control properties with respect to the changes made at the client side of the application.  By the moment this method is called, the Values property should contain the information required to perform the task.


IcxWebValues.GetValues

IcxWebValues          See Also

Designed to return the Values property value.

function GetValues: TStrings;

Description

When implemented, the GetValues method is used to obtain the Values property value.


IcxWebValues.RegisterValues

IcxWebValues          See Also

Registers HTML elements containing information related to the control.

procedure RegisterValues;

Description

Each control supporting the IcxWebValues interface implements its RegisterValues method.  This method is used to create a list of strings containing IDs of HTML elements containing data related to the control.  This list is represented by the Values property.  The RegisterValues method should use the RegisterValue method of the TcxWebValuesHelper object to perform the task.  This object is accessed via the WebValuesHelper property of the TcxWebComponent class.

When the request message is received, the values of the registered elements are also written to the Values property.  At this stage this property contains a list of strings in the name=value format.  These values are used to update the properties of the components via the DoSetValues method.


TcxActionParameters
TcxActionParameters type

Contains parameters of the server-side event invoked at the client side of the application.

Unit

cxWebIntf

TcxActionParameters = record

    ParamString: string;

    ShiftState: Integer;

  end;

Description

The TcxActionParameters specifies the type of the parameter transmitted to the DoPerformAction method of the IcxWebActions interface.  The ParamString parameter specifies the string containing parameters of the server side event delimited by a colon.  The ShiftState parameter determines whether the Shift, Ctrl or Alt button was pressed on a particular action.  The value of the ShiftState field is an integer value representing the bit mask of shift states.  The following table contains the correspondences between bit masks and their meanings.

Bit Mask	Explanation
1	The Alt key was pressed on post back.
2	The Ctrl key was pressed on post back.
4	The Shift key was pressed on post back.


TcxWebCaption
TcxWebCaption type

Used by web controls to specify their captions.

Unit

cxWebIntf

TcxWebCaption = type string;

Description

Specifies the string type which is used to specify captions of web controls.


TcxWebComponentActionProc
TcxWebComponentActionProc type

Specifies the type of procedures used to handle actions.

Unit

cxWebIntf

TcxWebComponentActionProc = procedure(const AParameters: TcxActionParameters) of object;

Description

The TcxWebComponentActionProc type is used to specify the type of actions handlers.  The AParameters parameter specifies the parameters required by the handler to perform the task.


TcxWebComponentEventProc
TcxWebComponentEventProc type

Specifies the type of methods returning the text of client-side events handler.

Unit

cxWebIntf

TcxWebComponentEventProc = procedure(var AScript: string) of object;

Description

The TcxWebComponentEventProc type is used as a type of the parameter in the RegisterEvent method of the TcxWebEventsHelper class.  It specifies the type of the procedure used to return the handler of client events.  The handler is written to the AScript parameter.


TcxWebComponentEventProcType
TcxWebComponentEventProcType type

Specifies the type of client side event rendering.

Unit

cxWebIntf

TcxWebComponentEventProcType = (etSingleLine, etProcedure);

Description

The TcxWebComponentEventProcType type contains values specifying whether the client side event handler is rendered within a tag or as a separate function.  This type is used as a type of the parameter in the RegisterEvent method of the TcxWebEventsHelper class.

Client-side event handlers of the etProcedure type look like normal stand-alone procedures singled-out from the rest code.  Event handlers of the etSingleLine type are placed within the tag of the corresponding web component.


TcxWebComponentState
TcxWebComponentState type

Contain a value specifying the state of a web component.

Unit

cxWebIntf

TcxWebComponentState = (wcsLoading);

Description

The values of the TcxWebComponentState type are used to construct the TcxWebComponentStates type.  The last mentioned type is used to set the value of the WebComponentState property.

The single wcsLoading value, contained in this type, specifies that the component is being loaded from the form state.


TcxWebComponentStates
TcxWebComponentStates type

Represents a set of values specifying the state of a web component.

Unit

cxWebIntf

TcxWebComponentState = (wcsLoading);

TcxWebComponentStates = set of TcxWebComponentState;

Description

The values of the TcxWebComponentState type are used to construct the TcxWebComponentStates type.  The last mentioned type is used to set the value of the WebComponentState property.

The single wcsLoading value, contained in the TcxWebComponentState type, specifies that the component is being loaded from the form state.


TcxWebPositioningType
TcxWebPositioningType type

Represents the type of controls positioning within a web page.

Unit

cxWebIntf

TcxWebPositioningType = (cxptGrid, cxptAbsolute);

Description

The values listed by the TcxWebPositioningType type are used to set a value of the TcxWebPageModule object’s PositioningType property.  The following values are available in the TcxWebPositioningType type:

Positioning value	Description
cxptGrid	Controls are positioned within cells of a table.  This value is preferable if the constructed web page should be used under a number of various browsers.
cxptAbsolute	Controls are absolutely positioned.  The advantage of this method is the reduced number of generated HTML code.
cxptFlow	Controls are positioned in the flow, one by one.  This value should be used if controls are positioned via the HTML editor but not the designer.


TcxWebTabOrder
TcxWebTabOrder type

Represents the type containing tab order values.

Unit

cxWebIntf

TcxWebTabOrder = -1..32766;

Description

The values of the TcxWebTabOrder type determine the tab order of components (specifies the type of the TabOrder property).


TcxWebHelper
TcxWebHelper Object

Hierarchy          Properties          Methods          See Also

Represents the base class for all ‘helper’ classes within EWF.

Unit

cxWebClasses

TcxWebHelper = class(TObject)

Description

The TcxWebHelper class is the base class from which all EWF ‘helper’ classes are derived.  Thus the TcxWebHelper class is the common ancestor for TcxWebActionsHelper, TcxWebEventsHelper, TcxWebRenderHelper, TcxWebScriptsHelper, and TcxWebValuesHelper ‘helper’ classes.  Each ‘helper’ class helps a specific component to perform particular operations, such as to register client actions, to manage client side (called ‘custom’ in Object Inspector) events, to render components and the entire form by generating their HTML code, etc.

The TcxWebHelper class implements a single Component property that specifies the corresponding component which delegates a part of its functionality to a helper class.


TcxWebHelper Hierarchy
Hierarchy

TObject


Properties for TcxWebHelper
TcxWebHelper Properties

TcxWebHelper          Legend

In TcxWebHelper

Component


Methods for TcxWebHelper
TcxWebHelper Methods

TcxWebHelper          Legend

In TcxWebHelper

Create


TcxWebHelper.Component

TcxWebHelper

Specifies the web component owning a helper.

property Component: TComponent;

Description

The Component property is used to obtain the component which delegates a part of its functionality to a helper class.  Each helper class helps a specific component to perform particular operations, such as registering client actions, managing client side events, rendering components and the entire form by generating their HTML code, etc.

ReadOnly Property


TcxWebHelper.Create

TcxWebHelper

Creates a new TcxWebHelper class instance.

constructor Create(AComponent: TComponent); virtual;

Description

The Create method is used to create a new instance of the TcxWebHelper class and initialize its Component property.

Do not create instances of the TcxWebHelper class.  This constructor is called from derived constructors.


TcxWebNumbering
TcxWebNumbering Object

Hierarchy          Properties          Methods          See Also

Represents an object, which specifies the numbering style of lists.

Unit

cxWebClasses

TcxWebNumbering = class(TcxWebStyleObject)

Description

The TcxWebNumbering class represents a web style constituent, which is responsible for setting the appropriate numbering style of lists.  As a TcxWebStyleObject descendant, the TcxWebNumbering class inherits all its properties and methods, which are basic for style constituents.  Additionally, the TcxWebNumbering class contains properties that allow you to set bullet glyph, position of the list item marker and the manner in which list items are numerated.

The TcxWebNumbering class generates the HTML code related to numbering style.  This code is composed by the WriteHTML method of the TcxWebNumbering class.  The code generated by the TcxWebNumbering class is a part of the HTML code, which is written into the STYLE tag if any of the components on the page use the corresponding style.


TcxWebNumbering Hierarchy
Hierarchy

TPersistent

     |

TcxWebStyleObject


Properties for TcxWebNumbering
TcxWebNumbering Properties

TcxWebNumbering          Legend

In TcxWebNumbering

AssignedValues

Picture

Position

Style

Derived from TcxWebStyleObject

WebStyle


Methods for TcxWebNumbering
TcxWebNumbering Methods

TcxWebNumbering          Legend

In TcxWebNumbering

Assign

WriteHTML

Derived from TcxWebStyleObject

BeginUpdate

Changed

Create

DoRestoreDefaults

EndUpdate

RestoreDefaults


TcxWebNumbering.AssignedValues

TcxWebNumbering          See Also

Specifies which properties of the TcxWebNumbering object have been set.

type

  TcxWebNumberingAssignedValue = (wnavPosition, wnavStyle);

  TcxWebNumberingAssignedValues = set of TcxWebNumberingAssignedValue;

property AssignedValues: TcxWebNumberingAssignedValues;

Description

The AssignedValues property lists the TcxWebNumbering object’s properties which have been set or whose default values have been changed.  The AssignedValues property value is a set of zero or more of the following:

Value	Description
wnavPosition	The Position property has changed.
wnavStyle	The Style property has changed.

For example, if the AssignedValues property returns [wnavStyle], then the bullet type (or item marker) of the corresponding list object will be changed.

The default value of the AssignedValues property is [].


TcxWebNumbering.WriteHTML

TcxWebNumbering          See Also

Writes HTML code rendered to represent the numbering style of a control (controls).

procedure WriteHTML(HTMLTextBuilder: TcxHTMLTextBuilder);

Description

The WriteHTML method is used to write the HTML code representing the numbering style specified by the TcxWebNumbering object’s properties.  This code is written to the internal buffer of the object represented by the HTMLTextBuilder parameter.  This is performed via the TcxHTMLTextBuilder class methods.

Please review the sample code rendered by the WriteHTML method (it is highlighted).

<STYLE>

<!--

.cxWebPageModule3_cxWebStyleController1Item2 { color:windowtext; font-family:MS Sans Serif; font-size:10pt; list-style-type:square; list-style-position:inside; }

//-->

</STYLE>

ReadOnly Property


TcxWebNumbering.Picture

TcxWebNumbering          See Also

Specifies a path to the image that will be used as a list item marker.

property Picture: string;

Description

The Picture property sets a path to the image that will be used as a list item marker.  This image is used only if the Style property of the TcxWebNumbering object is set to \ wnsPicture.

For instance, you specify a path to an existing image via the Picture property (assume, the path is ‘C:\Img.gif’).  Assume the Style property is set to wnsSquare.  In this instance, the picture ‘C:\Img.gif’ will not be displayed (because the Style property is not set to wnsPicture) and a solid square is used as a list item marker.  After you set the Style property to wnsPicture, the image ‘C:\Img.gif’ set by the Picture property will be used as a list item marker.

If the image specified by the Picture property is unavailable (its path is incorrect), a solid circle is used as a list item marker.

The following sample code demonstrates how to assign a value to the Picture property of style ‘Item2’ within a style controller.

var AStyleItem: TcxWebStyleItem;

//…

AStyleItem := StyleController1.ItemByName('Item2');

AStyleItem.Style.Numbering.Picture := 'file://F:\img2.gif';

Note: The EWF automatically substitutes the path you set for the Picture property with the correct path declaration when generating HTML code.  For instance, the Picture property value equaling 'file://F:\img2.gif' is transformed to 'url(file://F:\img2.gif)' HTML code.


TcxWebNumbering.Position

TcxWebNumbering          See Also

Specifies the position of the list item marker.

type

  TcxWebNumberingPosition = (wnpInside, wnpOutside);

property Position: TcxWebNumberingPosition;

Description

The Position property value determines the manner in which the list item marker is drawn with regard to the content.

The following values are available for the Position property.

Value	Description	Example
wnpInside	List item text is right indented with respect to its default location.  List item marker is drawn in the left text bound position of the default text location.
wnpOutside	List item text begins form its default position.  List item marker is drawn left indented with respect to the left text bound.

The default value of the Position property is wnpOutside.


TcxWebNumbering.Style

TcxWebNumbering          See Also

Determines the list item marker’s look & feel.

type

  TcxWebNumberingStyle = (wnsNone, wnsCircle, wnsDisc, wnsSquare, wnsDecimal, wnsUpperRoman, wnsUpperAlpha, wnsLowerAlpha, wnsLowerRoman, wnsPicture);

property Style: TcxWebNumberingStyle;

Description

The Style property is used to determine the look & feel of the list item marker.

The following values are available for the Style property.

Value	Description	Example
wnsNone	List has no item markers.
wnsCircle	List item marker is an outlined circle.
wnsDisc	List item marker is a solid circle.
wnsSquare	List item marker is a solid square.
wnsDecimal	List item marker is a decimal value (1, 2, 3, 4, and etc).
wnsUpperRoman	List item marker is a roman numeral in upper case (I, II, III, IV, and etc).
wnsUpperAlpha	List item marker is an alpha character in upper case (A, B, C, D, and etc).
wnsLowerAlpha	List item marker is an alpha character in lower case (a, b, c, d, and etc).
wnsLowerRoman	List item marker is a roman numeral in lower case (I, II, III, IV, and etc).
wnsPicture	List item marker is represented by the image specified via the Picture property.

The default value of the Style property is wnsNone.


TcxWebNumbering.Assign

TcxWebNumbering          See Also

Copies the contents of one TcxWebNumbering object to another.

procedure Assign(Source: TPersistent); override;

Description

Call the Assign method to copy Style and Position property contents from another TcxWebNumbering object specified by the Source parameter.  As a result of the Assign method, calling two web style items will have the same property values specifying the numbering style and list item marker position.


TcxWebRenderHelper
TcxWebRenderHelper Object

Hierarchy          Properties          Methods          Events          See Also

Represents a class which implements component functionality of HTML code rendering.

Unit

cxWebClasses

TcxWebRenderHelper = class(TcxWebHelper)

Description

The TcxWebRenderHelper class is used to manage rendering of a specific component.  This class fully implements the methods declared by the IcxCodeProvider and IcxContainerCodeProvider interfaces.  But the TcxWebRenderHelper class does not support these interfaces itself.  The TcxWebRenderHelper class is used by TcxWebComponent descendants via their WebRenderHelper property to implement the delegated IcxCodeProvider and IcxContainerCodeProvider interfaces to provide functionality for rendering HTML and JScript codes for a specific component.

As a TcxWebHelper class descendant, the TcxWebRenderHelper class inherits the Component property, which specifies the component to render.  Additionally, the TcxWebRenderHelper class implements the OnBeforeRender and OnAfterRender events which are invoked by corresponding TcxWebComponent class descendants.


TcxWebRenderHelper Hierarchy
Hierarchy

TObject

     |

TcxWebHelper


Properties for TcxWebRenderHelper
TcxWebRenderHelper Properties

TcxWebRenderHelper          Legend

Derived from TcxWebHelper

Component


Events for TcxWebRenderHelper
TcxWebRenderHelper Events

TcxWebRenderHelper          Legend

In TcxWebRenderHelper

OnAfterRender

OnBeforeRender


Methods for TcxWebRenderHelper
TcxWebRenderHelper Methods

TcxWebRenderHelper          Legend

In TcxWebRenderHelper

ClearRenderers

Create

Destroy

DoAfterRender

DoBeforeRender

GetRendererClass

GetScriptFiles

RegisterRenderer

WriteBeginHTML

WriteClassHTML

WriteClassOutOfFormHTML

WriteClassScripts

WriteEndHTML

WriteHiddenFormElements

WriteHTML

WriteOutOfFormHTML

WriteScripts

WriteStyles

WriteXML


TcxWebRenderHelper.DoAfterRender

TcxWebRenderHelper          See Also

Performs specific actions after a web page has been rendered.

procedure DoAfterRender; dynamic;

Description

The DoAfterRender method is called right after rendering of a web page has been finished.  This method performs the following two actions:

•	Runs the OnAfterRender event handler, if assigned;

•	Calls the ClearEvents method of the IcxWebEvents interface supported by the associated component.


TcxWebRenderHelper.DoBeforeRender

TcxWebRenderHelper          See Also

Performs specific actions before a web page is rendered.

procedure DoBeforeRender; dynamic;

Description

The DoBeforeRender method is called right before rendering of a web page begins.  This method performs the following two actions:

•	calls the RegisterEvents method of the IcxWebEvents interface supported by the associated component;

•	runs the OnBeforeRender event handler, if assigned.


TcxWebRenderHelper.GetScriptFiles

TcxWebRenderHelper          See Also

Specifies external script files used by the associated component.

procedure GetScriptFiles(HTMLTextBuilder: TcxHTMLTextBuilder; AList: TStrings); virtual;

Description

The GetScriptFiles method implements the GetScriptFiles method of the IcxCodeProvider interface.  Its purpose is to specify the names of JScript files used by components of the same class.  This functionality is delegated to a specially designed renderer class.

The GetScriptFiles method performs the following actions:

•	Instantiates a proper renderer object to render code within a specific browser.  (The Browser property of the HTMLTextBuilder parameter (the TcxHTMLTextBuilder class) is used to determine the client browser type.)

•	Calls the GetScriptFiles method of the instantiated renderer (theTcxWebRenderer descendant).

•	Frees the renderer.


TcxWebRenderHelper.WriteBeginHTML

TcxWebRenderHelper          See Also

Renders HTML code preceding child control code and contained HTML code.

procedure WriteBeginHTML(HTMLTextBuilder: TcxHTMLTextBuilder); virtual;

Description

The WriteBeginHTML method implements the WriteBeginHTML method of the IcxContainerCodeProvider interface.  The purpose of this method is to render HTML code preceding child control code and contained HTML code.  This functionality is delegated to a specially designed renderer class.

The WriteBeginHTML method performs the following actions:

•	Instantiates a proper renderer object to render code within a specific browser.  (The Browser property of the HTMLTextBuilder parameter (the TcxHTMLTextBuilder class) is used to determine the client browser type.)

•	Calls the WriteBeginHTML method of the instantiated renderer (the TcxWebRenderer descendant).

•	Frees the renderer.


TcxWebRenderHelper.WriteClassHTML

TcxWebRenderHelper          See Also

Renders the HTML code, placed within the form, used by all components of a specified class.

procedure WriteClassHTML(HTMLTextBuilder: TcxHTMLTextBuilder); virtual;

Description

The WriteClassHTML method implements the WriteClassHTML method of the IcxCodeProvider interface.  Its purpose is to render the HTML code, placed within the form and used by all components of the same class as an associated component.  This functionality is delegated to a specially designed renderer class.

The WriteClassHTML method performs the following actions:

•	Instantiates a proper renderer object to render code within a specific browser.  (The Browser property of the HTMLTextBuilder parameter (the TcxHTMLTextBuilder class) is used to determine the client browser type.)

•	Calls the WriteClassHTML method of the instantiated renderer (the TcxWebRenderer descendant).

•	Frees the renderer.


TcxWebRenderHelper.WriteClassOutOfFormHTML

TcxWebRenderHelper          See Also

Renders the HTML code placed outside the form, used by all components of a specific class.

procedure WriteClassOutOfFormHTML(HTMLTextBuilder: TcxHTMLTextBuilder); virtual;

Description

The WriteClassOutOfFormHTML method implements the WriteClassOutOfFormHTML method of the IcxCodeProvider interface.  Its purpose is to render the HTML code, placed outside the form and used by all components of the same class as an associated component.  This functionality is delegated to a specially designed renderer class.

The WriteClassOutOfFormHTML method performs the following actions:

•	Instantiates a proper renderer object to render code within a specific browser.  (The Browser property of the HTMLTextBuilder parameter (the TcxHTMLTextBuilder class) is used to determine the client browser type.)

•	Calls the WriteClassOutOfFormHTML method of the instantiated renderer (the TcxWebRenderer descendant).

•	Frees the renderer.


TcxWebRenderHelper.WriteClassScripts

TcxWebRenderHelper          See Also

Renders JScript code used by all components of a specific class.

procedure WriteClassScripts(HTMLTextBuilder: TcxHTMLTextBuilder); virtual;

Description

The WriteClassScripts method implements the WriteClassScripts method of the IcxCodeProvider interface.  The purpose of this method is to render the JScript code used by all components of the same class as an associated component.  This functionality is delegated to a specially designed renderer class.

The WriteClassScripts method performs the following actions:

•	Instantiates a proper renderer object to render code within a specific browser.  (The Browser property of the HTMLTextBuilder parameter (the TcxHTMLTextBuilder class) is used to determine the client browser type.)

•	Calls the WriteClassScripts method of the instantiated renderer (the TcxWebRenderer descendant).

•	Frees the renderer.


TcxWebRenderHelper.WriteEndHTML

TcxWebRenderHelper          See Also

Renders HTML code following child controls code and contained HTML code.

procedure WriteEndHTML(HTMLTextBuilder: TcxHTMLTextBuilder); virtual;

Description

The WriteEndHTML method implements the WriteEndHTML method of the IcxContainerCodeProvider interface.  The purpose of this method is to render HTML code following the code of child controls and contained HTML code.  This functionality is delegated to a specially designed renderer class.

The WriteEndHTML method performs the following actions:

•	Instantiates a proper renderer object to render code within a specific browser.  (The Browser property of the HTMLTextBuilder parameter (the TcxHTMLTextBuilder class) is used to determine the client browser type.)

•	Calls the WriteEndHTML method of the instantiated renderer (the TcxWebRenderer descendant).

•	Frees the renderer.


TcxWebRenderHelper.WriteHiddenFormElements

TcxWebRenderHelper

Writes hidden form elements for an associated component.

procedure WriteHiddenFormElements(HTMLTextBuilder: TcxHTMLTextBuilder); virtual;

Description

The WriteHiddenFormElements method implements the WriteHiddenFormElements method of the IcxCodeProvider interface.  It is utilized to render hidden elements for an associated component.  This functionality is delegated to a specially designed renderer class.

The WriteHiddenFormElements method performs the following actions:

•	Instantiates a proper renderer object to render code within a specific browser.  (The Browser property of the HTMLTextBuilder parameter (the TcxHTMLTextBuilder class) is used to determine the client browser type.)

•	Calls the WriteHiddenFormElements method of the instantiated renderer (the TcxWebRenderer descendant).

•	Frees the renderer.


TcxWebRenderHelper.WriteHTML

TcxWebRenderHelper          See Also

Renders the HTML code representing an associated component.

procedure WriteHTML(HTMLTextBuilder: TcxHTMLTextBuilder); virtual;

Description

The WriteHTML method implements the WriteHTML method of the IcxCodeProvider interface.  It is intended for rendering the HTML code representing an associated component.  This functionality is delegated to a specially designed renderer class.

The WriteHTML method performs the following actions:

•	Instantiates a proper renderer object to render code within a specific browser.  (The Browser property of the HTMLTextBuilder parameter (the TcxHTMLTextBuilder class) is used to determine the client browser type.)

•	Calls the WriteHTML method of the instantiated renderer (the TcxWebRenderer descendant).

•	Frees the renderer.


TcxWebRenderHelper.WriteOutOfFormHTML

TcxWebRenderHelper          See Also

Renders the HTML code placed outside the form used by an associated component.

procedure WriteOutOfFormHTML(HTMLTextBuilder: TcxHTMLTextBuilder); virtual;

Description

The WriteOutOfFormHTML method implements the WriteOutOfFormHTML method of the IcxCodeProvider interface.  Its purpose is to render the HTML code used by an associated component and located outside the form.  This functionality is delegated to a specially designed renderer class.

The WriteOutOfFormHTML method performs the following actions:

•	Instantiates a proper renderer object to render code within a specific browser.  (The Browser property of the HTMLTextBuilder parameter (the TcxHTMLTextBuilder class) is used to determine the client browser type.)

•	Calls the WriteOutOfFormHTML method of the instantiated renderer (the TcxWebRenderer descendant).

•	Frees the renderer.


TcxWebRenderHelper.WriteScripts

TcxWebRenderHelper          See Also

Renders JScript code for an associated component.

procedure WriteScripts(HTMLTextBuilder: TcxHTMLTextBuilder); virtual;

Description

The WriteScripts method implements the WriteScripts method of the IcxCodeProvider interface.  It is utilized to render JScript code for an associated component.  This functionality is delegated to a specially designed renderer class.

The WriteScripts method performs the following actions:

•	Instantiates a proper renderer object to render code within a specific browser.  (The Browser property of the HTMLTextBuilder parameter (the TcxHTMLTextBuilder class) is used to determine the client browser type.)

•	Calls the WriteScripts method of the instantiated renderer (the TcxWebRenderer descendant).

•	Frees the renderer.


TcxWebRenderHelper.WriteStyles

TcxWebRenderHelper

Renders the styles provided by an associated component.

procedure WriteStyles(HTMLTextBuilder: TcxHTMLTextBuilder); virtual;

Description

The WriteStyles method implements the WriteStyles method of the IcxStylesProvider interface.  It is utilized to render the styles provided by a component.  This functionality is delegated to a specially designed renderer class.

The WriteStyles method performs the following actions:

•	Instantiates a proper renderer object to render code within a specific browser.  (The Browser property of the HTMLTextBuilder parameter (the TcxHTMLTextBuilder class) is used to determine the client browser type.)

•	Calls the WriteStyles method of the instantiated renderer (the TcxWebRenderer descendant).

•	Frees the renderer.


TcxWebRenderHelper.WriteXML

TcxWebRenderHelper

Implements the WriteXML method of the IcxCodeProvider interface.

procedure WriteXML(HTMLTextBuilder: TcxHTMLTextBuilder); virtual;

Description

The WriteXML method implements the WriteXML method of the IcxCodeProvider interface.  Its functionality is delegated to a specially designed renderer class.

The WriteScripts method performs the following actions:

•	Instantiates a proper renderer object to render code within a specific browser.  (The Browser property of the HTMLTextBuilder parameter (the TcxHTMLTextBuilder class) is used to determine the client browser type.)

•	Calls the WriteXML method of the instantiated renderer (the TcxWebRenderer descendant).

•	Frees the renderer.


TcxWebRenderHelper.OnAfterRender

TcxWebRenderHelper          See Also

Occurs after component rendering has finished.

property OnAfterRender: TNotifyEvent;

Description

The OnAfterRender event occurs after the HTML code representing a specific component has been generated.  Write an OnAfterRender event handler of a specific web component to perform specific actions after the component is rendered and its HTML code is obtained.

All TcxWebComponent class descendants have an OnAfterRender event. This event simply references the OnAfterRender event handler of the TcxWebRenderHelper class.  The class uses its DoAfterRender method to fire the OnAfterRender event of the corresponding component owning the helper class.  Thus, you should use the OnAfterRender event property of a specific web component to assign the desired event handler.


TcxWebRenderHelper.OnBeforeRender

TcxWebRenderHelper          See Also

Occurs before rendering of a specific component starts.

property OnBeforeRender: TNotifyEvent;

Description

The OnBeforeRender event occurs before a specific renderer starts to generate the HTML code representing a specific component.  Write an OnBeforeRender event handler of a specific web component to perform desired actions before rendering of this component starts.

All TcxWebComponent class descendants have an OnBeforeRender event. This event simply references the OnBeforeRender event handler of the TcxWebRenderHelper class. The TcxWebRenderHelper class uses its DoBeforeRender method to fire the OnBeforeRender event of the corresponding component owning the helper class.  Thus, you should use the OnBeforeRender event property of a specific web component to assign the desired event handler.


TcxWebRenderHelper.ClearRenderers

TcxWebRenderHelper          See Also

Clears the list of registered renderers.

procedure ClearRenderers; virtual;

Description

The ClearRenderers method is used to clear the list of renderers registered for a specific component.  Each web component can have several renderers which help obtain different HTML component representations based on the type of client web browser.  Before being used, a renderer should be registered for a component.

Each component registers the necessary renderer classes (TcxWebRenderer descendants) by using its RegisterRenderers method.  Registering an individual renderer class implies calling the RegisterRenderer method of the TcxWebRenderHelper object.


TcxWebRenderHelper.Create

TcxWebRenderHelper          See Also

Creates a new TcxWebRenderHelper object instance.

constructor Create(AComponent: TComponent); override;

Description

The Create method is used to create a new instance of the TcxWebRenderHelper object.  After the inherited Create, calling this method initializes the internal variable which maintains the list of registered renderers.

Do not create instances of the TcxWebRenderHelper class.  This class is created internally by the GetWebRenderHelper method when accessing the WebRenderHelper property of a web component.


TcxWebRenderHelper.Destroy

TcxWebRenderHelper          See Also

Destroys a TcxWebRenderHelper object instance.

destructor Destroy; override;

Description

The Destroy method is used to destroy an instance of the TcxWebRenderHelper object.  Before the inherited Destroy, calling this method frees the internal variable which maintains the list of registered renderers.

The TcxWebRenderHelper object is automatically freed when the component owning the helper is destroyed.


TcxWebRenderHelper.GetRendererClass

TcxWebRenderHelper          See Also

Obtains a renderer class for a specific component based on the client web browser type.

function GetRendererClass(Browser: TcxWebBrowserClass): TcxWebRendererClass; virtual;

Description

The GetRendererClass method is used to return a renderer class for a specific web component.  The GetRendererClass method returns a renderer class based on the client web browser type specified by the Browser parameter.

Before being used, a renderer class should be registered for a component.  Each component registers necessary renderer classes (TcxWebRenderer descendants) by using its RegisterRenderers method.  Registering an individual renderer class implies calling the RegisterRenderer method of the TcxWebRenderHelper object.

The GetRendererClass method scans registered renderers starting from the last registered.  It uses the IsBrowserSupported method of renderers to determine whether a renderer is capable of producing code for the specified browser.  If no renderers are capable of rendering code for the browser, the corresponding control is not rendered at all.  Thus it is recommended to register one renderer whose IsBrowserSupported method always returns True.  Such a renderer must be registered the first in order to be examined the last.

This method implements the GetRendererClass method of the IcxCodeProvider interface.


TcxWebRenderHelper.RegisterRenderer

TcxWebRenderHelper          See Also

Registers a specific renderer for a specific component.

procedure RegisterRenderer(ARendererClass: TcxWebRendererClass);

Description

The RegisterRenderer method is used to register a new renderer for a specific component.  Each web component can have several renderers, which help obtain different HTML component representations based on the client web browser’s type.  Before being used, a renderer should be registered by the RegisterRenderer method.

The ARendererClass parameter specifies the renderer class being registered.  All EWF renderer classes are TcxWebRenderer class descendants.  The basic classes from which different types of component renderers are derived are TcxWebComponentRenderer and TcxWebControlRenderer.


TcxWebScriptsHelper
TcxWebScriptsHelper Object

Hierarchy          Properties          Methods          See Also

Represents a class which implements the part of a component’s functionality concerning script subscription.

Unit

cxWebClasses

TcxWebScriptsHelper = class(TcxWebHelper)

Description

The TcxWebScriptsHelper class is used to manage script subscription for a specific web component.  Each component can be subscribed to one or more script classes which process the corresponding events for the component.

A component (control) may need a number of client side scripts to be rendered.  For instance, if a component has a server side event handler assigned, it needs a __doPostBack function, which submits the form to be rendered.  Each client side script has a corresponding object (a TcxWebScript descendant), which implements two methods that return the script and HTML codes needed to be rendered within the form.  This technique allows EWF to get a list of scripts required by the components within the page module (and render these scripts).

As a TcxWebHelper class descendant, the TcxWebScriptsHelper class inherits the Component property which specifies the component to be subscribed to specific script classes.  Additionally, the TcxWebScriptsHelper class implements the ScriptSubscription method, which subscribes the component subscription for a specific script class.


TcxWebScriptsHelper Hierarchy
Hierarchy

TObject

     |

TcxWebHelper


Properties for TcxWebScriptsHelper
TcxWebScriptsHelper Properties

TcxWebScriptsHelper          Legend

Derived from TcxWebHelper

Component


Methods for TcxWebScriptsHelper
TcxWebScriptsHelper Methods

TcxWebScriptsHelper          Legend

In TcxWebScriptsHelper

Create

Destroy

ScriptSubscription


TcxWebScriptsHelper.Create

TcxWebScriptsHelper          See Also

Create a new TcxWebScriptsHelper object instance.

constructor Create(AComponent: TComponent); override;

Description

The Create method is used to create a new instance of the TcxWebScriptsHelper object.  After the inherited Create call, this method initializes the internal variable, which is used to store and maintain the list of script classes.

Do not create instances of the TcxWebScriptsHelper class.  This class is created internally by the GetWebScriptsHelper method when accessing the WebScriptsHelper property of a web component.


TcxWebScriptsHelper.Destroy

TcxWebScriptsHelper          See Also

Destroys a TcxWebScriptsHelper object instance.

destructor Destroy; override;

Description

The Destroy method is used to destroy a TcxWebScriptsHelper object instance.  Before the inherited Destroy call, this method frees the internal variable, which is used to store and maintain the list of script classes.  The TcxWebScriptsHelper object is automatically freed when the component owning the helper is destroyed.


TcxWebScriptsHelper.ScriptSubscription

TcxWebScriptsHelper          See Also

Subscribes a component to a script class.

procedure ScriptSubscription(const AClass: TClass);

Description

The ScriptSubscription method is used to subscribe a component to the script class specified by the AClass parameter.  Script classes are stored in the internal list of script classes for a particular component.  All script classes are TcxWebScript class descendants.  When the resulting content of a page is generated, the script factory scans all the components in the application and adapts their script classes.  Recurring script classes within the script factory are utilized to avoid duplicates.

The ScriptSubscription method is called by the ScriptsSubscription method of a particular web component.  Since the TcxWebComponent class supports the IcxWebScripts interface, it is forced to implement its ScriptsSubscription method.  The ScriptsSubscription method of the TcxWebComponent class checks whether a component uses a Hover style and, if true, calls the ScriptSubscription method of the component script helper object to subscribe the component to the TcxWebChangeStyleScript class.  Descendants (any web components) can override the ScriptsSubscription method of the TcxWebComponent class to perform their own subscription to the desired script classes.


TcxWebShading
TcxWebShading Object

Hierarchy          Properties          Methods          See Also

Represents an object, which specifies the background color of a component.

Unit

cxWebClasses

TcxWebShading = class(TcxWebStyleObject)

Description

The TcxWebShading class represents a web style constituent which is responsible for setting the appropriate background color for a component.  As a TcxWebStyleObject descendant, the TcxWebShading class inherits all its properties and methods which are basic for all style constituents.  Additionally, the TcxWebShading class contains a Color property that allows you to set the component’s background color.

The TcxWebShading class generates HTML code related to the background style.  This code is generated via the WriteHTML method of the TcxWebShading class.  Code generated by the TcxWebShading class is a part of the HTML code, written to the STYLE tag, if any of the components in the page uses the corresponding style.


TcxWebShading Hierarchy
Hierarchy

TPersistent

     |

TcxWebStyleObject


Properties for TcxWebShading
TcxWebShading Properties

TcxWebShading          Legend

In TcxWebShading

AssignedValues

Color

Derived from TcxWebStyleObject

WebStyle


Methods for TcxWebShading
TcxWebShading Methods

TcxWebShading          Legend

In TcxWebShading

Assign

WriteHTML

Derived from TcxWebStyleObject

BeginUpdate

Changed

Create

DoRestoreDefaults

EndUpdate

RestoreDefaults


TcxWebShading.AssignedValues

TcxWebShading          See Also

Specifies which property values of the TcxWebShading object differ from the default.

type

  TcxWebShadingAssignedValue = (wsavColor);

  TcxWebShadingAssignedValues = set of TcxWebShadingAssignedValue;

property AssignedValues: TcxWebShadingAssignedValues;

Description

The AssignedValues property lists the TcxWebShading object’s properties whose values differ from the default.  The AssignedValues property value is a set of zero or more of the following:

Value	Description
wsavColor	The Color property has been changed.

For example, if the AssignedValues property returns [wsavColor], the background color of the corresponding component will be changed.

Once the Color property value is changed from the default, wsavColor is added to the AssignedValues property.  It means that the HTML code representing this property should be generated.  In order not to render the corresponding HTML code, you should remove the wsavColor value manually or call the RestoreDefaults method of the TcxWebShading class.

The default value of the AssignedValues property is [].


TcxWebShading.Color

TcxWebShading          See Also

Specifies the background color of a component.

property Color: TcxWebColor;

Description

Use the Color property to set the appropriate color for the corresponding component.  You can set the Color property to one of the constants defined in the cxWebColor unit, or to an explicit RGB integer value.

The following sample code demonstrates how to set the Color property of the web style ‘Item2’ using a predefined constant.

var AStyleItem: TcxWebStyleItem;

//...

AStyleItem := StyleController1.ItemByName('Item2');

AStyleItem.Style.Shading.Color := clWebAliceBlue;

The code below performs the same setting with the help of the RGB integer value which represents the desired color.

var AStyleItem: TcxWebStyleItem;

//...

AStyleItem := StyleController1.ItemByName('Item2');

AStyleItem.Style.Shading.Color := $FFF8F0;

The default value of the Color property is a cxclDefaultStyleBkColor constant value.


TcxWebShading.WriteHTML

TcxWebShading          See Also

Writes HTML code rendered to represent the shading style of a control (controls).

procedure WriteHTML(HTMLTextBuilder: TcxHTMLTextBuilder);

Description

The WriteHTML method is used to write HTML code representing the background color specified by the Color property of the TcxWebShading object.  The code is written to the internal buffer of the object represented by the HTMLTextBuilder parameter.  This is performed via TcxHTMLTextBuilder class methods.

Review the sample code rendered by the WriteHTML method (it is highlighted).

<STYLE>

<!--

.cxWebPageModule3_cxWebStyleController1Item3 { background-color:#9ACD32; color:windowtext; font-family:MS Sans Serif; font-size:10pt; }

//-->

</STYLE>

ReadOnly Property


TcxWebShading.Assign

TcxWebShading          See Also

Copies the contents of one TcxWebShading object to another.

procedure Assign(Source: TPersistent); override;

Description

Call the Assign method to copy Color property contents from another TcxWebShading object specified via the Source parameter.


TcxWebStyle
TcxWebStyle Object

Hierarchy          Properties          Methods          See Also

Represents an individual style.

Unit

cxWebClasses

TcxWebStyle = class(TBasecxWebStyle)

Description

The TcxWebStyle object is used to represent an individual style to which a style item of the TcxWebStyleController object refers.  The TcxWebStyle class represents the Style property type of the TcxWebStyleItem class.  As a direct descendant of the TBasecxWebStyle object, the TcxWebStyle object inherits all its properties and methods which fully implement the functionality of an individual web style.  Additionally, the TcxWebStyle object implements its own StyleItem property, which obtains the corresponding TcxWebStyleItem object.


TcxWebStyle Hierarchy
Hierarchy

TPersistent

     |

TBasecxWebStyle


Properties for TcxWebStyle
TcxWebStyle Properties

TcxWebStyle          Legend

In TcxWebStyle

StyleItem

Derived from TBasecxWebStyle

Borders

Font

Numbering

Shading


Methods for TcxWebStyle
TcxWebStyle Methods

TcxWebStyle          Legend

In TcxWebStyle

Create

Derived from TBasecxWebStyle

Assign

BeginUpdate

Create

Destroy

EndUpdate

RestoreDefaults

WriteHTML


TcxWebStyle.StyleItem

TcxWebStyle          See Also

Specifies the style item which represents a style within a TcxWebStyleController object.

property StyleItem: TcxWebStyleItem;

Description

This property is used to obtain the TcxWebStyleItem object which corresponds to a style.  The TcxWebStyleItem object returned by the StyleItem property represents a style within the TcxWebStyleController object.  In turn, the TcxWebStyleItem class includes a Style property whose type is represented by the TcxWebStyle class.

ReadOnly Property


TcxWebStyle.Create

TcxWebStyle          See Also

Creates a TcxWebStyle object instance.

constructor Create(AStyleItem: TcxWebStyleItem);

Description

The Create method is used to create an instance of the TcxWebStyle object.  The AStyle parameter specifies the TcxWebStyleItem object which corresponds to a style.


TcxWebStyleController
 TcxWebStyleController Object

Hierarchy          Properties          Methods          See Also

Represents an object which is used to manage styles within your application and applies them to controls.

Unit

cxWebClasses

TcxWebStyleController = class(TComponent, IcxStylesProvider, IWebVariableName)

Description

The TcxWebStyleController class represents a non-visual component.  The TcxWebStyleController object can maintain a list of web styles - each of which is represented by the TcxWebStyleItem object.  Double-clicking the TcxWebStyleController icon on the form (or right-clicking the icon and selecting the "Style Editor…" item from the popup menu) invokes a dialog where you can add/modify/delete comprehensive individual styles which are available to visual controls.

Most of the EWF visual controls contain a single Styles property of type TcxWebStyles (TcxWebDBGrid has six properties controlling the display of various grid elements).  In turn, the TcxWebStyles contains two sub-properties: Default and Hover which control the visual display of a control depending on the mouse position (the Hover property provides 'hot tracking' – it is in effect when the mouse is over the control).  These properties are of type TcxWebStyleItem - so each of them can be set to the appropriate style - created and maintained by the TcxWebStyleController control.


TcxWebStyleController Hierarchy
Hierarchy

TComponent


Properties for TcxWebStyleController
TcxWebStyleController Properties

TcxWebStyleController          Legend

In TcxWebStyleController

Count

Designer

Items


Methods for TcxWebStyleController
TcxWebStyleController Methods

TcxWebStyleController          Legend

In TcxWebStyleController

Add

AssignItems

Clear

Create

Delete

Destroy

GetStyleList

IndexOf

ItemByName

WriteStyles


TcxWebStyleController.Count

TcxWebStyleController          See Also

Returns the number of TcxWebStyleItem objects in a TcxWebStyleController control.

property Count: Integer;

Description

The Count property contains the number of TcxWebStyleItem objects in the Items collection of the TcxWebStyleController object.  Since the Items array is indexed beginning with 0, Count is always one greater than the index of the last member in the array.

ReadOnly Property


TcxWebStyleController.Designer

TcxWebStyleController

Specifies the designer used to manage style items at design time.

property Designer: TAbstractcxWebStyleControllerDesigner;

Description

The Designer property is used to gain acces to the TAbstractcxWebStyleControllerDesigner class which represents the "Style Editor" designer corresponding to a given style controller.  The designer helps a developer manage style items for the style controller at design time.

The Designer property is designed for internal use only, so you should never use it yourself.

ReadOnly Property


TcxWebStyleController.Items

TcxWebStyleController          See Also

Provides access to a style item specified by its index.

property Items[Index:Integer]: TcxWebStyleItem;

Description

The TcxWebStyleController control is a container for several style items represented by TcxWebStyleItem objects.  The Items property is a collection that contains references to these TcxWebStyleItem objects.  Use the integer Index to access a specific style item.  The first style item has an index of 0.  The number of style items in the Items collection is specified by the Count property.


TcxWebStyleController.Add

TcxWebStyleController          See Also

Adds a new style item to the style controller.

function Add: TcxWebStyleItem;

Description

Call the Add method to insert a new style item at the end of the Items collection of the style controller.  The Add method returns this newly created style item represented by the TcxWebStyleItem object.

When a new style item is created via the Add method, a new style represented by the TcxWebStyle object is created for this style item as well.  So the Style property of a new TcxWebStyleItem object refers to this newly created TcxWebStyle object.  As a result, each style item for the style controller refers to its own single style via the Style property and vice versa - each individual web style belongs to a single style item (via the StyleItem property).


TcxWebStyleController.AssignItems

TcxWebStyleController          See Also

Assigns style items for a style controller to another.

procedure AssignItems(ASource: TcxWebStyleController);

Description

The AssignItems method clears the Items list of a style controller and then populates it with style items of another style controller specified by the ASource parameter.


TcxWebStyleController.Clear

TcxWebStyleController          See Also

Removes all style items from the Items collection of the style controller.

procedure Clear;

Description

Call the Clear method to empty the Items array of the style controller and free all allocated memory.  When you call the Clear method for the style controller, it calls the Free method for all style items that it contains.  Each style item of the style controller in turn calls the Free method for the associated web style.  So the Call method sequentially destroys all style items (type TcxWebStyleItem) and their corresponding web styles (type TcxWebStyle).


TcxWebStyleController.Create

TcxWebStyleController          See Also

Creates a new TcxWebStyleController object instance.

constructor Create(AOwner: TComponent); override;

Description

The Create method is used to create a new instance of the TcxWebStyleController object and initialize its Items property.

For style controllers created programmatically, that is, not created in the form designer, call the Create method and pass the owner component as an AOwner parameter.  The owner disposes of the style controller when it is destroyed.


TcxWebStyleController.Delete

TcxWebStyleController          See Also

Deletes a single style item from a style controller.

procedure Delete(AIndex: Integer);

Description

Use the Delete method to remove the style item specified by the AIndex parameter from the style controller.  The AIndex parameter is the index of the style item in the Items collection.  When you call the Delete method, it calls the Free method for the style item specified via the AIndex parameter.  This style item in turn calls the Free method for the associated web style.  So the Delete method destroys both the style item (type TcxWebStyleItem) and its corresponding web style (type TcxWebStyle).


TcxWebStyleController.Destroy

TcxWebStyleController          See Also

Destroys a TcxWebStyleController object instance.

destructor Destroy; override;

Description

The Destroy method is used to destroy an instance of the TcxWebStyleController object and release any allocated memory.  Before calling the inherited Destroy, this method frees the corresponding designer, removes all style items, and frees the Items property.


TcxWebStyleController.GetStyleList

TcxWebStyleController          See Also

Populates a specific list with style items of a web style controller.

procedure GetStyleList(const AList: TList);

Description

Use the GetStyleList method to populate the existing list of type TList with pointers to web style items contained within the style controller.  The list being populated is specified by the AList parameter.  The GetStyleList method sequentially adds pointers to each style item of the style controller to the specified list that must already exist.  As a result, the list specified by the AList parameter contains pointers to all style items represented by the style controller.  Thus you can access a specific web style item through the Items property of the list.


TcxWebStyleController.WriteStyles

TcxWebStyleController          See Also

Generates code for styles.

procedure WriteStyles(HTMLTextBuilder: TcxHTMLTextBuilder); virtual;

Description

The WriteStyles method implements the corresponding WriteStyles method of the IcxStylesProvider interface.  The WriteStyles method is used to write HTML code representing all styles used by at least one component.  The code is written to the internal buffer of the object represented by the HTMLTextBuilder parameter.  This is performed via the methods of the TcxHTMLTextBuilder class.


TcxWebStyleController.IndexOf

TcxWebStyleController          See Also

Returns the index of a specific style item in the Items collection.

function IndexOf(AItem: TcxWebStyleItem): Integer;

Description

Call the IndexOf method to obtain the index for a style item in the Items collection of the owning style controller.  Specify the desired style item as an AItem parameter.  The first style item in the array has an index of 0.  If a style item is not in the list, the IndexOf method returns -1.  If it appears more than once in the array, the IndexOf method returns the index of the first appearance.


TcxWebStyleController.ItemByName

TcxWebStyleController          See Also

Returns a style item by its name.

function ItemByName(const AName: string): TcxWebStyleItem;

Description

Use the ItemByName method to get a style item by its name - specified via the AName parameter.  The ItemByName method returns the TcxWebStyleItem object whose Name property value is equal to the AName parameter.

You can also use the Items property to access a specific style item by its integer index.


TcxWebStyleItem
TcxWebStyleItem Object

Hierarchy          Properties          Methods          See Also

Represents an individual web style which can be used by web controls.

Unit

cxWebClasses

TcxWebStyleItem = class(TComponent, IWebVariableName)

Description

The TcxWebStyleItem object represents an individual web style within your application.  Each TcxWebStyleItem object is an item of the collection represented by the Items property of the TcxWebStyleController object.  The TcxWebStyleController object is a non-visual component which maintains a list of web styles.  You can add/modify/delete individual styles (TcxWebStyleItem objects) via the Style Editor dialog which is invoked by double-clicking the TcxWebStyleController icon on the form (or right-clicking the icon and selecting the "Style Editor…" item from the popup menu).

The style items maintained by the style controller and represented via the TcxWebStyleItem objects are available to visual controls.  Most of the EWF visual controls contain a single Styles property of type TcxWebStyles (TcxWebDBGrid has six properties controlling the display of various grid elements).  In turn, the TcxWebStyles contains two sub-properties: Default and Hover which control the visual display of a control depending on the mouse position (the Hover property provides 'hot tracking' – it is in effect when the mouse pointer is over the control).  These properties are of type TcxWebStyleItem, so each of them can be set to the appropriate styles created and maintained by the TcxWebStyleController control.


TcxWebStyleItem Hierarchy
Hierarchy

TComponent


Properties for TcxWebStyleItem
TcxWebStyleItem Properties

TcxWebStyleItem          Legend

In TcxWebStyleItem

ClientCount

Clients

Controller

CustomHTML

FullName

Index

Style


Methods for TcxWebStyleItem
TcxWebStyleItem Methods

TcxWebStyleItem          Legend

In TcxWebStyleItem

Assign

Changed

Create

Destroy

GetParentComponent

GetVariableName

HasParent

ImplGetVariableName

Notification

RegisterClient

UnregisterClient

WriteHTML


TcxWebStyleItem.ClientCount

TcxWebStyleItem          See Also

Returns the number of controls which utilize a style item.

property ClientCount: Integer;

Description

Use the ClientCount property to determine the number of controls which refer to a given style item.  All controls referred to the style item have the same visual display characteristics (font size, background color, etc).  And these controls are notified when the style changes.

If you want to gain access to a specific control, you can use the Clients property and specify the index of the appropriate control via the Index parameter.

ReadOnly Property


TcxWebStyleItem.Clients

TcxWebStyleItem          See Also

Represents the list of controls which utilize a specific style item.

property Clients[Index:Integer]: IcxWebStyleChanged;

Description

Use the Clients property to gain access to a specific control (or object) which refers to a given style item via the Default or Hover sub-property of the Styles property.  The Index parameter specifies the position of this control (or object) in the list of controls referred to by the specified style item.

Said differently, the Clients property keeps the list of all controls which possess the specified web style item.  So these controls have the same visual display characteristics (font size, background color, etc) and are notified when the given style changes.

ReadOnly Property


TcxWebStyleItem.Controller

TcxWebStyleItem          See Also

Specifies the style controller to which a style item belongs.

property Controller: TcxWebStyleController;

Description

Use the Controller property to specify the style controller represented by the TcxWebStyleController object containing a style item.  This property allows you to easily move an appropriate style item from one style controller to another.

If you want to copy all style items of a controller to another, you can use the AssignItems method of the TcxWebStyleController object.  You may also wish to have a self-contained list of style controller items.  In such an instance, you should use the GetStyleList method of the TcxWebStyleController object to populate a specific list with pointers to style items of the controller.


TcxWebStyleItem.CustomHTML

TcxWebStyleItem          See Also

Contains manually entered HTML code representing a specific web style.

property CustomHTML: TStrings;

Description

The CustomHTML property is represented by the TStrings object whose strings can contain specific HTML code.  This HTML code should be entered by a developer manually at design time or should be assigned to the CustomHTML property at runtime.  This custom HTML code is utilized to singly describe a specific web style represented by the TcxWebStyleItem class.

If the CustomHTML property is not empty (i.e. any HTML code is assigned to it), its text content is used to render a web style (by means of the WriteHTML method of a style item); otherwise, HTML code is generated based on property values of style constituent parts (this code is composed of the parts generated by the Borders, Font, Numbering and Shading properties of the TBasecxWebStyle class).  The resulting HTML code is placed within the <STYLE> section of the main form.

The CustomHTML property may be used by advanced web developers who are familiar with CSS (cascading style sheets) to make use of CSS properties.


TcxWebStyleItem.FullName

TcxWebStyleItem          See Also

Specifies the full name of a style item including its owner name.

property FullName: string;

Description

The FullName property represents the name of a web style which is composed of two parts.  The first part is the name of the style item owner (the name of its owning style controller).  The second part is the individual style item name specified by its Name property.

The FullName property is used to differentiate styles owned by different style controllers by style names.

ReadOnly Property


TcxWebStyleItem.WriteHTML

TcxWebStyleItem

Writes HTML code representing the style associated with a style item.

procedure WriteHTML(HTMLTextBuilder: TcxHTMLTextBuilder);

Description

The WriteHTML method is used to generate HTML code for the style which is associated with a style item object.  If the CustomHTML property is not empty (and its text’s length is less than 1024), the WriteHTML method generates this custom HTML code to represent the corresponding style. Otherwise, the WriteHTML method calls the WriteHTML method of the TBasecxWebStyle class.  This method generates HTML code based on property values of the style class.  HTML code is composed of the parts generated by its Borders, Font, Numbering and Shading properties.  These properties are represented by the TcxWebBorders, TcxWebFont, TcxWebNumbering and TcxWebShading objects respectively.  Each of these objects generates its own HTML code, which specifies corresponding style characteristics.  The generated code is written to the inner buffer of the object specified by the HTMLTextBuilder parameter.  This is performed via the TcxHTMLTextBuilder class methods.

ReadOnly Property


TcxWebStyleItem.Index

TcxWebStyleItem          See Also

Specifies style item position in the Items collection of the TcxWebStyleController object.

property Index: Integer;

Description

Each TcxWebStyleItem object is indexed in the Items collection of the TcxWebStyleController object to which it belongs.  The Index property of the TcxWebStyleItem contains the item’s index value in that array.  Read the Index property value to determine the collection item’s position.  Set the Index property value to move the style item to a new position.  The style item’s index is zero-based.


TcxWebStyleItem.Style

TcxWebStyleItem          See Also

Specifies the associated web style.

property Style: TcxWebStyle;

Description

The Style property represents a reference to the associated TcxWebStyle object, which is used to manage the style of controls connected to a style item.  Use the Style property to set the Borders, Font, Numbering and Shading properties of the TcxWebStyle object to manipulate corresponding style characteristics.


TcxWebStyleItem.Assign

TcxWebStyleItem

Copies the contents of one TcxWebStyleItem object to another.

procedure Assign(Source: TPersistent); override;

Description

Call the Assign method to copy Style property contents from a different web style item specified by the Source parameter.


TcxWebStyleItem.Changed

TcxWebStyleItem          See Also

Sends notification that a style item has been changed.

procedure Changed;

Description

The Changed method notifies the components that use a specific style item of a style change.  The Changed method calls the StyleChanged method of every component (control) which is a member of the Clients list.  The StyleChanged method is declared by the IcxWebStyleChanged interface and is implemented by the TcxWebComponent class (and then is overridden by the TcxWebControl class).

A component (control) should override the StyleChanged method of the TcxWebComponent class (or the StyleChanged method of the TcxWebControl class) when it must responsd to style changes.


TcxWebStyleItem.Create

TcxWebStyleItem          See Also

Creates a new TcxWebStyleItem object instance.

constructor Create(AOwner: TComponent); override;

Description

The Create method is used to create a new instance of the TcxWebStyleItem object.  Additionally, this method creates the associated TcxWebStyle object, which is used to initialize the Style property.

For style items created programmatically, that is, not created with the help of the Style Editor dialog box at design time, call the Create method and pass the owner component (a style controller that must already exist) as an AOwner parameter.  The owner disposes of the style controller when it is destroyed.


TcxWebStyleItem.Destroy

TcxWebStyleItem          See Also

Destroys a TcxWebStyleItem object instance.

destructor Destroy; override;

Description

The Destroy method is used to destroy an instance of the TcxWebStyleItem object.  Before calling the inherited Destroy, this method resets the Controller property to nil, unregisters all controls referring to the associated web style, and frees the associated TcxWebStyle object.


TcxWebStyleItem.GetParentComponent

TcxWebStyleItem

Returns the TcxWebStyleController object to which a style item belongs.

function GetParentComponent: TComponent; override;

Description

Use the GetParentComponent method to obtain the TcxWebStyleController object which contains a specific style item.  The GetParentComponent method returns the Controller property value of the TcxWebStyleItem object.


TcxWebStyleItem.GetVariableName

TcxWebStyleItem          See Also

Calls the ImplGetVariableName method.

function GetVariableName: string;

Description

This method provides an implementation for the GetVariableName method of the IWebVariableName interface which is supported by the TcxWebStyleItem object.  The GetVariableName method calls the ImplGetVariableName method which returns the name of a given style item (the Name property value of the style item is returned).  Since the ImplGetVariableName method is virtual, you can override it to perform any actions your application needs dictate.


TcxWebStyleItem.HasParent

TcxWebStyleItem

Returns a Boolean value that specifies whether a given style item has a parent control.

function HasParent: Boolean; override;

Description

If a style item belongs to a style controller (the Controller property is not nil), the HasParent method returns True; otherwise, it returns False.


TcxWebStyleItem.ImplGetVariableName

TcxWebStyleItem          See Also

Returns the name of a specific style item.

function ImplGetVariableName: string; virtual;

Description

This method is called by the GetVariableName method which provides implementation for the corresponding GetVariableName method of the IWebVariableName interface supported by the TcxWebStyleItem object.  The ImplGetVariableName method is used to return the name of a specific style item (the Name property value of the style item is returned).  Since this method is virtual, you can override it to perform any specific actions your application needs dictate.


TcxWebStyleItem.Notification

TcxWebStyleItem

Responds to notifications that components are being destroyed.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

The Notification method is called automatically when the component specified by the AComponent parameter is about to be created or destroyed, as specified by the Operation parameter. The Notification method responds to component destruction (the Operation parameter is equal to opRemove) in the following manner:

If the AComponent parameter value is equal to the style controller specified by the Controller property, the Notification method sets the Controller property to nil. If the component specified by the AComponent parameter supports the IcxWebStyleChanged interface (the component is a web control that can use styles), the Notification method removes this control from the Clients list of controls which rely on style items.


TcxWebStyleItem.RegisterClient

TcxWebStyleItem          See Also

Adds a specific component (control) to the Clients list.

procedure RegisterClient(AComponent: IcxWebStyleChanged);

Description

The RegisterClient method is used to add a component (control) pointer to the Clients list.  The component to add is specified by the AComponent parameter.  The Clients property keeps a list of all controls which refer to style items.  A component (control) is added to the Clients list when it makes reference to a specific style item.  Controls which are Clients list members have the same visual display characteristics (font size, background color, etc) and they are notified when a certain style changes.


TcxWebStyleItem.UnregisterClient

TcxWebStyleItem          See Also

Removes a specific component (control) from the Clients list.

procedure UnregisterClient(AComponent: IcxWebStyleChanged);

Description

The UnregisterClient method is used to remove a pointer to a component (control) from the Clients list.  The component (control) to remove is specified by the AComponent parameter.  The Clients property keeps a list of all controls which refer to style items.  A component (control) is removed from the Clients list when it does not reference its style item any longer.  Controls which are Clients list members have the same visual display characteristics (font size, background color, etc) and they are notified when a certain style changes.


TcxWebStyleObject
TcxWebStyleObject Object

Hierarchy          Properties          Methods          See Also

Represents the base class from which style constituents are inherited.

Unit

cxWebClasses

TcxWebStyleObject = class(TPersistent)

Description

The TcxWebStyleObject is used as the base class from which most of the web style constituents are inherited.  The TcxWebStyleObject object represents a part of the whole style because it is a base class for the TcxWebBorders, TcxWebNumbering and TcxWebShading objects representing the Borders, Numbering and Shading properties of the web style respectively.

The TcxWebStyleObject object includes a WebStyle property of type TBasecxWebStyle which refers to the corresponding web style.  Additionally, the TcxWebStyleObject object provides a mechanism for performing your own actions when the default values of style constituents are to be restored.  The BeginUpdate, EndUpdate, RestoreDefaults, and DoRestoreDefaults methods provide this mechanism’s functionality.  You can override the protected DoRestoreDefaults method to perform specific actions as your needs dictate when restoring default values.


TcxWebStyleObject Hierarchy
Hierarchy

TPersistent


Properties for TcxWebStyleObject
TcxWebStyleObject Properties

TcxWebStyleObject          Legend

In TcxWebStyleObject

WebStyle


Methods for TcxWebStyleObject
TcxWebStyleObject Methods

TcxWebStyleObject          Legend

In TcxWebStyleObject

BeginUpdate

Changed

Create

DoRestoreDefaults

EndUpdate

RestoreDefaults


TcxWebStyleObject.WebStyle

TcxWebStyleObject

Returns the web style associated with a TcxWebStyleObject object.

property WebStyle: TBasecxWebStyle;

Description

Use the WebStyle property to obtain a web style which is associated with the TcxWebStyleObject object.  The TcxWebStyleObject object, represents a part of the whole style because it is the base class for the TcxWebBorders, TcxWebNumbering and TcxWebShading objects representing the Borders, Numbering and Shading properties of the web style respectively.  So you can refer to a web style object via the WebStyle property.

ReadOnly Property


TcxWebStyleObject.BeginUpdate

TcxWebStyleObject          See Also

Forces a corresponding web style object not to respond to property value changes.

procedure BeginUpdate;

Description

The BeginUpdate method calls the corresponding web style object’s BeginUpdate method.  This method is called to prevent a control’s response to style changes.  This feature is used internally and also allows you to prevent multiple redrawing of a control when setting several style properties consecutively.  After the desired changes are made, you should call the EndUpdate method to force your control to respond to the changes made.  Note that each BeginUpdate method call increments the internal counter by one.  The initial value of this counter is 0.  Each EndUpdate method call decrements it.  A control can be redrawn only when the internal counter is 0.

Note: The BeginUpdate and EndUpdate methods take effect at design time only.

These methods are used internally since you can change the property value that affects some other properties.  For instance, you can change the Color property value of the TcxWebBorders object.  This property sets the same color to all edges of a component.  Thus the Color property of each TcxWebBorder object representing the left, top, right and bottom edges needs to be changed.  The BeginUpdate and EndUpdate methods combination is used to prevent control redrawing after each border color change.


TcxWebStyleObject.Changed

TcxWebStyleObject

Performs specific actions when style constituents are changed.

procedure Changed; dynamic;

Description

The Changed method calls the corresponding web style object’s Changed method.  This method is called when any style constituents are changed.  In turn, it calls the DoChanged method of the TBasecxWebStyle object.  The DoChanged method performs nothing by default, so you can override it to perform your own specific actions after style constituents have been changed.


TcxWebStyleObject.Create

TcxWebStyleObject

Creates a new TcxWebStyleObject object instance.

constructor Create(AWebStyle: TBasecxWebStyle); virtual;

Description

The Create method is used to create a new instance of the TcxWebStyleObject object.  The AWebStyle parameter is used to initialize the WebStyle property.  The AWebStyle parameter specifies the web style (inherited from the TBasecxWebStyle class) owning the TcxWebStyleObject object.


TcxWebStyleObject.DoRestoreDefaults

TcxWebStyleObject          See Also

Used to restore default style settings.

procedure DoRestoreDefaults; dynamic;

Description

The DoRestoreDefaults method performs no actions by default.  Descendant classes override this method to restore the default values of their individual properties.


TcxWebStyleObject.EndUpdate

TcxWebStyleObject          See Also

Forces the corresponding web style object to respond to property value changes.

procedure EndUpdate;

Description

The EndUpdate method calls the corresponding web style object’s EndUpdate method.  This method is called to force a control to respond to changes made.  The EndUpdate method works together with the BeginUpdate method, which is called to prevent a control’s response to style changes.  This feature is used internally and also allows you to prevent multiple redrawing when setting several style properties consecutively.  Note that each BeginUpdate method call increments the internal counter by one.  The initial value of this counter is 0.  Each EndUpdate method call decrements it.  A control can be redrawn only when the internal counter is 0.

Note: The BeginUpdate and EndUpdate methods take effect at design time only.

These methods are used internally, since you can change the property value that affects some other properties.  For instance, you can change the Color property value of the TcxWebBorders object.  This property sets the same color to all component edges.  Thus the Color property of each TcxWebBorder objects representing the left, top, right and bottom edges needs to be changed.  The BeginUpdate and EndUpdate methods combination is used to prevent control redrawing after each border color change.


TcxWebStyleObject.RestoreDefaults

TcxWebStyleObject          See Also

Performs specific actions when restoring default style settings.

procedure RestoreDefaults;

Description

The RestoreDefaults method is called when it is necessary to perform specific actions to restore style constituent settings to their default values.  This method, in turn, calls the DoRestoreDefaults method of the TcxWebStyleObject object.  The DoRestoreDefaults method performs nothing by default.  Descendant classes override this method to restore the default values of their properties.


TcxWebStyles
TcxWebStyles Object

Hierarchy          Properties          Methods          See Also

Represents a control’s Styles property type.

Unit

cxWebClasses

TcxWebStyles = class(TPersistent)

Description

The TcxWebStyles object is used to set the appropriate look & feel styles for each of the control states.  In the current version, a control is considered to have two basic states based upon mouse cursor position.  If the mouse pointer hovers over it, the control is in a Hover state (said differently, the control has the Hover style).  Otherwise, the control is in a Default state.

Thus the TcxWebStyles object provides both a Default and Hover property, which will be set to the appropriate look & feel styles.  You are able to process a number of desired styles with the help of the TcxWebStyleController object.  The TcxWebStyleController object is used to manage the collection of appropriate styles: you can create, modify, and delete style items via the design time Style Editor or via the properties and methods provided by the TcxWebStyleController object.


TcxWebStyles Hierarchy
Hierarchy

TPersistent


Properties for TcxWebStyles
TcxWebStyles Properties

TcxWebStyles          Legend

In TcxWebStyles

Component

Default

Hover

Items


Methods for TcxWebStyles
TcxWebStyles Methods

TcxWebStyles          Legend

In TcxWebStyles

Assign

Create

ItemCount

Notification


TcxWebStyles.Component

TcxWebStyles          See Also

Returns the component which owns a TcxWebStyles object.

property Component: TComponent;

Description

Use the Component property to obtain the component which owns a given style.

ReadOnly Property


TcxWebStyles.Default

TcxWebStyles          See Also

Specifies the default style of a component (control).

property Default: TcxWebStyleItem;

Description

Use the Default property to set or get the style that specifies the default appearance of a component (control).  You are able to possess a number of desired styles with the help of the TcxWebStyleController object.  The TcxWebStyleController object is used to manage the collection of appropriate styles: you can create, modify, and delete styles via the design time Style Editor or via the properties and methods provided by the TcxWebStyleController object.  The style specified by the Default property affects the appearance that a component (control) has by default after its page is loaded and the mouse pointer is not over it.

If you want to specify the hover style for your component (control), you can use the Hover property of the TcxWebStyles object.  The hover style is the style which a component (control) assumes when a user moves the mouse pointer over it.


TcxWebStyles.Hover

TcxWebStyles          See Also

Specifies the hover style of a component (control).

property Hover: TcxWebStyleItem;

Description

Use the Hover property to set or get the style that specifies the appearance of a component (control) when the mouse pointer hovers over it.  You are able to process a number of desired styles with the help of the TcxWebStyleController object.  The TcxWebStyleController object is used to manage the collection of appropriate styles: you can create, modify, and delete styles via the design time Style Editor or via the properties and methods provided by the TcxWebStyleController object.  The style specified by the Hover property affects the appearance that a component (control) has under the mouse cursor.

If you want to specify the default style for your component (control), you can use the Default property of the TcxWebStyles object.  The default style is the style which a component (control) assumes by default after its page is loaded and the mouse pointer is not over it.


TcxWebStyles.Items

TcxWebStyles          See Also

Provides indexed access to available style types.

property Items[Index:Integer]: TcxWebStyleItem;

Description

This property provides access to the Default and Hover styles by their indexes (the Default item index equals 0, and the Hover item index equals 1).  The total number of available style types is returned by the ItemCount property.

The Items property can be used to refer to the appropriate style by its index within the collection of predefined style types instead of using the Default or Hover property.

ReadOnly Property


TcxWebStyles.Assign

TcxWebStyles          See Also

Assigns the contents of one TcxWebStyles class instance to another.

procedure Assign(Source: TPersistent); override;

Description

Use this method to assign property values of an existing TcxWebStyles class instance to another.  The Assign method initializes the Default and Hover property values of a TcxWebStyles class instance.


TcxWebStyles.Create

TcxWebStyles

Creates a TcxWebStyles object instance.

constructor Create(AOwner: IcxWebStyleChanged);

Description

The Create method is used to create an instance of the TcxWebStyles object.  The AOwner parameter specifies the IcxWebStyleChanged interface which identifies the component owning the TcxWebStyles object.


TcxWebStyles.ItemCount

TcxWebStyles          See Also

Returns the count of all available style types.

function ItemCount: Integer; virtual;

Description

This method returns the available style types count.  There are two style types in the current version: default and hover.  Thus the ItemCount method returns 2.


TcxWebStyles.Notification

TcxWebStyles

Responds to notifications that a style item associated with the Default or Hover property is being destroyed.

procedure Notification(AComponent: TComponent; AOperation: TOperation); virtual;

Description

The Notification method is called automatically when the style item specified by the AComponent parameter is about to be removed from or inserted to the Items list of its style controller.  The Operation parameter specifies the type of operation being performed.

The Notification method performs the following actions in response to style item destruction (the Operation parameter equals opRemove). If the AComponent parameter value is equal to the style item specified by the Default property, the Notification method sets the Default property to nil.

If the AComponent parameter value is equal to the style item specified by the Hover property, the Notification method sets the Hover property to nil.


TcxWebValuesHelper
TcxWebValuesHelper Object

Hierarchy          Properties          Methods          See Also

Implements a part of the components functionality relating to value maintenance.

Unit

cxWebClasses

TcxWebValuesHelper = class(TcxWebHelper)

Description

The TcxWebValuesHelper class is used to maintain value changes at the client side of an application.  This class implements methods declared by the IcxWebValues interface.  But the TcxWebValuesHelper class does not fully support this interface.  The TcxWebRenderHelper class is used by the TcxWebComponent, TcxCustomWebDataSource and TcxWebColumn classes (via their WebRenderHelper property) to implement the delegated IcxWebValues interface which allows setting of proper values for a particular web component.  The values are correspondingly set for the component after reading fields of an HTTP request message.


TcxWebValuesHelper Hierarchy
Hierarchy

TObject

     |

TcxWebHelper


Properties for TcxWebValuesHelper
TcxWebValuesHelper Properties

TcxWebValuesHelper          Legend

In TcxWebValuesHelper

Values

Derived from TcxWebHelper

Component


Methods for TcxWebValuesHelper
TcxWebValuesHelper Methods

TcxWebValuesHelper          Legend

In TcxWebValuesHelper

Create

Destroy

RegisterValue


TcxWebValuesHelper.Values

TcxWebValuesHelper          See Also

Represents a list of web component values.

property Values: TStrings;

Description

Initially the Values list contains names (IDs) of the HTML elements whose values should be read from the fields of an HTTP request message.  These component names (IDs) are written to the Values property by the RegisterValues method of the component.

When an HTTP request message is received by the server, its content is parsed, separated into fields with an ampersand character.  Then the values of the registered HTML elements are retrieved from the fields of the HTTP request message to the Values property using the previously added name as the index.  These values are written to the Values collection in a "Name = Value" format.  Once all controls are scanned, each of them contains a list of properties and their values, which must be set.  This allows a control not to lose the entered value when reloading a page.

Finally, the Values collection should be assigned to the corresponding control’s property(s).  The DoSetValues method is used for this purpose.  It is implemented by each component in the specific manner.

ReadOnly Property


TcxWebValuesHelper.Create

TcxWebValuesHelper          See Also

Creates a new TcxWebValuesHelper object instance.

constructor Create(AComponent: TComponent); override;

Description

The Create method is used to create a new instance of the TcxWebValuesHelper object.  In addition to the inherited Create call, this method initializes the Values property.

Do not create instances of the TcxWebValuesHelper class.  This class is created internally by the GetWebValuesHelper method when accessing the WebValuesHelper property of a web component.


TcxWebValuesHelper.Destroy

TcxWebValuesHelper          See Also

Destroys a TcxWebValuesHelper object instance.

destructor Destroy; override;

Description

The Destroy method is used to destroy an instance of the TcxWebValuesHelper object.  Before the inherited Destroy call, this method frees the Values property.

The TcxWebValuesHelper object is automatically freed when the component owning the helper is destroyed.


TcxWebValuesHelper.RegisterValue

TcxWebValuesHelper          See Also

Adds a specific component value to the Values list.

procedure RegisterValue(const AName: string; AValue: string);

Description

The RegisterValue method is used to add the component value specified via the AName and AValue parameters to the list of strings represented by the Values property.  The AName parameter specifies the name of the HTML element which contains the value.  The AValue parameter represents the current component value.  The RegisterValue method adds a single string with form Name=Value to the Values property.

Each web component supporting the IcxWebValues interface should implement its own RegisterValues method.  This method can call the RegisterValue method as many times as necessary to set all values of a specific component.


IcxWebGetStyles
IcxWebGetStyles Interface

Hierarchy          Methods

Declares the method which, when implemented, should return styles for a specific component.

Unit

cxWebClasses

IcxWebGetStyles = interface(IUnknown)

Description

The IcxWebGetStyles interface declares the GetStyles method which, when implemented, should provide the ability to obtain styles for a specific component.  The intent of the GetStyles method is to return the Styles property value (TcxWebStyles type) of web components.

The IcxWebGetStyles interface is supported and implemented by the TcxWebComponent class which is the base class for all web components.


IcxWebGetStyles Hierarchy
Hierarchy

IUnknown


Methods for IcxWebGetStyles
IcxWebGetStyles Methods

IcxWebGetStyles          Legend

In IcxWebGetStyles

GetStyles


IcxWebGetStyles.GetStyles

IcxWebGetStyles

Returns the Styles property value of a specific component.

function GetStyles: TcxWebStyles;

Description

The GetStyles method is utilized to return the Styles property value (TcxWebStyles type) of web components.  The GetStyles method is implemented by the corresponding GetStyles private method of the TcxWebComponent object which supports the IcxWebGetStyles interface.  So all TcxWebComponent object descendants automatically support this interface and provide the ability of obtaining their styles (the Styles property value).

The GetStyles method is used by the TcxWebComponent class as a read specifier for the Styles property of a web component.  If the Styles property is not initialized, the GetStyles method creates a new instance of the TcxWebStyles class and assigns it to the Styles property.


IcxWebStyleChanged
IcxWebStyleChanged Interface

Hierarchy          Methods

Declares the method which is implemented to perform specific actions when changing the style used by a specific component.

Unit

cxWebClasses

IcxWebStyleChanged = interface(IUnknown)

Description

The IcxWebStyleChanged interface enables a component to perform specific actions when the Default (or Hover) style used by it is changed.  The StyleChanged method declared by the IcxWebStyleChanged interface is implemented by the corresponding StyleChanged method of the TcxWebComponent object.  But this StyleChanged method performs nothing by default.  Thus, TcxWebComponent object descendants can override its StyleChanged method to perform necessary actions in response to the corresponding style changes.


IcxWebStyleChanged Hierarchy
Hierarchy

IUnknown


Methods for IcxWebStyleChanged
IcxWebStyleChanged Methods

IcxWebStyleChanged          Legend

In IcxWebStyleChanged

StyleChanged


IcxWebStyleChanged.StyleChanged

IcxWebStyleChanged

Performs specific actions in response to corresponding style changes.

procedure StyleChanged(Style: TcxWebStyleItem);

Description

The StyleChanged method is utilized to perform specific actions when the style used by a specific component is changed.  The StyleChanged method is implemented by the corresponding StyleChanged method of the TcxWebComponent object which performs nothing by default.  TcxWebComponent object descendants can override its StyleChanged method to perform necessary actions in response to corresponding style changes.

The StyleChanged method is automatically called by the Change method of the TcxWebStyleItem class for each web control referred to a specific style item (said differently, for each member of the Clients collection) when style characteristics are changed.


cxWebGetWidthValues
cxWebGetWidthValues Procedure

Unit

cxWebClasses

procedure cxWebGetWidthValues(Proc: TGetStrProc);

Description

Calls the procedure specified via the Proc parameter for each element of the cxWebBorderWidths array transmitting the Name field of elements as a parameter.

This function is used for internal needs at design time.


cxWebIdentToWidth
cxWebIdentToWidth Function

Unit

cxWebClasses

function cxWebIdentToWidth(const Ident: string; var Width: Longint): Boolean;

Description

The cxWebIdentToWidth function returns a Boolean value that specifies whether it is possible to successfully convert the specified Ident parameter string identifier to its corresponding integer value which is returned by the Width parameter.

The cxWebIdentToWidth function uses a cxWebBorderWidths array of records that describe mapping.  Each member of the array contains a Value field, which is the integer value to translate and a Name field, which is the corresponding string identifier.

The cxWebIdentToWidth function looks for the string specified by the Ident parameter, comparing it with the Name field of the cxWebBorderWidths mapping array entry.  If it finds a match, it sets the Width parameter to the corresponding Value field and returns True.  If it does not, it returns False.

This function is for internal use at design time.


cxWebWidthToCursor
cxWebWidthToCursor Function

Unit

cxWebClasses

function cxWebWidthToCursor(const S: string): TcxWebBorderWidth;

Description

The cxWebWidthToCursor function returns a positive integer value (type TcxWebBorderWidth) that corresponds to the string expression specified via the S parameter.

The S parameter specifies a string designation for the border width of a specific web component.

The cxWebWidthToCursor function calls the cxWebIndentToWidth function which tries to find a string identifier specified by the S parameter and then return its corresponding integer value.  If this function fails to find the registered identifier in the cxWebBorderWidths mapping array (it returns False), the cxWebWidthToCursor function converts string S which thus represents an integer-type number to a number.

This function is for internal use at design time.


cxWebWidthToIdent
cxWebWidthToIdent Function

Unit

cxWebClasses

function cxWebWidthToIdent(Width: Longint; var Ident: string): Boolean;

Description

The cxWebWidthToIdent function returns a Boolean value that specifies whether it is possible to successfully convert the integer specified by the Width parameter to its corresponding string identifier which is returned by the Ident parameter.

This function is for internal use at design time.


cxWebWidthToString
cxWebWidthToString Function

Unit

cxWebClasses

Declaration

function cxWebWidthToString(Width: TcxWebBorderWidth): string;

Description

The cxWebWidthToString function returns the string expression of a positive integer value that specifies the border width of a specific web component.

The cxWebWidthToString function calls the cxWebWidthToIdent function which tries to find a corresponding string identifier to the integer specified via the Width parameter.  If the cxWebWidthToIdent function fails to find the registered identifier for the Width value in the cxWebBorderWidths mapping array (it returns False), the cxWebWidthToString function converts the integer to a string containing the decimal representation of the number.

This function is for internal use at design time.


TcxWebBorderAssignedValue
TcxWebBorderAssignedValue type

Contains values corresponding to TcxWebBorder class properties.

Unit

cxWebClasses

TcxWebBorderAssignedValue = (wbavColor, wbavStyle, wbavWidth);

Description

The TcxWebBorderAssignedValue type contains values which are used to set the AssignedValues property of the TcxWebBorder class.  TcxWebBorderAssignedValue type values specify the TcxWebBorder object’s properties whose values differ from the default.

Value	Description
wbavColor	The Color property of the TcxWebBorder object has been changed.
wbavStyle	The Style property of the TcxWebBorder object has been changed.
wbavWidth	The Width property of the TcxWebBorder object has been changed.


TcxWebBorderAssignedValues
TcxWebBorderAssignedValues type

Represents a set of values corresponding to TcxWebBorder class properties.

Unit

cxWebClasses

TcxWebBorderAssignedValues = set of TcxWebBorderAssignedValue;

Description

The TcxWebBorderAssignedValues type represents a set of values of type TcxWebBorderAssignedValue.  These values specify the TcxWebBorder object's properties which have been set or whose values differ from the default.


TcxWebBorderStyle
TcxWebBorderStyle type

Specifies the border style of a web control.

Unit

cxWebClasses

TcxWebBorderStyle = (wbsNone, wbsSolid, wbsDotted, wbsDashed, wbsDouble, wbsGroove, wbsRidge, wbsInset, wbsOutset);

Description

The TcxWebBorderStyle type represents an enumerated type which defines an ordered set of values used to set the Style property of the TcxWebBorders object (or the Style property of the TcxWebBorder objects). Border width is controlled by the Width property of the TcxWebBorders object (or by the Width property of the TcxWebBorder objects).

Value	Description	Example
wbsNone	No border is drawn.
wbsSolid	A solid line border.
wbsDotted	A dotted line border.
wbsDashed	A dashed line border.
wbsDouble	A double solid line border.
wbsGroove	A grooved border for a sunken border appearance.
wbsRidge	A ridged border for a raised border appearance.
wbsInset	An inset border for a sunken control appearance.
wbsOutset	An outset border for a raised control appearance.
Note:  When using the wbsDouble style, the border width you specify must be wide enough to accommodate both lines and the space in between.


TcxWebBorderWidth
TcxWebBorderWidth type

Represents the Width property type of the TcxWebBorder class (and the Width property of the TcxWebBorders class).

Unit

cxWebClasses

TcxWebBorderWidth = 0..32767;

Description

The TcxWebBorderWidth type specifies a range of positive numbers which can be used to set the border width of a specific component.  Component border width is measured in pixels.  Thus the TcxWebBorderWidth type specifies that you can change the border width from 0 pixel to 32767 pixels.


TcxWebNumberingAssignedValue
TcxWebNumberingAssignedValue type

Contains values corresponding to TcxWebNumbering class properties.

Unit

cxWebClasses

TcxWebNumberingAssignedValue = (wnavPosition, wnavStyle);

Description

The TcxWebNumberingAssignedValue type contains the values which are used to set the AssignedValues property of the TcxWebNumbering object.  TcxWebNumberingAssignedValue type values specify the TcxWebNumbering object’s properties which have been set or whose values differ from the default.

Value	Description
wnavPosition	The Position property of the TcxWebNumbering object has been changed.
wnavStyle	The Style property of the TcxWebNumbering object has been changed.


TcxWebNumberingAssignedValues
TcxWebNumberingAssignedValues type

Represents a set of values corresponding to TcxWebNumbering class properties.

Unit

cxWebClasses

TcxWebNumberingAssignedValues = set of TcxWebNumberingAssignedValue;

Description

The TcxWebNumberingAssignedValues type represents a set of values of type TcxWebNumberingAssignedValue.  These values specify the TcxWebNumbering object’s properties which have been set or whose values differ from the default.


TcxWebNumberingPosition
TcxWebNumberingPosition type

Used to set the Position property value of the TcxWebNumbering object.

Unit

cxWebClasses

TcxWebNumberingPosition = (wnpInside, wnpOutside);

Description

The TcxWebNumberingPosition type represents an enumerated type which defines an ordered set of values used to set the Position property of the TcxWebNumbering object.  These values determine how the list item marker is drawn with regard to item content.

The following values specify the position of the list item marker.

Value	Description	Example
wnpInside	List item text is right indented with respect to its default location.  List item marker is drawn in the left text bound position of the default text location.
wnpOutside	List item text begins form its defaul position.  List item marker is drawn left indented with respect to the left text bound.


TcxWebNumberingStyle
TcxWebNumberingStyle type

Used to set the Style property of the TcxWebNumbering object.

Unit

cxWebClasses

TcxWebNumberingStyle = (wnsNone, wnsCircle, wnsDisc, wnsSquare, wnsDecimal, wnsUpperRoman, wnsUpperAlpha, wnsLowerAlpha, wnsLowerRoman, wnsPicture);

Description

The TcxWebNumberingStyle type represents an enumerated type which defines an ordered set of values used to set the Style property of the TcxWebNumbering object.  These values determine the look & feel of the list item marker.

TcxWebNumberingStyle contains the following values.

Value	Description	Example
wnsNone	List has no item markers.
wnsCircle	List item marker is an outlined circle.
wnsDisc	List item marker is a solid circle.
wnsSquare	List item marker is a solid square.
wnsDecimal	List item marker is a decimal value (1, 2, 3, 4, and, etc).
wnsUpperRoman	List item marker is a roman numeral in upper case (I, II, III, IV, and etc).
wnsUpperAlpha	List item marker is an alpha character in upper case (A, B, C, D, and etc).
wnsLowerAlpha	List item marker is an alpha character in lower case (a, b, c, d, and etc).
wnsLowerRoman	List item marker is a roman numeral in lower case (I, II, III, IV, and etc).
wnsPicture	List item marker is represented by the image specified via the Picture property of the TcxWebNumbering object.


TcxWebShadingAssignedValue
TcxWebShadingAssignedValue type

Contains values corresponding to the TcxWebShading object’s properties.

Unit

cxWebClasses

TcxWebShadingAssignedValue = (wsavColor);

Description

TcxWebShadingAssignedValue type contains the value used to set the AssignedValues property of the TcxWebShading object.  The TcxWebShadingAssignedValue type value specifies whether the Color property of the TcxWebShading object has been set or if its value differ from the default.

Value	Description
wsavColor	The Color property of the TcxWebShading object has been changed.


TcxWebShadingAssignedValues
TcxWebShadingAssignedValues type

Represents a set of values corresponding to the TcxWebShading object’s properties.

Unit

cxWebClasses

TcxWebShadingAssignedValues = set of TcxWebShadingAssignedValue;

Description

The TcxWebShadingAssignedValues type represents a set of values of type TcxWebShadingAssignedValue.  These values specify the TcxWebShading object’s properties which have been set or whose values differ from the default.


bwMedium constant
bwMedium global constant

Specifies a medium border width.

Unit

cxWebClasses

bwMedium = TcxWebBorderWidth(4);

Description

The bwMedium global constant specifies the value which represents a medium width for web component borders.  Component border width is measured in pixels.  Thus, the bwMedium global constant specifies that a medium border width is equal to 4 pixels.


bwThick constant
bwThick global constant

Specifies a thick border width.

Unit

cxWebClasses

bwThick = TcxWebBorderWidth(6);

Description

The bwThick global constant specifies the value which represents a thick width for web component borders.  Component border width is measured in pixels.  Thus, the bwThick global constant specifies that a thick border width is equal to 6 pixels.


bwThin constant
bwThin global constant

Specifies a thin border width.

Unit

cxWebClasses

bwThin = TcxWebBorderWidth(2);

Description

The bwThin global constant specifies the value which represents a thin width for web component borders.  Component border width is measured in pixels.  Thus the bwThin global constant specifies that a thin border width is equal to 2 pixels.


cxclDefaultStyleBkColor constant
cxclDefaultStyleBkColor global constant

Specifies the default background color of a control.

Unit

cxWebClasses

cxclDefaultStyleBkColor = clWebWindow;

Description

The cxclDefaultStyleBkColor global constant contains the default background color which is used to set a specific web component style.  The value of the cxclDefaultStyleBkColor global constant is equal to the predefined clWebWindow color which specifies the background color of the client area of a window.

The value of the cxclDefaultStyleBkColor global constant is the default value of the TcxWebShading class’s Color property.


cxclDefaultStyleBorderColor constant
cxclDefaultStyleBorderColor global constant

Specifies the default border color of a control.

Unit

cxWebClasses

cxclDefaultStyleBorderColor = clWebWindowText;

Description

The cxclDefaultStyleBorderColor global constant contains the default border color which is used to set a specific web component style.  The value of the cxclDefaultStyleBorderColor global constant is equal to the predefined clWebWindowText color which specifies the text color in the client area of a window.

The value of the cxclDefaultStyleBorderColor global constant is the default value of the TcxWebBorder class’s Color property.


TcxWebColor

Used to specify web color.

Unit

cxWebTypes

TcxWebColor = -$7FFFFFFF-1..$7FFFFFFF;

Description

The TcxWebColor type is used to specify the color of a web object.  It is used by the Color property of many web components and by a number of other properties that specify color values.

The cxWebColors unit contains definitions of useful constants for the TcxWebColor type.  These constants map either directly to the closest matching color in the system palette (for example, clWebBlue maps to blue) or to the corresponding system screen element color defined in the Color section of the Windows Control panel (for example, clWebButtonFace maps to the system color for button faces).

If you specify the TcxWebColor type value as a specific 4-byte hexadecimal number instead of using the constants defined in the cxWebColors unit, the lower three bytes represent RGB color intensities for blue, green, and red, respectively.  The value $00FF0000 represents full-intensity, pure blue, $0000FF00 is pure green, and $000000FF is pure red. $00000000 is black and $00FFFFFF is white.

The following table lists the color constants from the cxWebColors unit.

Value	Delphi color value	Rendered HTML color value	Example
clWebAliceBlue	$FFF8F0	#F0F8FF
clWebAntiqueWhite	$D7EBFA	#FAEBD7
clWebAqua	$FFFF00	#00FFFF
clWebAquamarine	$D4FF7F	#7FFFD4
clWebAzure	$FFFFF0	#F0FFFF
clWebBeige	$DCF5F5	#F5F5DC
clWebBisque	$C4E4FF	#FFE4C4
clWebBlack	$0	#000000
clWebBlanchedAlmond	$CDEBFF	#FFEBCD
clWebBlue	$FF0000	#0000FF
clWebBlueViolet	$E22B8A	#8A2BE2
clWebBrown	$2A2AA5	#A52A2A
clWebBurlyWood	$87B8DE	#DEB887
clWebCadetBlue	$A09E5F	#5F9EA0
clWebChartreuse	$FF7F	#7FFF00
clWebChocolate	$1E69D2	#D2691E
clWebCoral	$507FFF	#FF7F50
clWebCornflowerBlue	$ED9564	#6495ED
clWebCornsilk	$DCF8FF	#FFF8DC
clWebCrimson	$3C14DC	#DC143C
clWebCyan	$FFFF00	#00FFFF
clWebDarkBlue	$8B0000	#00008B
clWebDarkCyan	$8B8B00	#008B8B
clWebDarkGoldenrod	$B86B8	#B8860B
clWebDarkGray	$A9A9A9	#A9A9A9
clWebDarkGreen	$6400	#006400
clWebDarkKhaki	$6BB7BD	#BDB76B
clWebDarkMagenta	$8B008B	#8B008B
clWebDarkOliveGreen	$2F6B55	#556B2F
clWebDarkOrange	$8CFF	#FF8C00
clWebDarkOrchid	$CC3299	#9932CC
clWebDarkRed	$8B	#8B0000
clWebDarkSalmon	$7A96E9	#E9967A
clWebDarkSeaGreen	$8FBC8F	#8FBC8F
clWebDarkSlateBlue	$8B3D48	#483D8B
clWebDarkSlateGray	$4F4F2F	#2F4F4F
clWebDarkTurquoise	$D1CE00	#00CED1
clWebDarkViolet	$D30094	#9400D3
clWebDeepPink	$9314FF	#FF1493
clWebDeepSkyBlue	$FFBF00	#00BFFF
clWebDimGray	$696969	#696969
clWebDodgerBlue	$FF901E	#1E90FF
clWebFireBrick	$2222B2	#B22222
clWebFloralWhite	$F0FAFF	#FFFAF0
clWebForestGreen	$228B22	#228B22
clWebFuchsia	$FF00FF	#FF00FF
clWebGainsboro	$DCDCDC	#DCDCDC
clWebGhostWhite	$FFF8F8	#F8F8FF
clWebGold	$D7FF	#FFD700
clWebGoldenrod	$20A5DA	#DAA520
clWebGray	$808080	#808080
clWebGreen	$8000	#008000
clWebGreenYellow	$2FFFAD	#ADFF2F
clWebHoneydew	$F0FFF0	#F0FFF0
clWebHotPink	$B469FF	#FF69B4
clWebIndianRed	$5C5CCD	#CD5C5C
clWebIndigo	$82004B	#4B0082
clWebIvory	$F0FFFF	#FFFFF0
clWebKhaki	$8CE6F0	#F0E68C
clWebLavender	$FAE6E6	#E6E6FA
clWebLavenderBlush	$F5F0FF	#FFF0F5
clWebLawnGreen	$FC7C	#7CFC00
clWebLemonChiffon	$CDFAFF	#FFFACD
clWebLightBlue	$E6D8AD	#ADD8E6
clWebLightCoral	$8080F0	#F08080
clWebLightCyan	$FFFFE0	#E0FFFF
clWebLightGoldenrodYellow	$D2FAFA	#FAFAD2
clWebLightGreen	$90EE90	#90EE90
clWebLightGrey	$D3D3D3	#D3D3D3
clWebLightPink	$C1B6FF	#FFB6C1
clWebLightSalmon	$7AA0FF	#FFA07A
clWebLightSeaGreen	$AAB220	#20B2AA
clWebLightSkyBlue	$FACE87	#87CEFA
clWebLightSlateGray	$998877	#778899
clWebLightSteelBlue	$DEC4B0	#B0C4DE
clWebLightYellow	$E0FFFF	#FFFFE0
clWebLime	$FF00	#00FF00
clWebLimeGreen	$32CD32	#32CD32
clWebLinen	$E6F0FA	#FAF0E6
clWebMagenta	$FF00FF	#FF00FF
clWebMaroon	$80	#800000
clWebMediumAquamarine	$AACD66	#66CDAA
clWebMediumBlue	$CD0000	#0000CD
clWebMediumOrchid	$D355BA	#BA55D3
clWebMediumPurple	$DB7093	#9370DB
clWebMediumSeaGreen	$71B33C	#3CB371
clWebMediumSlateBlue	$EE687B	#7B68EE
clWebMediumSpringGreen	$9AFA00	#00FA9A
clWebMediumTurquoise	$CCD148	#48D1CC
clWebMediumVioletRed	$8515C7	#C71585
clWebMidnightBlue	$701919	#191970
clWebMintCream	$FAFFF5	#F5FFFA
clWebMistyRose	$E1E4FF	#FFE4E1
clWebMoccasin	$B5E4FF	#FFE4B5
clWebNavajoWhite	$ADDEFF	#FFDEAD
clWebNavy	$800000	#000080
clWebOldLace	$E6F5FD	#FDF5E6
clWebOlive	$8080	#808000
clWebOliveDrab	$238E6B	#6B8E23
clWebOrange	$A5FF	#FFA500
clWebOrangeRed	$45FF	#FF4500
clWebOrchid	$D670DA	#DA70D6
clWebPaleGoldenrod	$AAE8EE	#EEE8AA
clWebPaleGreen	$98FB98	#98FB98
clWebPaleTurquoise	$EEEEAF	#AFEEEE
clWebPaleVioletRed	$9370DB	#DB7093
clWebPapayaWhip	$D5EFFF	#FFEFD5
clWebPeachPuff	$B9DAFF	#FFDAB9
clWebPeru	$3F85CD	#CD853F
clWebPink	$CBC0FF	#FFC0CB
clWebPlum	$DDA0DD	#DDA0DD
clWebPowderBlue	$E6E0B0	#B0E0E6
clWebPurple	$800080	#800080
clWebRed	$FF	#FF0000
clWebRosyBrown	$8F8FBC	#BC8F8F
clWebRoyalBlue	$E16941	#4169E1
clWebSaddleBrown	$13458B	#8B4513
clWebSalmon	$7280FA	#FA8072
clWebSandyBrown	$60A4F4	#F4A460
clWebSeaGreen	$578B2E	#2E8B57
clWebSeashell	$EEF5FF	#FFF5EE
clWebSienna	$2D52A0	#A0522D
clWebSilver	$C0C0C0	#C0C0C0
clWebSkyBlue	$EBCE87	#87CEEB
clWebSlateBlue	$CD5A6A	#6A5ACD
clWebSlateGray	$908070	#708090
clWebSnow	$FAFAFF	#FFFAFA
clWebSpringGreen	$7FFF00	#00FF7F
clWebSteelBlue	$B48246	#4682B4
clWebTan	$8CB4D2	#D2B48C
clWebTeal	$808000	#008080
clWebThistle	$D8BFD8	#D8BFD8
clWebTomato	$4763FF	#FF6347
clWebTurquoise	$D0E040	#40E0D0
clWebViolet	$EE82EE	#EE82EE
clWebWheat	$B3DEF5	#F5DEB3
clWebWhite	$FFFFFF	#FFFFFF
clWebWhiteSmoke	$F5F5F5	#F5F5F5
clWebYellow	$FFFF	#FFFF00
clWebYellowGreen	$32CD9A	#9ACD32

User-Defined System Colors

Unlike most Windows-based applications, Web pages impose their colors on a user.  Web developers are allowed to make their pages utilize the user-defined system colors.  User-defined colors are colors the users sets for themselves using the Appearance tab of the Display Control Panel.  That means the Web page changes color when the user changes settings.

In addition to the colors defined in the color table above, these system colors may also be specified as color values in Web pages.

Here is a list of all the user-defined system colors you can use in your application.  The list illustrates the correspondence of these color names with the colors defined in the Control Panel.

Value	System color	Rendered HTML color value	Description
clWebActiveBorder	COLOR_ACTIVEBORDER	activeborder	Active window border color.
clWebActiveCaption	COLOR_ACTIVECAPTION	activecaption	Active window title bar background color. Windows 98/Me, Windows 2000 or later: Specifies the left side color in the color gradient of an active window's title bar if the gradient effect is enabled.
clWebAppWorkspace	COLOR_APPWORKSPACE	appworkspace	Background color of the application workspace.  The application workspace is the area in a multiple-document view that is not being occupied by documents.
clWebBackground	COLOR_BACKGROUND	background	Desktop color.
clWebButtonFace	COLOR_BTNFACE	buttonface	Face color for three-dimensional display elements and for dialog box backgrounds.
clWebButtonHighlight	COLOR_BTNHIGHLIGHT	buttonhighlight	Highlight color for three-dimensional display elements (for edges facing the light source.)
clWebButtonShadow	COLOR_BTNSHADOW	buttonshadow	Shadow color for three-dimensional display elements (for edges facing away from the light source).
clWebButtonText	COLOR_BTNTEXT	buttontext	Push button text color.
clWebCaptionText	COLOR_CAPTIONTEXT	captiontext	Color of text in caption, size box, and scroll bar arrow box.
clWebGrayText	COLOR_GRAYTEXT	graytext	Grayed (disabled) text color.  The color of user interface elements when they are unavailable.
clWebHighlight	COLOR_HIGHLIGHT	highlight	Background color of item(s) selected in a control.
clWebHighlightText	COLOR_HIGHLIGHTTEXT	highlighttext	Text color of item(s) selected in a control.
clWebInactiveBorder	COLOR_INACTIVEBORDER	inactiveborder	Inactive window border color.
clWebInactiveCaption	COLOR_INACTIVECAPTION	inactivecaption	Inactive window caption bar background color. Windows 98/Me, Windows 2000 or later: Specifies the left side color in the color gradient of an inactive window's title bar if the gradient effect is enabled.
clWebInactiveCaptionText	COLOR_INACTIVECAPTIONTEXT	inactivecaptiontext	Text color in an inactive caption bar.
clWebInfoBackground	COLOR_INFOBK	infobackground	Background color for tooltip controls.
clWebInfoText	COLOR_INFOTEXT	infotext	Text color for tooltip controls.
clWebMenu	COLOR_MENU	menu	Menu background color.
clWebMenuText	COLOR_MENUTEXT	menutext	Menu text color.
clWebScrollbar	COLOR_SCROLLBAR	scrollbar	Scroll bar background color.
clWebThreeDDarkShadow	COLOR_3DDKSHADOW	threeddarkshadow	Dark shadow color for three-dimensional display elements.
clWebThreeDFace	COLOR_3DFACE	buttonface	Face color for three-dimensional display elements.
clWebThreeDHighlight	COLOR_3DHIGHLIGHT	buttonhighlight	Highlight color for three-dimensional display elements (for edges facing the light source.)
clWebThreeDLightShadow	COLOR_3DLIGHT	threedlightshadow	Light color for three-dimensional display elements (for edges facing the light source.)
clWebThreeDShadow	COLOR_3DSHADOW	buttonshadow	Shadow color for three-dimensional display elements (for edges facing away from the light source).
clWebWindow	COLOR_WINDOW		Background color of the client area of a window.
clWebWindowFrame	COLOR_WINDOWFRAME	windowframe	Color of the frame around a window.
clWebWindowText	COLOR_WINDOWTEXT	windowtext	Text color in the client area of a window.


cxWebControls Unit Overview
cxWebControls Unit

Classes

TcxWebContainerControl

TcxWebContainerControlHelper

TcxWebControl

TcxWebControlRenderer

TcxWebImageItem

TcxWebImageList

TcxWebImages

TcxWebPopupMenu

Other Types

TcxWebControlState

TcxWebControlStyle

TcxWebHorzAlignment

TcxWebVertAlignment

Routines

GetContainerControlBounds

Global Constants

cxWebHorzAlignment

cxWebVertAlignment


TcxWebContainerControl
TcxWebContainerControl Object

Hierarchy          Properties          Methods          Events          See Also

Represents the base class for web controls, which are containers for other controls.

Unit

cxWebControls

TcxWebContainerControl = class(TcxWebControl, IcxContainerCodeProvider, IcxWebContainerControl, IWebVariablesContainer)

Description

The TcxWebContainerControl class is the base class from which all container controls are inherited.  As a descendant of TcxWebComponent and TcxWebControl classes the TcxWebContainerControl class inherits all their properties and methods used to manage the behavior of a specific component.

Use the TcxWebContainerControl class as the base class for the components that can contain standard controls or other container controls.

Being the base class for container controls, the TcxWebContainerControl class implements several additional interfaces:

•	the IcxContainerCodeProvider interface that helps render code for containers (the TcxWebContainerControl class delegates this interface implementation to the WebRenderHelper property);

•	the IcxWebContainerControl interface that helps control form containers (the TcxWebContainerControl class delegates this interface implementation to the WebContainterControlHelper property);

•	the standard IWebVariablesContainer interface which helps obtain all contained components.


TcxWebContainerControl Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl


Properties for TcxWebContainerControl
TcxWebContainerControl Properties

TcxWebContainerControl          Legend

In TcxWebContainerControl

WebContainterControlHelper

WebControlContainerCount

WebControlContainers

WebControlCount

WebControls

WebRenderHelper

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebScriptsHelper

WebValuesHelper


Methods for TcxWebContainerControl
TcxWebContainerControl Methods

TcxWebContainerControl          Legend

In TcxWebContainerControl

Create

Destroy

GetChildren

SetBounds

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

RegisterRenderers

ScriptsSubscription

SetAttribute

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterActions

RegisterEvents

RegisterValues

SetState

ValidateContainer


Events for TcxWebContainerControl
TcxWebContainerControl Events

TcxWebContainerControl          Legend

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebContainerControl.WebContainterControlHelper

TcxWebContainerControl          See Also

Specifies the object which implements the delegated IcxWebContainerControl interface.

property WebContainterControlHelper: TcxWebContainerControlHelper;

Description

The WebContainterControlHelper property is a class-type property to which the TcxWebContainerControl class delegates the IcxWebContainerControl interface implementation.  The WebContainterControlHelper property is used to gain access to the TcxWebContainerControlHelper class whose methods and properties fully implement methods and properties declared in the IcxWebContainerControl interface.

ReadOnly Property


TcxWebContainerControl.WebControlContainerCount

TcxWebContainerControl          See Also

Returns the number of child container components.

property WebControlContainerCount: Integer;

Description

The WebControlContainerCount property returns the number of all its first-level child container components.  Read the WebControlContainerCount property when iterating through all first-level child containers for this container component.  The child container components of the container are listed in the WebControlContainers property array.

Note:	The WebControlContainerCount property value is always 1 greater than the highest WebControlContainers index, because the first item index within the WebControlContainers collection is 0.

ReadOnly Property


TcxWebContainerControl.WebControlContainers

TcxWebContainerControl          See Also

Lists all child container components.

property WebControlContainers[Index:Integer]: IcxWebContainerControl;

Description

The WebControlContainers property is an array of all first-level child container components.  They are all containers for which a given container component is a parent.  The WebControlContainers property is convenient for referring to child containers of a specific container component by number rather than by name.  For instance, the WebControlContainers property may be used to iterate through all child container components.

Pay close attention to the difference between the WebControlContainers property and the Components property of the TcxWebPageModule class.  The WebControlContainers property lists all container components that are child windows of the container, while the Components property lists all components that the page module (the form) owns.  The form owns all components placed onto it, and therefore, they appear in its Components property list, even when they are child windows of a container on the form.

Note:	For convenience use the WebControlContainers property with the WebControlContainerCount property for iterative processing.  However, be aware that while the WebControlContainerCount property of a container component contains the same number of items as the WebControlContainers list for that component, the WebControlContainerCount property value is always 1 more than the highest WebControlContainers index, because the first WebControlContainers index is always 0.

ReadOnly Property


TcxWebContainerControl.WebControlCount

TcxWebContainerControl          See Also

Returns the number of child controls.

property WebControlCount: Integer;

Description

The WebControlCount property of a container returns the number of all its children.  These child controls can be both ordinary web controls and container controls.  Read the WebControlCount property when iterating through all child controls of your container.  The container’s child controls are listed in the WebControls property array.

Note:	The WebControlCount property value is always 1 greater than the highest WebControls index, because the first WebControls index is 0.

ReadOnly Property


TcxWebContainerControl.WebControls

TcxWebContainerControl          See Also

Lists all child controls.

property WebControls[Index:Integer]: IcxWebControl;

Description

The WebControls property is an array of all first-level child controls.  They are all controls for which a given container component is a parent.  These child controls can be both standard web controls and container components.  The WebControls property is convenient for referring to the children of your container component by number rather than by name.  For instance, the WebControls property may be used to iterate through all child controls.

Pay close attention to the difference between the WebControls property and the Components property of the TcxWebPageModule class.  The WebControls property lists all controls that are child windows of the container, while the Components property lists all components that the page module (the form) owns.  The form owns all components placed onto it, and therefore, they appear in its Components property list, even when they are child windows of a container on the form.

Since the WebControls property returns a IcxWebControl interface, you can obtain a specific component by this interface via the auxiliary GetComponentByInterface method.  This method returns a reference to the child component listed in the WebControls array of the container.

Note:	For convenience, use the WebControls property with the WebControlCount property for iterative processing.  However, be aware that while the WebControlCount property of a container component contains the same number of items as the WebControls list for that component, the WebControlCount property value is always 1 more than the highest WebControls index, because the first WebControls index is always 0.

ReadOnly Property


TcxWebContainerControl.WebRenderHelper

TcxWebContainerControl          See Also

Specifies the object which implements the delegated IcxContainerCodeProvider interface.

property WebRenderHelper: TcxWebRenderHelper;

Description

The WebRenderHelper property is a class-type property to which the TcxWebContainerControl class delegates the IcxContainerCodeProvider interface implementation.  The WebRenderHelper property is used to gain access to the TcxWebRenderHelper class whose methods and properties fully implement the methods and properties declared in the IcxContainerCodeProvider interface.  The TcxWebRenderHelper class represents a class that helps EWF render a specific web component.

ReadOnly Property


TcxWebContainerControl.Create

TcxWebContainerControl          See Also

Creates a new TcxWebContainerControl class instance.

constructor Create(AOwner: TComponent); override;

Description

The Create method is used to create a new TcxWebContainerControl class instance and initialize its WebContainterControlHelper property.  In order to initialize this property, the Create method in turn creates a new instance of the TcxWebContainerControlHelper class after calling the inherited Create method.


TcxWebContainerControl.Destroy

TcxWebContainerControl          See Also

Destroys the TcxWebContainerControl object.

destructor Destroy; override;

Description

The Destroy method is used to destroy an instance of the TcxWebContainerControl class and release any allocated memory.  Before calling the inherited Destroy, this method sets the Parent property value to nil and frees its WebContainterControlHelper property.


TcxWebContainerControl.GetChildren

TcxWebContainerControl

Calls the specified method for each child of a container control.

procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;

Description

The GetChildren method executes the callback specified by the Proc parameter for every child control (listed by the WebControls property) that considers the Root parameter to be its owner.

The Proc parameter is the callback to execute for every child component. The Root parameter indicates the component (usually the form) that owns the control.


TcxWebContainerControl.SetBounds

TcxWebContainerControl          See Also

Sets the container boundary properties all at once.

procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;

Description

The SetBounds method is used to change all container component boundary properties at once.  The same effect can be achieved by setting the Left, Top, Width, and Height properties separately.  By setting all four properties at once, the SetBounds method ensures that the control will not repaint between changes.

The ALeft and ATop parameters correspondingly specify the horizontal coordinate of the left edge and the vertical coordinate of the top edge of the container control relative to its parent. The AWidth and AHeight parameters correspondingly specify its horizontal and vertical size in pixels.


TcxWebContainerControlHelper
TcxWebContainerControlHelper Object

Hierarchy          Methods

Represents the object which helps containers manage their children.

Unit

cxWebControls

TcxWebContainerControlHelper = class(TcxCustomWebContainerControlHelper)

Description

The TcxWebContainerControlHelper class is the direct descendant of the TcxCustomWebContainerControlHelper class which implements all necessary methods and properties to maintain and process children of a container component.  Additionally, the TcxCustomWebContainerControlHelper class implements the delegated IcxWebContainerControl interface supported by the TcxWebContainerControl class (the TcxWebContainerControl class delegates this interface implementation to the WebContainterControlHelper property which represents the TcxWebContainerControlHelper class).

The TcxWebContainerControlHelper class overrides the CanAcceptsControls method to find out whether the control becomes the parent of controls dropped onto it at design time or assigned at runtime.


TcxWebContainerControlHelper Hierarchy
Hierarchy

TcxCustomWebContainerControlHelper


Methods for TcxWebContainerControlHelper
TcxWebContainerControlHelper Methods

TcxWebControl          Legend

In TcxWebContainerControlHelper

CanAcceptsControls


TcxWebContainerControlHelper.CanAcceptsControls

TcxWebContainerControlHelper          See Also

Checks whether a control becomes the parent of controls dropped onto it at design time.

function CanAcceptsControls: Boolean; override;

Description

The CanAcceptsControls method implements the CanAcceptsControls method of the IcxWebContainerControl interface.  This implementation is delegated to the TcxWebContainerControlHelper class by the TcxWebContainerControl class via its WebContainterControlHelper property.

The CanAcceptsControls method is used to find out whether the wcsAcceptsControls style flag is included in the set of style flags represented by the ControlStyle property.  If the wcsAcceptsControls style flag is in the ControlStyle property set, the CanAcceptsControls method returns True; otherwise, False.  This method specifies whether your control becomes the parent of controls dropped onto it at design time or assigned at runtime.


TcxWebControl
TcxWebControl Object

Hierarchy          Properties          Methods          Events          See Also

Represents a base class for all web controls visible at runtime.

Unit

cxWebControls

TcxWebControl = class(TcxWebComponent, IcxWebControl, IcxWebControlAttributies)

Description

Web controls are visual components.  That means that a user can see them and possibly interact with them at runtime.  All web controls have properties, methods, and events that describe aspects of their appearance, such as the position, the style associated with the control, methods to update control position, and events that respond to user actions.

The TcxWebControl class is the base class for all web controls.  The TcxWebControl class supports the IcxWebControl interface, which declares properties and methods to control the appearance of web controls. The TcxWebControl class has many protected properties and methods that are used or published by its descendents.

Please refer to the Component Class Structure topic for a complete diagram of control inheritance.


TcxWebControl Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent


Properties for TcxWebControl
TcxWebControl Properties

TcxWebControl          Legend

In TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebControl
TcxWebControl Methods

TcxWebControl          Legend

In TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

Create

Destroy

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

RegisterRenderers

ScriptsSubscription

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterActions

RegisterEvents

RegisterValues

SetState

ValidateContainer


Events for TcxWebControl
TcxWebControl Events

TcxWebControl          Legend

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebControl.AbsLeft

TcxWebControl          See Also

Specifies the horizontal coordinate of the left edge of a control relative to the page module.

property AbsLeft: Integer;

Description

Use the AbsLeft property to determine where the left side of your control is located relative to the page module (form) that owns it.

Unlike the Left property, which is relative to the parent control, the AbsLeft property is relative to its owner form.  If the control is owned directly by the form, the AbsLeft property value is identical to the Left property value (they both are relative to the form).  If the control is contained in another control (in a container component), the AbsLeft property value equals the sum of the control’s and the container’s Left property values.

ReadOnly Property


TcxWebControl.AbsTop

TcxWebControl          See Also

Specifies the vertical coordinate of the top edge of a control relative to the page module.

property AbsTop: Integer;

Description

Use the AbsTop property to determine where the top edge of your control is located relative to the page module (form) that owns the control.

Unlike the Top property, which is relative to the parent control, the AbsTop property is relative to its owner form.  If the control is owned directly by the form, the AbsTop property value is identical to the Top property value (they both are relative to the form).  If the control is contained in another control (in a container component), the AbsTop property value equals the sum of the control’s and the container’s Top property values.

ReadOnly Property


TcxWebControl.Attributes

TcxWebControl          See Also

Contains additional custom attributes for a web control.

property Attributies: TStrings;

Description

The Attributes property provides access to the string list objects (the TStrings type) used to store any additional custom designed attributes for a web control.  Each individual string of this list is considered to represent a particular attribute.

The Attributes property allows you to add custom attributes (with or without values) to the tag that contains the resulting HTML code of the web control when the control is being rendered.

For instance, you can specify your custom attribute via the Attributes property to distinguish a specific web control from another of the same type.  Such an approach is used in EWF - the ewf_tablebuilder custom attribute allows you to distinguish a user defined html table tag from the html builder table tag.

Additionally, you can use the Attributes property to designate the event handler for a specific event of a web control.  The following sample code demonstrates how to display a message box when the mouse enters the cxWebLabel1 web label control.

cxWebLabel1.Attributes.Add('onMouseOver=alert(''This is a web label'');

Note:  Do not assign different event handlers to the same event at the same time via the Attributes property and the CustomEvents property of your web component.  In this case, both attributes representing the same event are rendered within the component’s tag.

ReadOnly Property


TcxWebControl.BoundsRect

TcxWebControl          See Also

Specifies the bound rectangle of a control, expressed in the coordinate system of the parent control.

property BoundsRect: TRect;

Description

Use the BoundsRect property to obtain the pixel locations of all corners of a web control all at once.  The origin of the pixel coordinate system is in the top left corner of the parent control.

The BoundsRect property implements the corresponding BoundsRect property declared by the IcxWebControl interface.  This interface is supported by the TcxWebControl class.  Since fields are not available in interfaces, the BoundsRect property’s read and write specifiers are private GetBoundsRect and SetBoundsRect methods, which implement the proper GetBoundsRect and SetBoundsRect methods declared by the IcxWebControl interface.

Note:	A point is considered to be within the control’s bounds rectangle if it is located on the left or top boundary but not on the right or bottom one.  That is, to be inside the bounds rectangle, the x-coordinate must be greater than or equal to BoundsRect.Left and less than BoundsRect.Right; the y-coordinate must be greater than or equal to BoundsRect.Top and less than BoundsRect.Bottom.


TcxWebControl.Caption

TcxWebControl

Specifies the text string that identifies a web control.

property Caption: TcxWebCaption;

Description

Use the Caption property to specify the text string that labels a specific web control.

Note:	Controls that display text use either the Caption property or the Text property to specify a text value.  Which property is used depends on the control type.  Generally, the Caption property is used for the text that appears as a window title or label, while the Text property is used for the text that appears as the control’s content.


TcxWebControl.Color

TcxWebControl

Specifies the background color of a web control.

property Color: TcxWebColor;

Description

Use the Color property to read the background color of a web control.  If the web control uses a specific look & feel style (created via the TcxWebStyleController component) for its Default state, the Color property contains the background color which was set for the corresponding style item.  Otherwise, if no style is assigned to the Default state of the control, the Color property contains the DefaultColor property value.

ReadOnly Property


TcxWebControl.ControlState

TcxWebControl

Indicates in which state a web control is in.

type

  TcxWebControlState = (wcsReadingState, wcsAlignmentNeeded);

  TcxWebControlStates = set of TcxWebControlState;

property ControlState: TcxWebControlStates;

Description

The ControlState property can be used to ascertain the current state of a web control.

The ControlState property can receive the following values contained in the TcxWebControlStates type.

Value	Meaning
wcsReadingState	The control’s data is being read from a stream.
wcsAlignmentNeeded	The control needs to be realigned.


TcxWebControl.ControlStyle

TcxWebControl

Specifies control characteristics affecting a control’s look & feel and functionality.

type

  TcxWebControlStyle = (wcsAcceptsControls, wcsFixedHeight, wcsFixedWidth);

  TcxWebControlStyles = set of TcxWebControlStyle;

property ControlStyle: TcxWebControlStyles;

Description

The ControlStyle property is used to contain specific values which indicate the modes supported by your control. The following table lists the values that can be included in the ControlStyle property:

Value	Meaning
wcsAcceptsControls	A control can be the parent of any controls dropped onto it at design time.
wcsFixedHeight	Control height has a fixed value, which cannot be changed.
wcsFixedWidth	Control width has a fixed value, which cannot be changed.


TcxWebControl.DefaultColor

TcxWebControl          See Also

Contains the color used as the background color for a web control if no style is assigned.

property DefaultColor: TcxWebColor;

Description

The DefaultColor property contains a clWebWindow color which is one of the user-defined system colors and which specifies the background color of the client area of a window.  If necessary, each web control can specify its own default color by overriding the read specifier (the protected GetDefaultColor method) of the DefaultColor property.

The DefaultColor property value is identical to the Color property value when a web control has no look & feel style assigned for its Default state.

ReadOnly Property


TcxWebControl.Enabled

TcxWebControl

Controls whether a web control responds to mouse and keyboard events.

property Enabled: Boolean;

Description

Use the Enabled property to change the availability of a web control to a user.  To disable a control, set the Enabled property to False.  The contents of disabled controls appear dimmed.  If the Enabled property is False, the control ignores mouse and keyboard events.  To re-enable the control, set the Enabled property to True.

The default value of the Enabled property is True.


TcxWebControl.Font

TcxWebControl

Specifies the font of a web control.

property Font: TcxWebFont;

Description

Use the Font property to obtain the TcxWebFont object used to control the text attributes written to a web control.  If a web control uses a specific look & feel style (created via the TcxWebStyleController component) for its Default state, the Font property contains the font object, which was set for the corresponding style item.  Otherwise, if no style is assigned to the Default state of the control, the Font property contains the value returned by the cxWebDefaultFont function (this function creates a new instance of the TcxWebFont object).

ReadOnly Property


TcxWebControl.Height

TcxWebControl          See Also

Specifies the vertical size of a web control in pixels.

property Height: Integer;

Description

Use the Height property to read or change the height of a web control.  The Height property is set with the help of the SetBounds method.


TcxWebControl.Hint

TcxWebControl          See Also

Contains a text string that can appear when a user moves the mouse over a web control.

property Hint: string;

Description

Use the Hint property to provide a string of help text for a control.

A Help Hint is a box containing help text that appears for a control when a user moves the mouse pointer over the control and pauses momentarily.  To set up Help Hints:

•	Specify the Hint property of each control for which a Help Hint should appear.

•	Set the ShowHint property of each appropriate control to True.


TcxWebControl.Left

TcxWebControl          See Also

Specifies the horizontal coordinate of the left edge of a web component relative to its parent.

property Left: Integer;

Description

Use the Left property to determine where the left side of a control is located or to reposition it.  Unlike the AbsLeft property, which is relative to the owner form, the Left property is relative to the parent control.  If the control is owned directly by the form, the Left property value is identical to the AbsLeft property value (they both are relative to the form).  If the control is contained in another control (in a container component), the Left property is relative to the parent control.


TcxWebControl.MaxHeight

TcxWebControl          See Also

Contains the maximum height constraint for a web control (in pixels).

property MaxHeight: Integer;

Description

The MaxHeight property is used to obtain the internal constraint value for the maximum vertical size of a specific web control.

The MaxHeight property value is returned by the GetMaxHeight method.  As implemented in the TcxWebControl class, this method returns 0 for the MaxHeight property.  This means that the control’s height value has no upper limit.

Any TcxWebControl object descendant can override the GetMaxHeight method to return a specific value which will determine the maximum vertical size of a specific control.

ReadOnly Property


TcxWebControl.MaxWidth

TcxWebControl          See Also

Contains the maximum width constraint for a web control (in pixels).

property MaxWidth: Integer;

Description

The MaxWidth property is used to obtain the internal constraint value for the maximum horizontal size of a specific web control.

The MaxHeight property value is returned by the GetMaxWidth method.  As implemented in the TcxWebControl class this method returns 0 for the MaxHeight property.  This means that the control’s width value has no upper limit.

Any TcxWebControl object descendant can override the GetMaxWidth method to return a specific value, which will determine the maximum horizontal size of a specific control.

ReadOnly Property


TcxWebControl.MinHeight

TcxWebControl                    See Also

Contains the minimum height constraint for a web control (in pixels).

property MinHeight: Integer;

Description

The MinHeight property is used to obtain the internal constraint value for the minimum vertical size of a specific web control.

The MinHeight property value is returned by the GetMinHeight method.  As implemented in the TcxWebControl class this method returns 0 for the MinHeight property.  This means that the control’s height value has no lower limit.

Any TcxWebControl object descendant can override the GetMinHeight method to return a specific value which will determine the minimum vertical size of a specific control.

ReadOnly Property


TcxWebControl.MinWidth

TcxWebControl                    See Also

Contains the minimum width constraint for a web control (in pixels).

property MinWidth: Integer;

Description

The MinWidth property is used to obtain the internal constraint value for the minimum horizontal size of a specific web control.

The MinWidth property value is returned by the GetMinWidth method.  As implemented in the TcxWebControl class, this method returns 0 for the MinWidth property.  This means that the control’s width value has no lower limit.

Any TcxWebControl object descendant can override the GetMinWidth method to return a specific value which will determine the minimum horizontal size of a specific control.

ReadOnly Property


TcxWebControl.Parent

TcxWebControl          See Also

Indicates the parent of a web control.

property Parent: IcxWebContainerControl;

Description

Use the Parent property to get or set the parent of a web control.  The parent of a control is a container component that contains the control.  For instance, if an application includes three web editors placed onto a web panel, the panel is the parent for the three editors, and the editors are the panel’s child controls.

To serve as a parent, the container component must support the IcxWebContainerControl interface which declares container functionality.

When creating a new web control at runtime, assign the Parent property value to the new control.  Usually, it is a form, panel, or some control that is designed to contain another.  Changing the control’s parent moves the control onscreen so that it is displayed within a new parent.  When the parent control moves, the child moves with it.

The distinctive feature of assigning a value to the Parent property of a web control is that this property is of type IcxWebContainerControl.  Generally, there are two basic ways of setting the Parent property (both ways assume that the control you intend to use as a parent for a given web control supports the IcxWebContainerControl interface - it is a valid container component):

1.	You can set the Parent property directly by assigning the IcxWebContainerControl type to the expected container.  You should use the GetInterface method to find the appropriate IcxWebContainerControl container type.  And then you can set the Parent property to the obtained interface type.

2.	You can simply call the SetParentComponent method of a given web control and pass the expected container as the Value parameter of this method.  The SetParentComponent method automatically carries out the sequence of operations described in the first item.


TcxWebControl.ParentBoundsRect

TcxWebControl

Specifies the bound rectangle of the web control, which contains a specific web control.

property ParentBoundsRect: TRect;

Description

Use the ParentBoundsRect property as a quick way to obtain the pixel locations of all corners of the parent container component at the same time.  The origin of the pixel coordinate system is in the top left corner of the parent control.  If the parent component does not support the IcxWebControl interface, it is considered to be a form (web page module) and its bound rectangle value equals 0.

Note:	A point is considered to be within the control’s bounds rectangle if it is located on the left or top boundary but not on the right or bottom one.  That is, to be inside the parent bounds rectangle, the x-coordinate must be greater than or equal to ParentBoundsRect.Left and less than ParentBoundsRect.Right; the y-coordinate must be greater than or equal to ParentBoundsRect.Top and less than ParentBoundsRect.Bottom.

ReadOnly Property


TcxWebControl.PopupMenu

TcxWebControl          See Also

Identifies the popup menu of the TcxWebPopupMenu type associated with a control.

property PopupMenu: TcxWebPopupMenu;

Description

Assign a value to the PopupMenu property to make a popup menu appear when the mouse cursor is over a given web control or when a user selects the control and clicks a mouse button.  The user action which invokes the popup menu is specified via the PopupShowingType property.

The popup menu specified by the PopupMenu property is represented by the TcxWebPopupMenu component which should be previously created and adjusted.


TcxWebControl.PopupShowingType

TcxWebControl          See Also

Specifies the user action that invokes the specified popup menu.

type

  TcxPopupShowingType = (stClick, stMouseOver);

property PopupShowingType: TcxPopupShowingType;

Description

The PopupShowingType property specifies the user action, which forces a popup menu to appear.  The PopupShowingType property works together with the PopupMenu property.

The following values are available:

Value	Meaning
stClick	Popup menu appears when a user selects the control and clicks a mouse button.
stMouseOver	Popup menu appears when the mouse cursor is over the control.

The default value of the PopupShowingType property is stMouseOver.


TcxWebControl.ShowHint

TcxWebControl          See Also

Specifies whether a web control displays a Help Hint when the mouse pointer rests momentarily on the control.

property ShowHint: Boolean;

Description

Help Hint is the Hint property value, which is displayed in a box just beneath a control.  Use the ShowHint property to determine whether a Help Hint appears for the control.  To enable a Help Hint for a specific control, the ShowHint property of the control must be set to True.  If the control’s Hint property is empty and the ShowHint property is set to True, the Help Hint will not be displayed for the web control (although the TITLE attribute with an empty value will be generated for the HTML element represented by the control).

The default value of the ShowHint property is False.


TcxWebControl.StyleAttributes

TcxWebControl          See Also

Contains additional custom attributes for the web control’s style.

property StyleAttributes: TStrings;

Description

The StyleAttributes property provides access to the strings list object (the TStrings type), which is implemented to store any additional attributes for the style of a web control.  Each individual string of this list is considered to represent a particular attribute in name=value form.

The StyleAttributes property allows you to add additional style attributes to the STYLE attribute of the HTML element that contains the resulting HTML code of the web control when the control is finally being rendered. For instance, the following sample code demonstrates how to set an additional style attribute, which specifies the text color of the cxWebLabel1 web label control.

cxWebLabel1.StyleAttributes.Add('color=red');

ReadOnly Property


TcxWebControl.TabOrder

TcxWebControl          See Also

Indicates the position of a web control in its parent's tab order.

property TabOrder: TcxWebTabOrder;

Description

The TabOrder property implements the corresponding TabOrder property declared by the IcxWebControl interface which is supported by the TcxWebControl class.

Tab order is the order in which child controls are visited when a user presses the TAB key.  A control with a TabOrder property value of 0 is the control that has focus when the web page appears first.  Initially, the tab order is always the order in which controls are added to the form.  The first control added to the form has a TabOrder value of 0, the second is 1, the third is 2, and etc.  You can change this tab order by setting proper TabOrder property values for specific web controls.

Each control has a unique tab-order value within its parent.  If you change the TabOrder property value of one control to be the same as the value of another control, the TabOrder value of the second control takes the first control value.

Assigning the TabOrder property a value greater than the number of controls contained in the parent control moves the control to the end of the tab order.  In such an instance, the assigned value is adjusted to be one greater than the last available tab order index.

The TabOrder property is meaningful only if the TabStop property is True and if the control has a parent.  A control with a TabOrder of -1 has no parent, and therefore cannot be reached by pressing the TAB key.  To remove a parented control from the Tab order, set its TabStop property to False.

The default value of the TabOrder property is -1.


TcxWebControl.TabStop

TcxWebControl          See Also

Specifies whether a user can tab to a web control.

property TabStop: Boolean;

Description

The TabStop property implements the corresponding TabStop property declared by the IcxWebControl interface, which is supported by the TcxWebControl class.  Use the TabStop property to allow or disallow access to a web control using the TAB key.  If the TabStop property of the control is set to True, the control is in the tab order.  If the TabStop property value is False, the control is not in the tab order and a user cannot access it by pressing the TAB key.

The default value of the TabStop property is False.


TcxWebControl.Top

TcxWebControl          See Also

Specifies the vertical coordinate of the top edge of a web component relative to its parent.

property Top: Integer;

Description

Use the Top property to determine where the top side of a control is located or to reposition it.  Unlike the AbsTop property, which is relative to the owner form, the Top property is relative to the parent control.  If the control is owned directly by the form, the Top property value is identical with the AbsTop property value (they both are relative to the form).  If the control is contained in another control (in a container component), the Top property is relative to the parent control.


TcxWebControl.Visible

TcxWebControl          See Also

Specifies whether a web control appears onscreen.

property Visible: Boolean;

Description

Use the Visible property to control the visibility of a web control at runtime.  If the Visible property is set to True, the control appears.  If the Visible property value is False, the control is invisible.  Calling the Show method sets the control's Visible property to True.  Calling the Hide method sets it to False.

The default value of the Visible property is True.


TcxWebControl.Width

TcxWebControl          See Also

Specifies the horizontal size of a web control in pixels.

property Width: Integer;

Description

Use the Width property to read or change the width of a web control.


TcxWebControl.ZIndex

TcxWebControl

Specifies the stacking order for a web control.

property ZIndex: Integer;

Description

Use the ZIndex property to specify the stacking order for a web control.  This web control property value specifies the order web controls should be drawn when two or more controls occupy the same area.  Setting the ZIndex property is useful whenever you have absolute or relative positioned web controls that overlap other web controls on the web page.

Setting this property to a positive value causes a web control to be stacked at the top of other web controls; negative values cause it to be stacked lower.

Web controls with the greatest value for the ZIndex property are always placed at the very top of the stack, and controls with the least ZIndex are placed at the very bottom.  If two web controls have the same value for the ZIndex property, their source order determines the stacking - the last web control is stacked highest.


TcxWebControl.AdjustBounds

TcxWebControl          See Also

Recalculates control size and position.

procedure AdjustBounds; virtual;

Description

The AdjustBounds method is called automatically when a control’s corresponding style is changed.  The AdjustBounds method forces the web control to recalculate its Left, Top, Width, and Height properties and then update its position within its parent control.


TcxWebControl.AsContainer

TcxWebControl

Retrieves the IcxWebContainerControl interface implemented by a web control.

function AsContainer: IcxWebContainerControl;

Description

The AsContainer method considers a web control as a container component, which contains child controls within it.  It is assumed that this web control is the parent for those child controls.  Thus the AsContainer method returns the proper IcxWebContainerControl interface implemented by the web control.  If the control is not a container component (it does not support the IcxWebContainerControl interface), the AsContainer method returns nil.


TcxWebControl.CanSetValues

TcxWebControl          See Also

Specifies whether a value/values can be set for a web control.

function CanSetValues: Boolean; override;

Description

The CanSetValues method is used to specify whether specific values can be assigned to a web control.  The CanSetValues method returns True if the control is visible and enabled (said differently, if both its Visible and Enabled property values are True).

The CanSetValues method implements the CanSetValues method of the IcxWebValues interface.  It is used to determine whether the changes performed by a user can be (or should be) applied to the control.  Descendants can override this method if they need to set updated values only when certain conditions are met.


TcxWebControl.CheckNewSize

TcxWebControl          See Also

Verifies the control size based on its internal requirements.

procedure CheckNewSize(var ANewLeft, ANewTop, ANewWidth, ANewHeight: Integer); virtual;

Description

The CheckNewSize method is used to recalculate the size of a web control depending on its internal size constraints (if any).  The CheckNewSize method receives the current values for the Left, Top, Width, and Height properties of the control via the ANewLeft, ANewTop, ANewWidth, and ANewHeight parameters correspondingly.

The CheckNewSize method adjusts the ANewWidth and ANewHeight parameter values to meet the internal requirements set for the control by the GetMaxHeight, GetMinHeight, GetMaxWidth, and GetMinWidth methods.  Then the CheckNewSize method returns the resulting values of the control size via corresponding parameters.

The GetMaxHeight, GetMinHeight, GetMaxWidth, and GetMinWidth methods specify internal constraints (if necessary) for the maximum and minimum size of a particular control.  Descendants can override these methods to control their sizes as their needs dictate.


TcxWebControl.Create

TcxWebControl          See Also

Creates a new TcxWebControl class instance.

constructor Create(AOwner: TComponent); override;

Description

The Create method is used to create a new instance of the TcxWebControl class and initialize its properties with default values.

You should never attempt to instantiate the TcxWebControl class.  This class is used solely as the base class from which other web control classes descend.  You should only call their Create method to instantiate one of these descendents.  The Create method calls the parent constructor and initializes the control.


TcxWebControl.Destroy

TcxWebControl          See Also

Destroys a TcxWebControl class instance.

destructor Destroy; override;

Description

Do not call the Destroy method directly in applications.  Instead, call the Free method. The Free method verifies that the control is not nil, and only then calls the Destroy method.

As the web control is destroyed, it:

•	Releases any allocated memory.

•	Calls its inherited destructor.

Override the Destroy method to free any memory or resources allocated in the Create method.  When declaring the Destroy method in a descendant control type, always add the override directive to the declaration and call the inherited Destroy as the last statement in the redeclared method.


TcxWebControl.GetColor

TcxWebControl          See Also

Returns the background color of a web control.

function GetColor: TcxWebColor; virtual;

Description

The GetColor method is used to return the background color of a web control.  If the web control uses a specific look & feel style (created via the TcxWebStyleController component) for its Default state, the GetColor method returns the background color, which was set for the corresponding style item.  Otherwise, (if no style is assigned to the Default state of the control) the GetColor method returns the internal DefaultColor property value.


TcxWebControl.GetDefaultColor

TcxWebControl          See Also

Returns the color used as the background color for a web control if no style is assigned.

function GetDefaultColor: TcxWebColor; virtual;

Description

The GetDefaultColor method returns a clWebWindow color, which is one of the user-defined system colors.  The clWebWindow color specifies the background color of the client area of a window.  The GetDefaultColor method is called to return the color considered as the background color for a web control when the control has no look & feel style assigned for its Default state.

If necessary each web control can override the GetDefaultColor method to specify its own default color (the DefaultColor property).


TcxWebControl.GetDefaultHorzBordersSize

TcxWebControl          See Also

Returns the horizontal size of a web control’s vertical borders if no style is assigned for the control.

function GetDefaultHorzBordersSize: Integer; virtual;

Description

The GetDefaultHorzBordersSize method is called by the GetHorzBordersSize method to return the horizontal size of the control’s vertical borders when the control has no look & feel style assigned for its Default state.

The GetDefaultHorzBordersSize method returns 0 for the TcxWebControl object.  TcxWebControl object descendants can override the GetDefaultHorzBordersSize method to specify their own width for vertical borders.


TcxWebControl.GetDefaultVertBordersSize

TcxWebControl          See Also

Returns the vertical size (thickness) of the web control’s horizontal borders if no style is assigned for the control.

function GetDefaultVertBordersSize: Integer; virtual;

Description

The GetDefaultVertBordersSize method is called by the GetVertBordersSize method to return the vertical size of the control’s horizontal borders when the control has no look & feel style assigned for its Default state.

The GetDefaultVertBordersSize method returns 0 for the TcxWebControl object.  TcxWebControl object descendants can override the GetDefaultVertBordersSize method to specify their own thickness for horizontal borders.


TcxWebControl.GetHorzBordersSize

TcxWebControl          See Also

Returns the horizontal size (width) of the web control’s vertical borders in pixels.

function GetHorzBordersSize: Integer;

Description

The GetHorzBordersSize method is used to return the horizontal size of the control’s vertical borders.  If the web control uses a specific look & feel style (created via the TcxWebStyleController component) for its Default state, the GetHorzBordersSize method returns the horizontal size (thickness) of vertical borders, which was set for the corresponding style item.  Otherwise, (if no style is assigned to the Default state of the control) the GetHorzBordersSize method calls the GetDefaultHorzBordersSize method.

The GetDefaultHorzBordersSize method returns 0 for the TcxWebControl object.  TcxWebControl object descendants can override the GetDefaultHorzBordersSize method to specify their own horizontal size for vertical borders.


TcxWebControl.GetMaxHeight

TcxWebControl          See Also

Returns the maximum height internally specified for a web control (in pixels).

function GetMaxHeight: Integer; virtual;

Description

The GetMaxHeight method is used to implement and return the internal constraint value (if necessary) for the maximum vertical size of a specific control.

The GetMaxHeight method returns 0 for the TcxWebControl object.  That means that the control’s height value has no upper limit.

Any TcxWebControl object descendant can override this method to return a specific value, which will determine the maximum vertical size of a specific control.


TcxWebControl.GetMaxWidth

TcxWebControl          See Also

Returns the maximum width internally specified for a web control (in pixels).

function GetMaxWidth: Integer; virtual;

Description

The GetMaxWidth method is used to implement and return the internal constraint value (if necessary) for the maximum horizontal size of a specific control.

The GetMaxWidth method returns 0 for the TcxWebControl object.  This means that the control’s width value has no upper limit.

Any TcxWebControl object descendant can override this method to return a specific value, which will determine the maximum horizontal size of a specific control.


TcxWebControl.GetMinHeight

TcxWebControl          See Also

Returns the minimum height internally specified for a web control (in pixels).

function GetMinHeight: Integer; virtual;

Description

The GetMinHeight method is used to implement and return the internal constraint value (if necessary) for the minimum vertical size of a specific control.

The GetMinHeight method returns 0 for the TcxWebControl object.  This means that the control’s height value has no lower limit.

Any TcxWebControl object descendant can override this method to return a specific value which will determine the minimum vertical size of a specific control.


TcxWebControl.GetMinWidth

TcxWebControl          See Also

Returns the minimum width internally specified for a web control (in pixels).

function GetMinWidth: Integer; virtual;

Description

The GetMinWidth method is used to implement and return the internal constraint value (if necessary) for the minimum horizontal size of a specific control.

The GetMinWidth method returns 0 for the TcxWebControl object.  This means that the control’s width value has no lower limit.

Any TcxWebControl object descendant can override this method to return a specific value, which will determine the minimum horizontal size of a specific control.


TcxWebControl.GetParentWebPageModule

TcxWebControl

Returns the page module which contains a specific web control.

function GetParentWebPageModule: IcxWebPageModule;

Description

The GetParentWebPageModule method is used to return the IcxWebControl interface supported by the page module to which a given web control belongs.


TcxWebControl.GetVertBordersSize

TcxWebControl          See Also

Returns the vertical size (thickness) of the web control’s horizontal borders in pixels.

function GetVertBordersSize: Integer;

Description

The GetVertBordersSize method is used to return the vertical size of the control’s horizontal borders.  If the web control uses a specific look & feel style (created via the TcxWebStyleController component) for its Default state, the GetVertBordersSize method returns the vertical size (thickness) of horizontal borders which was set for the corresponding style item.  Otherwise, (if no style is assigned to the Default state of the control) the GetVertBordersSize method calls the GetDefaultVertBordersSize method.

The GetDefaultVertBordersSize method returns 0 for the TcxWebControl object.  TcxWebControl object descendants can override the GetDefaultVertBordersSize method to specify their own vertical size for horizontal borders.


TcxWebControl.HasAsParent

`TcxWebControl          See Also

Returns the value indicating whether a web component is the child of a specific container component.

function HasAsParent(AContainer: IcxWebContainerControl): Boolean;

Description

Use the HasAsParent method to determine whether a specific container component is the parent for a web control.  The AContainer parameter specifies the appropriate IcxWebContainerControl interface supported by the container component.

The HasAsParent method compares the AContainer parameter value with the web control’s Parent property value.  If the values are not the same, the HasAsParent method then compares the AContainer parameter value with the component parent’s Parent property value (said differently, with the parent of the component’ parent).  The HasAsParent method repeats this operation sequentially until it finds a match.  If no match is found, the HasAsParent method returns False.

The distinctive feature of assigning a value to the AContainer parameter is that this parameter is of type IcxWebContainerControl.  If you want to find out whether a specific container becomes the parent for a control, you should pass the IcxWebContainerControl interface supported by the container as an AContainer parameter.  The following sample code demonstrates how to call the HasAsParent method.

var AContainerIntf: IcxWebContainerControl;

//...

  cxWebPanel1.GetInterface(IcxWebContainerControl, AContainerIntf);

  if cxWebEdit1.HasAsParent(AContainerIntf) then

    //... performs specific actions if True

  else

    //... performs specific actions if False


TcxWebControl.HasParent

TcxWebControl          See Also

Returns the value that specifies whether a web control has a parent.

function HasParent: Boolean; override;

Description

The HasParent method is used for streaming systems that load and save VCL components.

The HasParent method checks the value returned by the GetParentComponent method.  If this value is not nil (there is a parent for the web control), the HasParent method returns True. If the HasParent method returns True, some other object (the parent) is responsible for writing the control to a stream.  Most commonly, the parent is a form or panel that contains the control.

Note:	Do not confuse a component’s parent, which is responsible for writing the component to a stream, with the component’s owner, which is responsible for freeing the component.


TcxWebControl.Hide

TcxWebControl          See Also

Makes a web control invisible.

procedure Hide;

Description

Call the Hide method to hide a web control.  The Hide method sets the control’s Visible property to False.  Although the hidden control is invisible, its properties and methods are still available.


TcxWebControl.IsContainer

TcxWebControl          See Also

Returns the value specifying whether a web control is a container component.

function IsContainer: Boolean;

Description

The IsContainer method is used to find out whether a web control represents the container component.  The IsContainer method checks the value returned by the AsContainer method.  The AsContainer method considers the web control a container component, which contains child controls within it.  It is assumed that this web control is the parent for those child controls.  Thus the AsContainer method returns the proper IcxWebContainerControl interface implemented by the web control.  If the control is not a container component (it does not support the IcxWebContainerControl interface), the AsContainer method returns nil.  If the AsContainer method returns not nil (the web control is a container), the IsContainer method returns False.


TcxWebControl.RegisterRenderers

TcxWebControl          See Also

Used to register specific renderer classes for a web control.

procedure RegisterRenderers; override;


TcxWebControl.ScriptsSubscription

TcxWebControl          See Also

Subscribes a component to the required scripts.

procedure ScriptsSubscription; override;

Description

This method implements the ScriptsSubscription method of the IcxWebScripts interface.  It is used to register TcxWebScript descendant classes, which represent the scripts required for component functionality.  Registering a TcxWebScript descendant is called subscribing to a script.  Subscribing to a script implies calling the ScriptSubscription method of the TcxWebScriptsHelper class (the WebScriptsHelper property).

The ScriptsSubscription method of the TcxWebControl class calls the inherited ScriptsSubscription method and subscribes to the TcxWebInitScript script, generating the base HTML and Java code for your web control.  Descendant components override this method to subscribe to other desired scripts.  You should also override this method when creating your own component.  Make certain to call the inherited ScriptsSubscription method.


TcxWebControl.SetAttribute

TcxWebControl          See Also

Sets a custom attribute for a web control.

procedure SetAttribute(Name, Value: string);

Description

The SetAttribute method implements the SetAttribute method declared by the IcxWebControlAttributes interface.  This method is used to add a specific custom attribute to the Attributies list of strings.

The Name parameter specifies the name of the added attribute and the Value parameter correspondingly represents its value.


TcxWebControl.SetBounds

TcxWebContainerControl          See Also

Sets a control’s boundary properties all at once.

procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;

Description

The SetBounds method is used to change all of the control’s boundary properties at once.  The same effect can be achieved by setting the Left, Top, Width, and Height properties separately.  By setting all four properties at once, the SetBounds method ensures that the control will not repaint between changes.

The ALeft and ATop parameters correspondingly specify the horizontal coordinate of the left edge and the vertical coordinate of the top edge of the control relative to its parent.

The AWidth and AHeight parameters correspondingly specify the horizontal and vertical size of the control in pixels.


TcxWebControl.SetBoundsRect

TcxWebControl          See Also

Sets the bound rectangle of a control, expressed in the coordinate system of the parent control.

procedure SetBoundsRect(const Value: TRect);

Description

The SetBoundsRect method is used to set the pixel locations of all corners of a web control all at once.  A new bound rectangle for the control is specified by the Value parameter.  The origin of the pixel coordinate system is in the top left corner of the parent control.

The SetBoundsRect method calls the SetBounds method and passes four values (Value.Left, Value.Top, Value.Right-Value.Left, Value.Bottom-Value.Top) as parameters to this method to correspondingly set the Left, Top, Width, and Height control properties.

The SetBoundsRect method implements a corresponding SetBoundsRect method declared by the IcxWebControl interface.  This interface is supported by the TcxWebControl class.  The SetBoundsRect method represents a write specifier for the BoundsRect property.  Since fields are not available in interfaces, the BoundsRect property’s read and write specifiers are private GetBoundsRect and SetBoundsRect methods, which implement the proper GetBoundsRect and SetBoundsRect methods declared by the IcxWebControl interface.


TcxWebControl.SetParentComponent

TcxWebControl          See Also

Sets the parent of a web control.

procedure SetParentComponent(Value: TComponent); override;

Description

The GetParentComponent method is used to set the appropriate parent component specified by the Value parameter for a specific web control.

If the Value parameter value is not nil and the component specified by this parameter supports the IcxWebContainerControl interface, the GetParentComponent method sets this container as a parent for the web control.

Note:	Do not confuse a component’s parent, which is responsible for writing the component to a stream, with the component’s owner, which is responsible for freeing the component.


TcxWebControl.SetStyleAttribute

TcxWebControl          See Also

Sets a custom style attribute for a web control.

procedure SetStyleAttribute(Name, Value: string);

Description

The SetStyleAttribute method implements the SetStyleAttribute method declared by the IcxWebControlAttributes interface.  This method is used to add a specific custom style attribute to the StyleAttributies list of strings.

The Name parameter specifies the name of the added style attribute and the Value parameter correspondingly represents its value.


TcxWebControl.Show

TcxWebControl          See Also

Makes a web control visible.

procedure Show;

Description

Use the Show method to make your web control visible.  This method sets the control’s Visible property to True.


TcxWebControl.StyleChanged

TcxWebControl          See Also

Performs specific operations in response to corresponding style changes.

procedure StyleChanged(Style: TcxWebStyleItem); override;

Description

The TcxWebControl class overrides the StyleChanged method declared by the TcxWebComponent class to perform necessary actions in response to corresponding style changes.

The StyleChanged method calls the AdjustBounds method of your web control when the style used by the control is changed.


TcxWebControl.UpdateControlPosition

TcxWebControl          See Also

Updates the position of a web control.

procedure UpdateControlPosition;

Description

The UpdateControlPosition method is used to update the position of a web control.  This procedure is normally used when the control changes its visibility state or after it has been resized.  For instance, the UpdateControlPosition method is called in such methods as SetBounds, SetVisible, SetParent and in many others.

The UpdateControlPosition method checks whether the control has a parent and (if it has) calls its UpdateControlsPosition method.


TcxWebControl.UpdateDesignerContext

TcxWebControl          See Also

Forces the designer to repaint its contents.

procedure UpdateDesignerContext;

Description

The UpdateDesignerContext method calls the UpdateContext method of the designer.

The UpdateDesignerContext method is normally called when the entire control needs to be repainted due to the changes of specific control properties, which affect its look & feel.

Call the UpdateDesignerContext method in descendant classes when you need to update the context of the designer.


TcxWebControlRenderer
TcxWebControlRenderer Object

Hierarchy          Properties          Methods          See Also

Represents the object that generates HTML code representing a web control.

Unit

cxWebControls

TcxWebControlRenderer = class(TcxWebComponentRenderer)

Description

The TcxWebControlRenderer class is the base class from which all descendant control renderers are inherited.

The TcxWebControlRenderer class implements the WebControl property that obtains the corresponding web control to be rendered.  Additionally, the TcxWebControlRenderer class implements several methods each of which generates browser dependent HTML code for a particular control constituent specified by the appropriate property.


TcxWebControlRenderer Hierarchy
Hierarchy

TcxWebRenderer

     |

TcxWebComponentRenderer


Properties for TcxWebControlRenderer
TcxWebControlRenderer Properties

TcxWebControlRenderer          Legend

In TcxWebControlRenderer

WebControl

Derived from TcxWebComponentRenderer

WebComponent

Derived from TcxWebRenderer

Component

HTMLTextBuilder


Methods for TcxWebControlRenderer
TcxWebControlRenderer Methods

TcxWebControlRenderer          Legend

In TcxWebControlRenderer

WriteAttributes

WriteCaption

WriteEnabled

WriteHint

WriteID

WriteName

WritePosition

WriteSize

WriteStyleAttributes

WriteTabIndex

WriteZIndex

Derived from TcxWebComponentRenderer

WriteDefaultStyle

WriteEvents

WriteEventsScript

WriteScripts

Derived from TcxWebRenderer

Create

Destroy

GetScriptFiles

WriteBeginHTML

WriteClassHTML

WriteClassOutOfFormHTML

WriteClassScripts

WriteEndHTML

WriteHiddenField

WriteHiddenFormElements

WriteHTML

WriteInvisibleImage

WriteOutOfFormHTML

WriteScripts

WriteStyles

WriteXML


TcxWebControlRenderer.WebControl

TcxWebControlRenderer          See Also

Specifies the web control to be rendered.

property WebControl: TcxWebControl;

Description

The WebControl property is used to gain access to a specific web control for which the renderer class generates HTML code.

ReadOnly Property


TcxWebControlRenderer.WriteAttributes

TcxWebControlRenderer          See Also

Generates HTML code for custom attributes of a corresponding web control.

procedure WriteAttributes; virtual;

Description

The WriteAttributes method is used to generate HTML code for the web control’s custom attributes.  These attributes are specified by the Attributes property of the TcxWebControl class and its descendants.  The WriteAttributes method consecutively calls the WriteUnknownAttribute method of the TcxHTMLTextBuilder class for each custom attribute from the Attributes list of strings.  The name and value of an attribute is passed to the WriteUnknownAttribute method as a string parameter in Name=Value format.


TcxWebControlRenderer.WriteCaption

TcxWebControlRenderer          See Also

Generates HTML code for the Caption property of a corresponding web control.

procedure WriteCaption; virtual;

Description

The WriteCaption method is used to generate valid HTML code for the Caption property value of a web control.  This code is inserted into a specific position when the web control is finally rendered.

The WriteCaption method is used to write the control’s caption into the inner text contents of the tag representing the web control.  For instance, web label, web HTML label, and web panel controls use the WriteCaption method to render their captions within their inner text contents.

The WriteCaption method calls the WriteText method of the TcxHTMLTextBuilder class and passes the Caption property value as a parameter.


TcxWebControlRenderer.WriteEnabled

TcxWebControlRenderer          See Also

Generates HTML code for the Enabled property of the corresponding web control.

procedure WriteEnabled; virtual;

Description

The WriteEnabled method is used to generate HTML code concerning the availability of a web control to a user.  If the Enabled property of the corresponding web control is set to False (the web control is not enabled), the WriteEnabled method calls the WriteAttribute method of the TcxHTMLTextBuilder class and passes the aDisabled value as a parameter.  As a result, the DISABLED attribute will be inserted in the contents of the tag that contains the resulting HTML code of the web control when the control is finally being rendered.  The WriteEnabled method performs no actions when the Enabled property of the web control is set to True.


TcxWebControlRenderer.WriteHint

TcxWebControlRenderer          See Also

Generates HTML code for the Hint property of the corresponding web control.

procedure WriteHint; virtual;

Description

The WriteHint method is used to generate HTML code regarding the availability of a Help Hint for the corresponding web control.  The WriteHint method calls the WriteAttribute method of the TcxHTMLTextBuilder class and passes two attributes to it: aTitle and the Hint property value.  As a result, the TITLE attribute is inserted (in form title="text" where text is the Hint property value) in the contents of the tag containing the resultant HTML code for the web control when the control is being rendered.

The WriteHint method performs no actions when the web control’s ShowHint property is set to False or the Hint property value is an empty string.


TcxWebControlRenderer.WriteID

TcxWebControlRenderer          See Also

Generates the HTML code representing the ID attribute specified by the Name property of the corresponding web control.

procedure WriteID; virtual;

Description

The WriteID method is used to generate HTML code for the ID attribute of the tag which contains the rendered web control.  The WriteID method calls the WriteAttribute method of the TcxHTMLTextBuilder class and passes two attributes to it: aId and the control’s Name property value.  As a result, the ID attribute will be inserted (in form id="text" where text is the Name property value) in the contents of the tag containing the resultant HTML code for the web control when the control is finally being rendered.


TcxWebControlRenderer.WriteName

TcxWebControlRenderer          See Also

Generates the HTML code representing the NAME attribute specified by the Name property of the corresponding web control.

procedure WriteName; virtual;

Description

The WriteName method is used to generate HTML code for the NAME attribute of the tag representing the corresponding web control within a web page.  The WriteName method calls the WriteAttribute method of the TcxHTMLTextBuilder class and passes two attributes to it: aName and the control’s Name property value.  As a result, the NAME attribute will be inserted (in form name="text" where text is the Name property value) in the contents of the tag containing the resultant HTML code for the web control when the control is finally being rendered.


TcxWebControlRenderer.WritePosition

TcxWebControlRenderer          See Also

Generates HTML code which specifies the current position of a web control within a web page.

procedure WritePosition; virtual;

Description

The WritePosition method is used to generate HTML code for particular style attribute which specify the current position of a corresponding web control within a page.  The WritePosition method renders particular style attributes only if its parent web page module supports the IcxWebClientData interface and the PositioningType property of the page module is set to cxptAbsolute (the page module uses absolute positioning for its child web controls).  If these conditions are met, the WritePosition method calls the WriteStyleAttribute method of the TcxHTMLTextBuilder class to render the TOP, LEFT, and POSITION style attributes with their values.  When the web control is finally being rendered, these attributes are inserted in the contents of the STYLE attribute of the tag containing the resulting HTML code for the control.

The TOP attribute value is formed as the sum of the control’s AbsTop property value and the value returned by the GetTopPos method of the IcxWebClientData interface supported by the parent web page module (this method is implemented by the GetTopPos method of the TcxCustomWebPageModule class).

The LEFT attribute value is formed as the sum of the control’s AbsLeft property value and the value returned by the GetLeftPos method of the IcxWebClientData interface supported by the parent web page module (this method is implemented by the GetLeftPos method of the TcxCustomWebPageModule class).

The POSITION attribute holds the "absolute" value.


TcxWebControlRenderer.WriteSize

TcxWebControlRenderer          See Also

Generates HTML code which specifies the size of a web control.

procedure WriteSize; virtual;

Description

The WriteSize method is used to generate HTML code for particular style attribute which specify the size of a corresponding web control.  The WriteSize method calls the WriteStyleAttribute method of the TcxHTMLTextBuilder class twice to render the HEIGHT and WIDTH attributes with their values.  When the web control is finally being rendered, these attributes are inserted in the STYLE attribute’s contents of the tag containing the resulting HTML code of the control.

The HEIGHT attribute receives the Height property value of the web control.  The WIDTH attribute receives the control’s Width property value.


TcxWebControlRenderer.WriteStyleAttributes

TcxWebControlRenderer          See Also

Generates HTML code for the custom style attributes specified by the StyleAttributes property of the corresponding web control.

procedure WriteStyleAttributes; virtual;

Description

The WriteStyleAttributes method is used to generate HTML code for the web control’s custom style attributes represented by the StyleAttributes property.  The WriteStyleAttributes method consecutively calls the WriteUnknownAttribute method of the TcxHTMLTextBuilder class for each custom style attribute from the StyleAttributes list of strings.  The name and value of an attribute is passed to the WriteUnknownAttribute method as a string parameter in Name=Value form.


TcxWebControlRenderer.WriteTabIndex

TcxWebControlRenderer          See Also

Generates HTML code representing the web control’s tab index specified by the TabOrder property.

procedure WriteTabIndex; virtual;

Description

The WriteTabIndex method is used to generate HTML code for a specific attribute that defines the tab order for a corresponding web control.  If the TabOrder property of the web control is not –1, the WriteTabIndex method calls the WriteAttribute method of the TcxHTMLTextBuilder class to render the TABINDEX attribute with its value.  This attribute is inserted in the contents of the tag containing the resulting HTML code of the web control when the control is being rendered.

The TABINDEX attribute value is specified by the TabOrder property of the corresponding web control.


TcxWebControlRenderer.WriteZIndex

TcxWebControlRenderer          See Also

Generates HTML code representing the Z-INDEX attribute specified by the ZIndex property.

procedure WriteZIndex; virtual;

Description

The WriteZIndex method is used to generate HTML code which represents the stacking order for a web control.  The WriteZIndex method calls the WriteStyleAttribute method of the TcxHTMLTextBuilder class to render the Z-INDEX attribute with its value.  This attribute is inserted in the STYLE attribute’s contents of the tag containing the resulting HTML code for the web control when the control is being rendered.

The Z-INDEX attribute value is specified by the ZIndex property of the corresponding web control.


TcxCustomWebListBox
TcxCustomWebListBox Object

Hierarchy          Properties          Methods          Events

Represents the base class for list box controls.

Unit

cxWebStdCtrls

TcxCustomWebListBox = class(TcxWebFormControl)

Description

The TcxCustomWebListBox class implements the generic behavior of list box controls.  List box controls are those providing the ability to select an item or a number of items from a predefined list.  The items within the list can be adjusted both at design and runtime.

The TcxCustomWebListBox class currently serves as the base class for two types of controls.  These are list box controls and combo box controls.  List box control display as many items as can fit into its area.  Available list box descendants are the TcxWebListBox and TcxWebDBListBox controls.  Combo box controls display only the currently selected item.  Items are selected using the dropdown window, when using combo box controls.  Available combo box descendants are the TcxWebComboBox and TcxWebDBComboBox controls.


TcxCustomWebListBox Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxWebFormControl


Properties for TcxCustomWebListBox
TcxCustomWebListBox Properties

TcxCustomWebListBox          Legend

In TcxCustomWebListBox

ItemHeight

ItemIndex

Items

MinSize

MultiSelect

SelCount

Size

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxCustomWebListBox
TcxCustomWebListBox Methods

TcxCustomWebListBox          Legend

In TcxCustomWebListBox

CheckItemIndex

CheckNewSize

Clear

Create

Destroy

DoChange

DoSetValues

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetItemIndex

GetMinHeight

GetMinSize

GetSize

RegisterActions

RegisterEvents

RegisterRenderers

RegisterValues

ScriptsSubscription

SetItemIndex

SetSize

StyleChanged

Derived from TcxWebFormControl

 	RegisterEvents

 	ScriptsSubscription

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

Create

Destroy

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

RegisterRenderers

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterActions

RegisterValues

SetState

ValidateContainer


Events for TcxCustomWebListBox
TcxCustomWebListBox Events

TcxCustomWebListBox          Legend

In TcxCustomWebListBox

OnChange

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxCustomWebListBox.ItemHeight

TcxCustomWebListBox          See Also

Returns the height of items within the list box.

property ItemHeight: Integer;

Description

Use the ItemHeight property to store the height of items within the list box.  The value of this property depends on the style applied.  It is used to calculate the height of the list box control, when the height is set in text lines (items).  It is calculated when the control is created and each time the applied style changes.

The Size property controls the height of the list box control in text lines (items).  Use the Styles property to apply styles to the control.

ReadOnly Property


TcxCustomWebListBox.ItemIndex

TcxCustomWebListBox

Specifies the index of the selected item.

property ItemIndex: Integer;

Description

Use the ItemIndex property to set or get a value specifying the index of the selected item.  Items are zero-based indexed.  They are accessed via the Items property. If none of the items is selected, the ItemIndex property value is -1.

If the value of the MultiSelect property is True, a user can select more than one item in the list box.  In this case, the ItemIndex property returns -1.  Changing the value of the IndexItem property in such a situation is not in effect.

Note that the multi-select feature is in effect for the TcxWebListBox control only.

The default value of the ItemIndex property is –1.


TcxCustomWebListBox.Items

TcxCustomWebListBox

Lists the items of the list box control.

property Items: TcxWebListItems;

Description

Use the Items property to access the collection of items within the list box control.  This property returns the TcxWebListItems object.  Use the properties and methods of the obtained object in order to add, insert, delete items or access an individual item.  Each item within the list is represented by the TcxWebListItem object.

You can also assign a previously modified TcxWebListItems object to the Items property.  This is useful when creating the same or slightly different control.


TcxCustomWebListBox.MinSize

TcxCustomWebListBox          See Also

Returns the minimum number of items displayed by the list box control at a time.

property MinSize: Integer;

Description

The MinSize property is used to determine the minimum number of lines (items) displayed by the list box control simultaneously.  This allows you to establish the minimum height constraint for the control and controlling the Size property value.  The Size property cannot be set to a value less than the MinSize property value.

As implemented in the TcxCustomWebListBox class, this property returns 2.  Descendant classes override the MinSize property in order to return a proper value.

ReadOnly Property


TcxCustomWebListBox.MultiSelect

TcxCustomWebListBox          See Also

Specifies whether an end user can select more than one item at a time.

property MultiSelect: Boolean;

Description

Use the MultiSelect property to set or get a value specifying whether multiple items can be selected.  Set this property to True to allow multi selection.  Otherwise only one item can be selected at a time. If the MultiSelect property is set to True, the ItemIndex property returns -1.  Changing the ItemIndex property in such a situation is not in effect.

Check the Selected property values of list box items in order to determine the selected items.  The items are accessed via the Items property.

The default value of the MultiSelect property is False.


TcxCustomWebListBox.OnChange

TcxCustomWebListBox          See Also

Fires when selection is changed.

property OnChange: TNotifyEvent;

Description

Write an OnChange event handler to perform specific actions each time selection changes.  If the MultiSelect property is False, the event fires when a user selects an item.  If the MultiSelect property is True, the event fires when a user performs one of the following actions:

•	a user selects an item;

•	a user selects an item when some items are already selected;

•	a user deselects an item.


TcxCustomWebListBox.SelCount

TcxCustomWebListBox          See Also

Returns the number of selected items.

property SelCount: Integer;

Description

Use the SelCount property to retrieve the number of currently selected list box items.  This property is used only if the MultiSelect property is set to True.  Otherwise it always returns 1.

Check the Selected property values of the list box items in order to determine the selected items.  Items are accessed via the Items property.

ReadOnly Property


TcxCustomWebListBox.Size

TcxCustomWebListBox          See Also

Specifies the number of items displayed by the control at a given time.

property Size: Integer;

Description

Use the Size property to specify the height of the list box control in items (text lines).  Setting this property affects the Height property value, and vice versa.  The Height property value is always adjusted to represent the nearest integer number of text lines (items) with respect to the applied font.

The Size property value cannot be set less than the MinSize property value.  Descendant classes override the MinSize property in order to return a proper value.  As implemented in the TcxCustomWebListBox class, the MinSize property returns 2.

The default value of the Size property is 5.


TcxCustomWebListBox.CheckItemIndex

TcxCustomWebListBox          See Also

Adjusts the index of an item due to its index boundaries.

procedure CheckItemIndex(var ANewValue: Integer); virtual;

Description

The CheckItemIndex method is used to adjust the specified item index with respect to index boundaries.  The ANewValue parameter specifies the index to be adjusted.  This method is used when assigning a value to the ItemIndex property.

The CheckItemIndex assigns -1 or the maximum available item index if the transmitted parameter value is either less than -1 or greater than the maximum available item index.  In other cases, the transmitted value remains unchanged.


TcxCustomWebListBox.CheckNewSize

TcxCustomWebListBox          See Also

Responds to notifications that the control is resized.

procedure CheckNewSize(var ALeft, ATop, ANewWidth, ANewHeight: Integer); override;

Description

The CheckNewSize method is called each time the control is resized.  The ALeft and ATop parameters specify the current location of the control.  The ANewWidth and the ANewHeight parameters specify newly assigned width and height respectively.

As implemented in the TcxCustomWebListBox class, the CheckNewSize method sets the height of the control to accommodate the nearest integer number of items (text lines).

This method overrides the CheckNewSize method of the TcxWebControl class.


TcxCustomWebListBox.Clear

TcxCustomWebListBox          See Also

Deletes all items from the list box.

procedure Clear;

Description

Use the Clear method to delete all of the items in the list box at once.  This can also be performed via the Clear method of the TStrings class representing the Items property.  The methods of this class allow you to perform any manipulations with the items within the list box.


TcxCustomWebListBox.Create

TcxCustomWebListBox

Creates an instance of the TcxCustomWebListBox class.

constructor Create(AOwner: TComponent); override;

Description

The Create method is used to create a new TcxCustomWebListBox object.  The AOwner parameter specifies the owner of the newly created object.  After calling the inherited constructor, the Create method initializes the Items property and sets properties to their default values.

Do not create instances of the TcxCustomWebListBox class in applications.  Instantiate its descendant controls.  Available descendants are the TcxWebListBox and TcxWebComboBox controls.


TcxCustomWebListBox.Destroy

TcxCustomWebListBox

Destroys the TcxCustomWebListBox object.

destructor Destroy; override;

Description

The Destroy method is used to dispose of the TcxCustomWebListBox object and free any allocated memory.  This method frees the Items property before calling the inherited constructor.


TcxCustomWebListBox.DoChange

TcxCustomWebListBox          See Also

Responds to changes in the index of a selected item.

procedure DoChange; dynamic;

Description

The DoChange method executes the OnChange event handler if assigned.  It is called whenever the index of the selected item is changed both at the client or server side of the application.  The index of the selected item is specified by the ItemIndex property.

This method can be overridden in derived classes to perform additional actions when the index of a selected item is changed.


TcxCustomWebListBox.GetDefaultHorzBordersSize

TcxCustomWebListBox          See Also

Returns the default integral width of horizontal borders.

function GetDefaultHorzBordersSize: Integer; override;

Description

The GetDefaultHorzBordersSize method is used to determine the integral width of horizontal borders.  This method’s return value is used only when no style is applied to the control.  Otherwise, the width of borders is calculated using the information about the applied style.

This method overrides the GetDefaultHorzBordersSize method of the TcxWebControl class.  As implemented in the TcxCustomWebListBox class it returns 6 (since the default width of a single border is 3).


TcxCustomWebListBox.GetDefaultVertBordersSize

TcxCustomWebListBox          See Also

Returns the default integral width of vertical borders.

function GetDefaultVertBordersSize: Integer; override;

Description

The GetDefaultVertBordersSize method is used to determine the integral width of vertical borders.  This method’s return value is used only when no style is applied to the control.  Otherwise, the width of borders is calculated using the information about the applied style.

This method overrides the GetDefaultVertBordersSize method of the TcxWebControl class.  As implemented in the TcxCustomWebEdit class, it returns 6 (since the default width of a single border is 3).


TcxCustomWebListBox.GetItemIndex

TcxCustomWebListBox          See Also

Returns the value of the ItemIndex property.

function GetItemIndex: Integer; virtual;

Description

The GetItemIndex method is used to retrieve the index of a selected item.  If the MultiSelect property is set to True, the method returns –1.


TcxCustomWebListBox.GetMinHeight

TcxCustomWebListBox          See Also

Returns the minimum possible height of the control with respect to applied font.

function GetMinHeight: Integer; override;

Description

The GetMinHeight method’s return value is used to establish a minimum height constraint for a web edit control.  This method returns the height of the control and allows accommodating a number of text lines (items) specified by the MinSize property.

The method overrides the GetMinHeight method of the TcxWebControl class.


TcxCustomWebListBox.GetMinSize

TcxCustomWebListBox          See Also

Returns the value of the MinSize property.

function GetMinSize: Integer; virtual;

Description

The GetMinSize method is designed to return the minimum number of items displayed by the list box control at a given time.  This method is the ‘read’ of the MinSize property.  This property’s value is used to implement the minimum height constraint for the control.

As implemented in the TcxCustomWebListBox class, the GetMinSize method returns 2.  Descendants override this method to return a proper value.


TcxCustomWebListBox.GetSize

TcxCustomWebListBox          See Also

Returns the value of the Size property.

function GetSize: Integer; virtual;

Description

The GetSize method is used to calculate the number of text lines (items) displayed by the list box control at a given time.  This method is called when accessing the Size property value.

Descendants can override the GetSize method to implement a different behavior for the Size property.


TcxCustomWebListBox.DoSetValues

TcxCustomWebListBox          See Also

Updates the list box control with respect to changes made by an end user.

procedure DoSetValues; override;

Description

The request contains information indicating the indexes of selected items.  This information is used to update the control with respect to changes made at the client browser.  This is performed by the DoSetValues method.  It sets the Selected property of selected items to True.

This method implements the IcxWebValues interface’s DoSetValues method.


TcxCustomWebListBox.RegisterActions

TcxCustomWebListBox          See Also

Registers action handlers for the list box control.

procedure RegisterActions; override;

Description

The RegisterActions method registers a single handler for two actions.  These actions are the "CHANGE" action and the default.  Both actions result in OnChange event handler execution.

This method overrides the RegisterActions method of the TcxWebComponent class.


TcxCustomWebListBox.RegisterEvents

TcxCustomWebListBox          See Also

Registers client event handlers for the list box control.

procedure RegisterEvents; override;

Description

The RegisterEvents method registers the client handler for the OnChange event, if the OnChange event handler is assigned.  It calls the inherited method as well.

This method implements the RegisterEvents method of the IcxWebEvents interface.


TcxCustomWebListBox.RegisterRenderers

TcxCustomWebListBox          See Also

Registers renderer classes that generate HTML code representing the list box control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers a specific renderer class designed to render HTML code for the list box control.  The browser type for which the registered renderer is designed is the Internet Explorer browser.  The registered renderer is used to render the code for all the browsers (it is registered as the default one).

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for a list box control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxCustomWebListBox.RegisterValues

TcxCustomWebListBox          See Also

Registers the HTML elements, which contain data related to a component.

procedure RegisterValues; override;

Description

The RegisterValues method is used to register HTML elements, which contain data related to the web list box control.  It registers the SELECT tag representing the list box on a web page.  This is needed to determine indexes of selected items after end-user manipulations.  The DoSetValues method implements the update of the control with respect to changes made in the client browser.

This method implements the RegisterValues method of the IcxWebValues interface.  It can be overridden in descendant classes to register other or additional HTML elements, whose values are required for proper functionality.


TcxCustomWebListBox.ScriptsSubscription

TcxCustomWebListBox          See Also

Subscribes the control to client scripts required for proper functionality.

procedure ScriptsSubscription; override;

Description

The ScriptSubscription method is used to subscribe the web list box control to a post back script.  Note that if the control does not have a handler for the OnChange event, script subscription is skipped.

This method implements the ScriptsSubscription method of the IcxWebScripts interface.  It can be overridden in descendant classes to subscribe a derived control to additional scripts.


TcxCustomWebListBox.SetItemIndex

TcxCustomWebListBox          See Also

Sets the value of the ItemIndex property.

procedure SetItemIndex(Value: Integer); virtual;

Description

The SetItemWidth method is used to assign a value to the ItemIndex property.  In other words, it is designed to select the item with a specified index.  The index is specified by the Value parameter.

Note that if the MultiSelect property is set to True, the method does nothing.

This method can be overridden in derived classes to implement a different behavior for the ItemIndex property.


TcxCustomWebListBox.SetSize

TcxCustomWebListBox          See Also

Sets the value of the Size property.

procedure SetSize(Value: Integer); virtual;

Description

The SetSize method is used to assign a value to the Size property.  In other words, it is designed to set the number of text lines (items) displayed by the list box control.  The Value parameter specifies the value to be assigned.

Note that if the Value parameter value is less than the value of the MinSize property, the MinSize property value is assigned to the Size property.

This method can be overridden in derived classes to implement a different behavior for the Size property.


TcxCustomWebListBox.StyleChanged

TcxCustomWebListBox          See Also

Responds to style changes.

procedure StyleChanged(Style: TcxWebStyleItem); override;

Description

The StyleChanged method is designed to respond to style changes.  The method overrides the StyleChanged method of the TcxWebControl class.  As implemented in the TcxCustomWebEdit class, the StyleChanged method adjusts the size of the control with respect to the newly applied style.


TcxCustomWebComboBox
TcxCustomWebComboBox Object

Hierarchy          Properties          Methods          Events

Represents a base class for combo box and lookup controls.

Unit

cxWebStdCtrls

TcxCustomWebComboBox = class(TcxCustomWebListBox)

Description

The TcxCustomWebComboBox class is a common base class for combo box and lookup controls.

The TcxCustomWebComboBox class inherits the functionality implemented by the TcxCustomWebListBox class.  The TcxCustomWebComboBox slightly changes the behavior of its ancestor in order to provide proper functionality in relation to the look & feel of its descendants.


TcxCustomWebComboBox Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxWebFormControl

     |

TcxCustomWebListBox


Properties for TcxCustomWebComboBox
TcxCustomWebComboBox Properties

TcxCustomWebComboBox          Legend

In TcxCustomWebComboBox

Text

Derived from TcxCustomWebListBox

ItemHeight

ItemIndex

Items

MinSize

MultiSelect

SelCount

Size

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxCustomWebComboBox
TcxCustomWebComboBox Methods

TcxCustomWebComboBox          Legend

In TcxCustomWebComboBox

CheckItemIndex

Create

DoSetValues

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetItemIndex

GetMaxHeight

GetMinSize

RegisterRenderers

RegisterValues

Derived from TcxCustomWebListBox

CheckNewSize

Clear

Destroy

DoChange

GetMinHeight

GetSize

RegisterActions

RegisterEvents

ScriptsSubscription

SetItemIndex

SetSize

StyleChanged

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

SetState

ValidateContainer


Events for TcxCustomWebComboBox
TcxCustomWebComboBox Events

TcxCustomWebComboBox          Legend

Derived from TcxCustomWebListBox

OnChange

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxCustomWebComboBox.Text

TcxCustomWebComboBox

Specifies the text contents of the selected item.

property Text: string;

Description

Read the Text property to obtain the text content of the selected item.  If no item is selected, this property returns an empty string.

Set the Text property to a text string to select the item with the same text content.  If the value set to the Text property doesn’t coincide with the text content of any item, nothing happens.

The text content of an item within the combo box control is set via the Text property of the corresponding TcxWebListItem object.


TcxCustomWebComboBox.CheckItemIndex

TcxCustomWebComboBox

Adjusts the transmitted item index.

procedure CheckItemIndex(var ANewValue: Integer); override;

Description

The CheckItemIndex method is used to adjust the value of the item index transmitted to it.  The item index is specified by the ANewValue parameter.  The index is adjusted in the following cases:

•	if the combo box control contains no items, the ANewValue parameter is set to –1.  No other conditions are checked in this case;

•	the ANewValue is set to the index of the last item if it is greater than this value;

•	the ANewValue is set to 0 if it is negative.

The CheckItemIndex method is used when setting the selected item via the ItemIndex property.


TcxCustomWebComboBox.Create

TcxCustomWebComboBox

Creates a new combo box control.

constructor Create(AOwner: TComponent); override;

Description

Use the Create method to add a new combo box control to a web page.  The AOwner parameter specifies the owner of the control being created (the page module owning it).

Don’t forget to set the Parent property to a proper value.  Otherwise the control will not be displayed.


TcxCustomWebComboBox.GetDefaultHorzBordersSize

TcxCustomWebComboBox          See Also

Returns the default integral width of the horizontal borders.

function GetDefaultHorzBordersSize: Integer; override;

Description

The GetDefaultHorzBordersSize method is used to determine the integral width of horizontal borders.  This method’s return value is used only when no style is applied to the control.  Otherwise, the width of borders is calculated using the information about the applied style.

This method overrides the GetDefaultHorzBordersSize method of the TcxWebControl class.  As implemented in the TcxWebComboBox class, it returns 4 (since the default width of a single border is 2).


TcxCustomWebComboBox.GetDefaultVertBordersSize

TcxCustomWebComboBox          See Also

Returns the default integral width of vertical borders.

function GetDefaultVertBordersSize: Integer; override;

Description

The GetDefaultVertBordersSize method is used to determine the integral width of vertical borders.  This method’s return value is used only when no style is applied to the control.  Otherwise, the width of borders is calculated using the information about the style applied.

This method overrides the GetDefaultVertBordersSize method of the TcxWebControl class.  As implemented in the TcxWebComboBox class, it returns 4 (since the default width of a single border is 2).


TcxCustomWebComboBox.GetItemIndex

TcxCustomWebComboBox          See Also

Returns the value of the ItemIndex property.

function GetItemIndex: Integer; override;

Description

The GetItemIndex method is used to obtain the value of the ItemIndex property, when it is accessed.  It returns the index of the selected item.  Item indexes are zero-based.

If there are no items in the combo box control, the GetItemIndex method returns –1.


TcxCustomWebComboBox.GetMaxHeight

TcxCustomWebComboBox          See Also

Returns the maximum possible height of the combo box control with respect to applied style.

function GetMaxHeight: Integer; override;

Description

The GetMaxHeight method’s return value is used to establish a maximum height constraint for the combo box control.  This method returns the sum of item height and width of vertical borders with respect to applied style.

This method overrides the GetMaxHeight method of the TcxWebControl class.


TcxCustomWebComboBox.GetMinSize

TcxCustomWebComboBox          See Also

Returns the minimum size of a particular web combo box control.

function GetMinSize: Integer; override;

Description

Use the GetMinSize function to retrieve the minimum size of a particular web combo box control.

The function results in 1.


TcxCustomWebComboBox.DoSetValues

TcxCustomWebComboBox          See Also

Updates the combo box control with respect to changes made by an end user.

procedure DoSetValues; override;

Description

The request contains information about the index of the combo box control’s selected item.  This information is used to set the value of the ItemIndex property in order to update the control with respect to changes made at the client browser.  This is performed by the DoSetValues method.

This method implements the IcxWebValues interface’s DoSetValues method.


TcxCustomWebComboBox.RegisterRenderers

TcxCustomWebComboBox          See Also

Registers renderer classes that generate HTML code representing the control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers a specific renderer class designed to render HTML code for the control.  The browser type for which the registered renderer is designed is Internet Explorer.  The registered browser is used to render the code for all the browsers (it is registered as the default).

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for a control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxCustomWebComboBox.RegisterValues

TcxCustomWebComboBox          See Also

Registers HTML elements, which contain data related to the component.

procedure RegisterValues; override;

Description

The RegisterValues method is used to register HTML elements, which contain data related to the combo box control.  It registers the SELECT tag representing the control on a web page.  This is needed to determine the index of the selected item after end-user manipulations.  The DoSetValues method implements the update of the ItemIndex property.

This method implements the RegisterValues method of the IcxWebValues interface.  It can be overridden in descendant classes to register other or additional HTML elements, whose values are required for proper functionality.


TcxWebComboBox
 TcxWebComboBox Object

Hierarchy          Properties          Methods          Events

Represents a web combo box control.

Unit

cxWebStdCtrls

TcxWebComboBox = class(TcxCustomWebComboBox)

Description

Use the TcxWebComboBox control to place a combo box control onto a web page.  This control allows a user to select a value from a predefined set.  Values are displayed within the dropdown.  If you don’t want to use a dropdown to display list items, you should use the TcxWebListBox control.

You should use the TcxWebDBComboBox control in order to edit values of a dataset field using the combo box control.

The TcxWebComboBox control’s functionality is implemented by the TcxCustomWebListBox and TcxCustomWebComboBox classes.  The TcxWebCheckBox simply publishes some its properties.


TcxWebComboBox Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxWebFormControl

     |

TcxCustomWebListBox

     |

TcxCustomWebComboBox


Properties for TcxWebComboBox
TcxWebComboBox Properties

TcxWebComboBox          Legend

Derived from TcxCustomWebComboBox

Text

Derived from TcxCustomWebListBox

ItemHeight

ItemIndex

Items

MinSize

MultiSelect

SelCount

Size

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebComboBox
TcxWebComboBox Methods

TcxWebComboBox          Legend

Derived from TcxCustomWebComboBox

CheckItemIndex

Create

DoSetValues

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetItemIndex

GetMaxHeight

GetMinSize

RegisterRenderers

RegisterValues

Derived from TcxCustomWebListBox

CheckNewSize

Clear

Destroy

DoChange

GetMinHeight

GetSize

RegisterActions

RegisterEvents

ScriptsSubscription

SetItemIndex

SetSize

StyleChanged

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

SetState

ValidateContainer


Events for TcxWebComboBox
TcxWebComboBox Events

TcxWebComboBox          Legend

Derived from TcxCustomWebListBox

OnChange

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebListBox
 TcxWebListBox Object

Hierarchy          Properties          Methods          Events

Represents a web list box control.

Unit

cxWebStdCtrls

TcxWebListBox = class(TcxCustomWebListBox)

Description

Use the TcxWebListBox control to place a list box onto a web page.  This control allows an end user to select one or more values from a predefined list.  The MultiSelect property specifies whether several items of the list can be selected at a time.  If the items of the list box do not fit into the area of the list box, a vertical scroll bar appears.

The TcxWebListBox control inherits the generic functionality of the TcxCustomWebListBox class.  It provides several methods to manipulate selections.


TcxWebListBox Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxWebFormControl

     |

TcxCustomWebListBox


Properties for TcxWebListBox
TcxWebListBox Properties

TcxWebListBox          Legend

Derived from TcxCustomWebListBox

ItemHeight

ItemIndex

Items

MinSize

MultiSelect

SelCount

Size

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebListBox
TcxWebListBox Methods

TcxWebListBox          Legend

In TcxWebListBox

ClearSelection

DeleteSelected

SelectAll

Derived from TcxCustomWebListBox

CheckItemIndex

CheckNewSize

Clear

Create

Destroy

DoChange

DoSetValues

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetItemIndex

GetMinHeight

GetMinSize

GetSize

RegisterActions

RegisterEvents

RegisterRenderers

RegisterValues

ScriptsSubscription

SetItemIndex

SetSize

StyleChanged

Derived from TcxWebFormControl

 	RegisterEvents

 	ScriptsSubscription

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

Create

Destroy

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

RegisterRenderers

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterActions

RegisterValues

SetState

ValidateContainer


Events for TcxWebListBox
TcxWebListBox Events

TcxWebListBox          Legend

Derived from TcxCustomWebListBox

OnChange

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebListBox.ClearSelection

TcxWebListBox          See Also

Deselects all items within the list box.

procedure ClearSelection;

Description

Use the ClearSelection method to deselect all items within the TcxWebListBox control.  You can use the Selected property of the TcxWebListItem object to specify whether an individual item is selected.


TcxWebListBox.DeleteSelected

TcxWebListBox          See Also

Deletes all selected items of the list box control.

procedure DeleteSelected;

Description

Use the DeleteSelected method to delete all selected items within the TcxWebListBox control.  Individual items can be added and deleted via methods of the TcxWebListItems class, which represent the Items property.


TcxWebListBox.SelectAll

TcxWebListBox          See Also

Selects all the items within the list box control.

procedure SelectAll;

Description

Use the SelectAll method to select all the items within the TcxWebListBox control.  You can use the Selected property of the TcxWebListItem object to specify whether an individual item is selected.


TcxWebListItem
TcxWebListItem Object

Hierarchy          Properties          Methods

Represents an item within the combo box or list box control.

Unit

cxWebStdCtrls

TcxWebListItem = class(TCollectionItem)

Description

Descendants of the TcxCustomWebListBox class provide a means to select items from a predefined set.  These items are accessible via the Items property.  This property is represented by the TcxWebListItems collection containing items of the TcxWebListItem class.  Thus the TcxWebListItem objects represent individual items within TcxCustomWebListBox descendants (TcxWebComboBox and TcxWebListBox controls).

Individual items have properties specifying the text displayed to represent it, the associated value and a value specifying whether the item is selected.  Items within the collection can be added and deleted via methods of the TcxWebListItems object owning them.


TcxWebListItem Hierarchy
Hierarchy

TCollectionItem


Properties for TcxWebListItem
TcxWebListItem Properties

TcxWebListItem          Legend

In TcxWebListItem

Selected

Text

Value


Methods for TcxWebListItem
TcxWebListItem Methods

TcxWebListItem          Legend

In TcxWebListItem

Assign

Create


TcxWebListItem.Selected

TcxWebListItem          See Also

Specifies whether the list item is selected.

property Selected: Boolean;

Description

Use the Selected property to select or deselect a list item.  Setting this property to True selects the item, setting to False deselects it.

Controls containing items of type TcxWebListItem can support multiple selections.  In such an instance, the item(s) that was previously selected is not deselected.  Setting the Selected property to True deselects the previously selected item.

Multiple selections are supported by the TcxWebListBox control.  Use its MultiSelect property to specify whether several items can be selected at a time.

The default value of the Selected property is False.


TcxWebListItem.Text

TcxWebListItem

Specifies the text content of the list item.

property Text: string;

Description

Use the Text property to specify the text content of the item within the list.  The string specified by this property is displayed to represent the item within the owning control.


TcxWebListItem.Value

TcxWebListItem

Specifies a string value associated with the item.

property Value: string;

Description

Use the Value property to store any additional information associated with the item.

Each item of the combo box is represented by the OPTION tag in HTML code.  The Value property value is assigned to the VALUE attribute of this tag.

Items of a control should have unique strings set to their Value properties in order to provide correct functioning of the control.  Successive integers (in string representation) are assigned to these properties by default.


TcxWebListItem.Assign

TcxWebListItem          See Also

Copies the contents of one object to another.

procedure Assign(Source: TPersistent); override;

Description

Call the Assign method to copy the contents of one TcxWebListItem object to another.  The Source parameter specifies the source object.  The caller of the method is the destination object.

The Assign method copies the values of the Selected, Value and Text properties of the source object to the destination.  If the source object is not of type TcxWebListItem, the inherited method is called.


TcxWebListItem.Create

TcxWebListItem

Creates an instance of the TcxWebListItem class.

constructor Create(Collection: TCollection); override;

Description

The Create method is used to initialize a new TcxWebListItem object.  The Collection parameter specifies the collection owning the item.  After calling the inherited constructor, the create method performs the following actions:

•	sets the Selected property to False;

•	sets the Value property to the string representation of item’s index.

Do not cerate instances of the TcxWebListItem class in applications.  Call the Add method of the TcxWebListItems to create a new item and add it to the list.


TcxWebListItems
TcxWebListItems Object

Hierarchy          Properties          Methods

Represents a collection of items of the combo box and list box controls.

Unit

cxWebStdCtrls

TcxWebListItems = class(TCollection)

Description

Descendants of the TcxCustomWebListBox class provide a means by which to select items from a predefined set.  These items are accessible via the Items property.  This property is represented by the TcxWebListItems collection containing items of the TcxWebListItem class.  Thus the TcxWebListItem objects represent individual items within TcxCustomWebListBox descendants (TcxWebComboBox and TcxWebListBox controls).

Properties and methods of the TcxWebListItems class provide a means to add, delete items and access individual items within the collection.


TcxWebListItems Hierarchy
Hierarchy

TCollection


Properties for TcxWebListItems
TcxWebListItems Properties

TcxWebListItems          Legend

In TcxWebListItems

Items


Methods for TcxWebListItems
TcxWebListItems Methods

TcxWebListItems          Legend

In TcxWebListItems

Add

Create

IndexOfText

IndexOfValue

TextOfValue


TcxWebListItems.Items

TcxWebListItems

Provides indexed access to the items in the collection.

property Items[Index:Integer]: TcxWebListItem;

Description

Use the Items property to access individual items in the TcxWebListItems collection.  The Index parameter specifies the index of the accessed item within the collection.  Items are zero based indexed.

The Items property is the default in the TcxWebListItems class.  Thus you can use the Items property of TcxCustomWebListBox descendants with the index to access items in the list.


TcxWebListItems.Add

TcxWebListItems          See Also

Creates a new list box item and adds it to the collection.

function Add: TcxWebListItem;

Description

Use the Add method to create a new TcxWebListItem object and add it to the end of the collection.  This method returns the added item.


TcxWebListItems.Create

TcxWebListItems

Creates an instance of the TcxWebListItems class.

constructor Create(AOwner: TcxCustomWebListBox);

Description

The Create method is used to initialize the TcxWebListItems object.  The AOwner parameter specifies the owner of the collection.

Do not create instances of the TcxWebListItems class in applications.  It is instantiated when the owner control is created.


TcxWebListItems.IndexOfText

TcxWebListItems          See Also

Returns index of the item specified by the value of the Text property.

function IndexOfText(const AText: string): Integer;

Description

Use the IndexOfText method to obtain the index of the item whose Text property contains the same value as that specified by the AText parameter.  If no item was found, the IndexOfText method returns –1.

You should use the IndexOfValue function to retrieve index of the item specified by its Value property.


TcxWebListItems.IndexOfValue

TcxWebListItems          See Also

Returns index of the item specified by the value of the Value property.

function IndexOfValue(const AValue: string): Integer;

Description

Use the IndexOfValue method to obtain the index of the TcxWebListItem whose Value property contains the same value as that specified by the AValue parameter.  If no item was found, the IndexOfValue method returns –1.

You should use the IndexOfText function to retrieve the index of the item specified by its Text property.


TcxWebListItems.TextOfValue

TcxWebListItems          See Also

Returns the text content of the item specified by the value of the Value property.

function TextOfValue(const AValue: string): string;

Description

Use the TextOfValue method to retrieve the Text property value of the specified item.  The item is specified by its Value property via the AValue parameter.


TcxWebFormControl
TcxWebFormControl Object

Hierarchy          Properties          Methods          Events          See Also

Serves as the base class for standard HTML controls.

Unit

cxWebStdCtrls

TcxWebFormControl = class(TcxWebControl, IcxWebTabOrderable)

Description

HTML itself provides a number of simple controls.  The TcxWebFormControl class represents a common ancestor for all the controls that can be represented via HTML directly.  These are the TcxWebCheckBox, TcxWebMemo, TcxWebEdit, TcxWebComboBox, TcxWebListBox, TcxWebRadioGroup controls.  The TcxWebFormControl overrides some properties and methods of the TcxWebControl class, which are common to all of its descendants.


TcxWebFormControl Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl


Properties for TcxWebFormControl
TcxWebFormControl Properties

TcxWebFormControl          Legend

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebFormControl
TcxWebFormControl Methods

TcxWebFormControl          Legend

In TcxWebFormControl

 	RegisterEvents

 	ScriptsSubscription

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

Create

Destroy

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

RegisterRenderers

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterActions

RegisterValues

SetState

ValidateContainer


Events for TcxWebFormControl
TcxWebFormControl Events

TcxWebFormControl          Legend

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebFormControl.RegisterEvents

TcxWebFormControl          See Also

Registers client side events required by descendant controls to function properly.

procedure RegisterEvents; override;

Description

The RegisterEvents method registers the OnBlur and OnFocus client events required by all descendant controls to change appearance when receiving or loosing focus.  Descendant classes override this method to perform registration of additional client events.

The method implements the RegisterEvents of the IcxWebEvents interface.


TcxWebFormControl.ScriptsSubscription

TcxWebFormControl          See Also

Subscribes descendant controls to client side scripts required for their proper functionality.

procedure ScriptsSubscription; override;

Description

The ScriptSubscription method subscribes the descendant controls to the script handling the OnFocus/OnBlur events.

This method implements the ScriptsSubscription method of the IcxWebScripts interface.  It is overridden in descendant classes to subscribe control specific scripts.


TcxCustomWebCheckBox
TcxCustomWebCheckBox Object

Hierarchy          Properties          Methods          Events

Represents the base class for check box controls.

Unit

cxWebStdCtrls

TcxCustomWebCheckBox = class(TcxWebFormControl)

Description

The TcxCustomWebCheckBox class serves as the base class for check box controls.  It implements the common properties and methods for manipulating and rendering a check box.  Available descendants are the TcxWebCheckBox and TcxWebDBCheckBox controls.

The TcxCustomWebCheckBox control is the descendant of the TcxWebFormControl since HTML is capable of displaying check boxes itself.


TcxCustomWebCheckBox Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxWebFormControl


Properties for TcxCustomWebCheckBox
TcxCustomWebCheckBox Properties

TcxCustomWebCheckBox          Legend

In TcxCustomWebCheckBox

Checked

Width

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxCustomWebCheckBox
TcxCustomWebCheckBox Methods

TcxCustomWebCheckBox          Legend

In TcxCustomWebCheckBox

Create

DoClick

DoSetValues

GetMaxHeight

GetMinHeight

GetMinWidth

RegisterActions

RegisterEvents

RegisterRenderers

RegisterValues

ScriptsSubscription

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

Destroy

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

RegisterRenderers

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

SetState

ValidateContainer


Events for TcxCustomWebCheckBox
TcxCustomWebCheckBox Events

TcxCustomWebCheckBox          Legend

In TcxCustomWebCheckBox

OnClick

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxCustomWebCheckBox.Checked

TcxCustomWebCheckBox

Specifies whether the web check box control is checked.

property Checked: Boolean;

Description

Use the Checked property to set or get a value specifying whether a particular custom web check box control is checked.  If this property’s value is True, the control is checked; otherwise it is unchecked.  Set the Checked property to either True or False to check or uncheck the check box respectively.

The default value of the Checked property is False.


TcxCustomWebCheckBox.OnClick

TcxCustomWebCheckBox

Fires when a user clicks the control.

property OnClick: TNotifyEvent;

Description

Write an OnClick event handler to perform specific actions each time the check box is clicked.

Note that the OnClick event handler deals with actual state of the control, i.e. if a user checks a web check box the event handler knows from the form state that the control is already checked.  In other words, the OnClick event handler is always executed after the control changes its state.  The state of the check box is specified by the Checked property.


TcxCustomWebCheckBox.Width

TcxCustomWebCheckBox          See Also

Specifies the width of the web check box control.

property Width;

Description

Use the Width property to specify the width of a web check box control.  This property overrides the Width property of the TcxWebControl class in order to implement a default value.

The default value of the Width property is 150.


TcxCustomWebCheckBox.Create

TcxCustomWebCheckBox

Creates an instance of the TcxCustomWebCheckBox class.

constructor Create(AOwner: TComponent); override;

Description

The Create method initializes a new instance of the TcxCustomWebCheckBox class (and descendants, unless overridden).  The method calls the inherited constructor and initializes properties to their default values.

Do not create instances of the TcxCustomWebCheckBox class.  Use its descendants instead.  These are the TcxWebCheckBox and TcxWebDBCheckBox controls.


TcxCustomWebCheckBox.DoClick

TcxCustomWebCheckBox          See Also

Handles the notification that a check box control was clicked.

procedure DoClick; dynamic;

Description

The DoClick method is called when the check box control is clicked.  It checks whether the OnClick event handler is assigned and runs it if true.

If designing your own descendant control, you can override the DoClick method to perform additional actions when the control is clicked.


TcxCustomWebCheckBox.GetMaxHeight

TcxCustomWebCheckBox          See Also

Returns the maximum possible height of the check box control with respect to applied style.

function GetMaxHeight: Integer; override;

Description

The GetMaxHeight method’s return value is used to establish a maximum height constraint for a web check box control.  This method determines whether the text concerning the current font or the check button area is higher and returns the largest value. The GetMaxHeight returns the same value as the GetMinHeight function.

This method overrides the GetMaxHeight method of the TcxWebControl class.


TcxCustomWebCheckBox.GetMinHeight

TcxCustomWebCheckBox          See Also

Returns the minimum possible height of a check box control with respect to applied style.

function GetMinHeight: Integer; override;

Description

The GetMinHeight method’s return value is used to establish a minimum height constraint for a web check box control.  This method determines whether the text concerning the current font or the check button area is higher and returns the largest value. The GetMinHeight returns the same value as the GetMaxHeight function.

This method overrides the GetMinHeight method of the TcxWebControl class.


TcxCustomWebCheckBox.GetMinWidth

TcxCustomWebCheckBox          See Also

Returns the minimum possible width of a check box control with respect to applied style.

function GetMinWidth: Integer; override;

Description

The GetMinHeight method’s return value is used to establish a minimum width constraint for a web check box control.  This method returns the width of the check button area together with the width of caption text.

This method overrides the GetMinWidth method of the TcxWebControl class.


TcxCustomWebCheckBox.DoSetValues

TcxCustomWebCheckBox          See Also

Updates the check box control with respect to changes made by an end user.

procedure DoSetValues; override;

Description

The request contains information indicating whether the checkbox control is checked.  This information is used to set the value of the Checked property in order to update the control with respect to changes made at the client browser.  This is performed by the DoSetValues method.

This method implements the IcxWebValues interface’s DoSetValues method.


TcxCustomWebCheckBox.RegisterActions

TcxCustomWebCheckBox          See Also

Registers action handlers for the check box control.

procedure RegisterActions; override;

Description

The RegisterActions method registers a single handler for two actions.  These are the actions handling the OnClick event, and the default, which invokes the same handler if data transmission errors occur.

This method overrides the RegisterActions method of the TcxWebComponent class.


TcxCustomWebCheckBox.RegisterEvents

TcxCustomWebCheckBox          See Also

Registers client event handlers for the check box control.

procedure RegisterEvents; override;

Description

The RegisterEvents method registers the client handler for the OnClick event if the OnClick event handler is assigned.  It calls the inherited method as well.

This method implements the RegisterEvents method of the IcxWebEvents interface.


TcxCustomWebCheckBox.RegisterRenderers

TcxCustomWebCheckBox          See Also

Registers renderer classes that generate HTML code representing the check box control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers two specific renderer classes designed to render HTML code for the check box control.  The browser types for which the registered renderers are designed are Internet Explorer and Netscape Navigator 4.0.  The renderer class designed for Internet Explorer is the default.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for a check box control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxCustomWebCheckBox.RegisterValues

TcxCustomWebCheckBox          See Also

Registers the HTML elements, which contain data related to the control.

procedure RegisterValues; override;

Description

The RegisterValues method is used to register HTML elements, which contain data related to the web check box control.  It registers the INPUT tag representing a check box on a web page.  This is needed to determine whether it is checked after end-user manipulations.  The DoSetValues method implements the update of the Checked property.

This method implements the RegisterValues method of the IcxWebValues interface.  It can be overridden in descendant classes to register additional HTML elements whose values are required for proper functionality.


TcxCustomWebCheckBox.ScriptsSubscription

TcxCustomWebCheckBox          See Also

Subscribes the control to client scripts, required for proper functionality.

procedure ScriptsSubscription; override;

Description

The ScriptSubscription method is used to subscribe the web check box control to a post back script.  Note that if the control does not have a handler for the OnClick event, script subscription is skipped.

This method implements the ScriptsSubscription method of the IcxWebScripts interface.  It can be overridden in descendant classes to subscribe a derived control to additional scripts.


TcxCustomWebEdit
TcxCustomWebEdit Object

Hierarchy          Properties          Methods          Events

Serves as the base class for edit box and memo controls.

Unit

cxWebStdCtrls

TcxCustomWebEdit = class(TcxWebFormControl)

Description

The TcxCustomWebEdit class represents the common ancestor of all edit and memo controls.  It introduces common properties and methods for these controls.  Available descendants are the TcxWebEdit, TcxWebDBEdit, TcxWebMemo, TcxWebDBMemo controls.

HTML provides a means by which to represent edit and memo controls.  Thus, the TcxCustomWebEdit class inherits its functionality from the TcxWebFormControl class.


TcxCustomWebEdit Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxWebFormControl


Properties for TcxCustomWebEdit
TcxCustomWebEdit Properties

TcxCustomWebEdit          Legend

In TcxCustomWebEdit

MaxLength

Password

ReadOnly

Size

Text

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxCustomWebEdit
TcxCustomWebEdit Methods

TcxCustomWebEdit          Legend

In TcxCustomWebEdit

CheckNewSize

Create

DoSetValues

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetMaxHeight

GetMinHeight

GetMinWidth

GetText

RegisterRenderers

RegisterValues

SetText

StyleChanged

Derived from TcxWebFormControl

 	RegisterEvents

 	ScriptsSubscription

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

Destroy

GetColor

GetDefaultColor

GetHorzBordersSize

GetMaxWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterActions

SetState

ValidateContainer


Events for TcxCustomWebEdit
TcxCustomWebEdit Events

TcxCustomWebEdit          Legend

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxCustomWebEdit.MaxLength

TcxCustomWebEdit          See Also

Specifies the maximum possible length of a control’s text.

property MaxLength: Integer;

Description

Use the MaxLength property to control the maximum number of characters a user can enter into a web edit (memo) control.  If the value of the property is set to –1, a user can enter an unlimited number of characters.

The default value of the MaxLength property is -1.


TcxCustomWebEdit.Password

TcxCustomWebEdit

Specifies whether a control’s content represents a password string.

property Password: Boolean;

Description

Use the Password property to specify whether the content of the web edit control represents a password string.  If set to True the edit control shows an asterisk (*) sign instead of entered characters.

The default value of the Password property is False.


TcxCustomWebEdit.ReadOnly

TcxCustomWebEdit

Specifies whether a user can edit the contents of a control.

property ReadOnly: Boolean;

Description

Use the ReadOnly property to determine whether a user can edit the control’s content.  Set this property to True to prohibit visual editing of a control’s content.

Note that this property affects the visual editing of a control’s contents only.  The text displayed by the control can be changed via code even when the ReadOnly property is True.

The default value of the ReadOnly property is False.


TcxCustomWebEdit.Size

TcxCustomWebEdit

Specifies the width of the control in characters.

property Size: Integer;

Description

Use the Size property to specify the number of characters visible within a line.  This property corresponds to the SIZE attribute of the INPUT HTML tag.

Note that when setting the value of the Width property, it is adjusted to accommodate the nearest integer number of characters.

The default value of the Size property is 20.


TcxCustomWebEdit.Text

TcxCustomWebEdit

Specifies the text content of the web edit control.

property Text: string;

Description

Use the Text property to specify the text displayed by the control.  Note that the Text property has special significance for the TcxWebMemo and TcxWebDBMemo controls.  It specifies the single-line representation of the displayed text, specified by the Lines property.

By default, the value of the Text property coincides with the name of the control.


TcxCustomWebEdit.CheckNewSize

TcxCustomWebEdit          See Also

Responds to resizing of the control.

procedure CheckNewSize(var ALeft, ATop, ANewWidth, ANewHeight: Integer); override;

Description

The CheckNewSize method is used to perform specific actions each time the size of the control changes. The ATop and ALeft parameters specify the current location of the control on a form.  The ANewWidth and the ANewHeight parameters specify the newly assigned width and height of the control.  The CheckNewSize method recalculates width of the control so that it contains an integer number of characters in a line.

The method overrides the CheckNewSize of the TcxWebControl class which is called whenever dimensions of a web control change.  After the CheckNewSize performs its actions, it calls the inherited method.


TcxCustomWebEdit.Create

TcxCustomWebEdit

Creates an instance of the TcxCustomWebEdit class.

constructor Create(AOwner: TComponent); override;

Description

The Create method is used to initialize a new TcxCustomWebEdit object.  The AOwner parameter specifies the owner of the newly created object.  The Create method calls the inherited constructor and sets properties to their default values.

Do not instantiate the TcxCustomWebEdit class in applications.  Create one of its descendants instead.  Available descendants are the TcxWebEdit, TcxWebDBEdit, TcxWebMemo and TcxWebDBMemo controls.


TcxCustomWebEdit.GetDefaultHorzBordersSize

TcxCustomWebEdit          See Also

Returns the default integral width of horizontal borders.

function GetDefaultHorzBordersSize: Integer; override;

Description

The GetDefaultHorzBordersSize method is used to determine the integral width of horizontal borders.  This method’s return value is used only when no style is applied to the control.  Otherwise, the width of borders is calculated using the information about the applied style.

This method overrides the GetDefaultHorzBordersSize method of the TcxWebControl class.  As implemented in the TcxCustomWebEdit class, it returns 4 (since the default width of a single border is 2).


TcxCustomWebEdit.GetDefaultVertBordersSize

TcxCustomWebEdit          See Also

Returns the default integral width of the vertical borders.

function GetDefaultVertBordersSize: Integer; override;

Description

The GetDefaultVertBordersSize method is used to determine the integral width of vertical borders.  This method’s return value is used only when no style is applied to the control.  Otherwise, the width of borders is calculated using the information about the applied style.

This method overrides the GetDefaultVertBordersSize method of the TcxWebControl class.  As implemented in the TcxCustomWebEdit class, it returns 4 (since the default width of a single border is 2).


TcxCustomWebEdit.GetMaxHeight

TcxCustomWebEdit          See Also

Returns the maximum possible height of the control with respect to applied font.

function GetMaxHeight: Integer; override;

Description

The GetMaxHeight method’s return value is used to establish a maximum height constraint for a web edit control.  This method returns the sum of text height, with respect to the font applied, and the integral width of horizontal borders.  The GetMinHeight method returns the same value.

The method overrides the GetMaxHeight method of the TcxWebControl class.  It is overridden by the TcxCustomWebMemo class to provide multi-line support.


TcxCustomWebEdit.GetMinHeight

TcxCustomWebEdit          See Also

Returns the minimum possible height of the control with respect to applied font.

function GetMinHeight: Integer; override;

Description

The GetMinHeight method’s return value is used to establish a minimum height constraint for a web edit control.  This method returns the sum of text height, with respect to the font applied, and the integral width of horizontal borders.  The GetMaxHeight method returns the same value.

The method overrides the GetMinHeight method of the TcxWebControl class.  It is overridden by the TcxCustomWebMemo class to provide multi-line support.


TcxCustomWebEdit.GetMinWidth

TcxCustomWebEdit          See Also

Returns the minimum possible width of a web label control with respect to applied font.

function GetMinWidth: Integer; override;

Description

The GetMinWidth method’s return value is used to establish a minimum width constraint for a web edit control.  As implemented in the TcxCustomWebEdit class, it returns the width of a single character with respect to the applied font.

The method overrides the GetMinWidth method of the TcxWebControl class.


TcxCustomWebEdit.GetText

TcxCustomWebEdit          See Also

Returns the value of the Text property.

function GetText: string; virtual;

Description

The GetText method is used to obtain the Text property value.  This method is overridden in the TcxCustomWebMemo in order to provide multi-line support.


TcxCustomWebEdit.DoSetValues

TcxCustomWebEdit          See Also

Updates the control with respect to changes made by an end user.

procedure DoSetValues; override;

Description

The request contains information about the current content of the control.  This information is used to set the value of the Text property in order to update the control with respect to changes made at the client browser.  This is performed by the DoSetValues method.

This method implements the IcxWebValues interface’s DoSetValues method.


TcxCustomWebEdit.RegisterRenderers

TcxCustomWebEdit          See Also

Registers renderer classes that generate HTML code representing the control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers a specific renderer class designed to render HTML code for the control.  The browser type for which the registered renderer is designed is Internet Explorer.  The registered browser is used to render the code for all browsers (it is registered as the default).

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for a control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxCustomWebEdit.RegisterValues

TcxCustomWebEdit          See Also

Registers HTML elements, which contain data related to a component.

procedure RegisterValues; override;

Description

The RegisterValues method is used to register HTML elements, which contain data related to the control.  It registers the INPUT tag representing the control on a web page.  This is needed to determine the contents of the control after end-user manipulations.  The DoSetValues method implements the update of the Text property.

This method implements the RegisterValues method of the IcxWebValues interface.  It can be overridden in descendant classes to register additional HTML elements, whose values are required for proper functionality.


TcxCustomWebEdit.SetText

TcxCustomWebEdit          See Also

Sets the value of the Text property.

procedure SetText(const Value: string); virtual;

Description

The SetText method is used to set the Text property value.  This method is overridden in TcxCustomWebMemo in order to provide multi-line support.


TcxCustomWebEdit.StyleChanged

TcxCustomWebEdit          See Also

Responds to style changes.

procedure StyleChanged(Style: TcxWebStyleItem); override;

Description

The StyleChanged method is designed to respond to style changes.  The method overrides the StyleChanged method of the TcxWebControl class.  As implemented in the TcxCustomWebEdit class, the StyleChanged method adjusts the size of the control with respect to the newly applied style.


TcxCustomWebMemo
TcxCustomWebMemo Object

Hierarchy          Properties          Methods          Events

Represents the base class for memo controls.

Unit

cxWebStdCtrls

TcxCustomWebMemo = class(TcxCustomWebEdit)

Description

The TcxCustomWebEdit class represents the common ancestor of memo controls.  It introduces common properties and methods for these controls.  They are designed to support multi-line text display and editing.  Available descendants are the TcxWebMemo, TcxWebDBMemo controls.

HTML provides a means by which to represent memo controls.  Thus the TcxCustomWebEdit class inherits its functionality from the TcxCustomWebEdit class, which is a TcxWebFormControl descendant.


TcxCustomWebMemo Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxWebFormControl

     |

TcxCustomWebEdit


Properties for TcxCustomWebMemo
TcxCustomWebMemo Properties

TcxCustomWebMemo          Legend

In TcxCustomWebMemo

Cols

Lines

Rows

WordWrap

Derived from TcxCustomWebEdit

MaxLength

Password

ReadOnly

Size

Text

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxCustomWebMemo
TcxCustomWebMemo Methods

TcxCustomWebMemo          Legend

In TcxCustomWebMemo

CheckNewSize

Create

Destroy

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetText

RegisterRenderers

SetText

Derived from TcxCustomWebEdit

DoSetValues

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

RegisterValues

StyleChanged

Derived from TcxWebFormControl

 	RegisterEvents

 	ScriptsSubscription

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

GetColor

GetDefaultColor

GetHorzBordersSize

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterActions

SetState

ValidateContainer


Events for TcxCustomWebMemo
TcxCustomWebMemo Events

TcxCustomWebMemo          Legend

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxCustomWebMemo.Cols

TcxCustomWebMemo          See Also

Specifies the number of columns within a memo control.

property Cols: Integer;

Description

Use the Cols property to specify the width of the memo control in characters.  Setting this property affects the Width property value, and vice versa.  The Width property is automatically adjusted to correspond to the nearest number of columns.

The minimum possible value for the Cols property is 1.


TcxCustomWebMemo.Lines

TcxCustomWebMemo          See Also

Specifies the contents of the control in multi-line format.

property Lines: TStrings;

Description

Use the Lines property to manipulate text in the memo control on a line-by-line basis. This property value is a TStrings object, so the methods of the TStrings class may be used for the Lines property value to perform manipulations such as counting the lines of text, adding new lines, deleting lines, or replacing lines with new text.

Note that if the WordWrap property is set to True, each line of text within the Lines property can occupy several lines visually.  Thus, if the width of the memo control is less than the widest string, the contents representation in the Lines property doesn’t correspond to visual content representation.

Use the Text property to manipulate a single-line representation of the memo control’s contents.


TcxCustomWebMemo.Rows

TcxCustomWebMemo          See Also

Specifies the number of text lines displayed by the memo control simultaneously.

property Rows: Integer;

Description

Use the Rows property to specify the height of the memo control in text lines.  Setting this property affects the Height property value, and vice versa.  The Height property is automatically adjusted to correspond to the nearest number of text lines.

The minimum possible value for the Rows property is 1.


TcxCustomWebMemo.WordWrap

TcxCustomWebMemo          See Also

Specifies whether the memo control should word-wrap its text content.

property WordWrap: Boolean;

Description

Use the WordWrap property to determine whether the memo control wraps its text if it is wider than the control’s width.  The wrapping is cosmetic only - the text does not include any return characters that were not explicitly entered.  Set WordWrap to False to have the memo control show a separate line only where return characters were explicitly entered into the text.

If the WordWrap property is set to True, the control wraps its text so that text content fits the control’s width.  In such a case, the Lines property value doesn’t necessarily correspond to the visual representation of the memo control’s contents.

The default value for the WordWrap property is True.


TcxCustomWebMemo.CheckNewSize

TcxCustomWebMemo          See Also

Responds to resizing of the control.

procedure CheckNewSize(var ALeft, ATop, ANewWidth, ANewHeight: Integer); override;

Description

The CheckNewSize method is used to perform specific actions each time the size of the control changes.

The ATop and ALeft parameters specify the current location of the control on a form.  The ANewWidth and the ANewHeight parameters specify newly assigned width and height for the control.  The CheckNewSize method recalculates width and height of the control so that it contains the number of characters in a line and the number of text lines.

This method overrides the CheckNewSize of the TcxWebControl class which is called whenever dimensions of a web control change.  After the CheckNewSize performs its actions, it calls the inherited method.


TcxCustomWebMemo.Create

TcxCustomWebMemo

Creates a new instance of the TcxCustomWebMemo class.

constructor Create(AOwner: TComponent); override;

Description

The Create method is used to initialize a new TcxCustomWebMemo object.  The AOwner parameter specifies the owner of the created object.  After calling the inherited constructor, this method sets the properties to their default values and initializes the Lines property.

Do not create instances of the TcxCustomWebMemo class in applications.  Instantiate one of its descendants instead.  Available descendants are the TcxWebMemo and TcxWebDBMemo controls.


TcxCustomWebMemo.Destroy

TcxCustomWebMemo

Destroys the TcxCustomWebMemo object.

destructor Destroy; override;

Description

The destroy method is used to dispose of the TcxCustomWebMemo object and free any allocated memory.  It frees the Lines property before calling the inherited destructor.


TcxCustomWebMemo.GetMaxHeight

TcxCustomWebMemo          See Also

Returns the maximum possible height of the memo control.

function GetMaxHeight: Integer; override;

Description

The GetMaxHeight method’s return value is used to establish a maximum height constraint for the memo control.  As implemented in the TcxCustomWebMemo class, this method returns 0.  Thus it overrides the inherited method to remove the maximum height constraint.

This method overrides the GetMaxHeight of the TcxWebControl class.


TcxCustomWebMemo.GetMaxWidth

TcxCustomWebMemo          See Also

Returns the maximum possible width of the memo control.

function GetMaxWidth: Integer; override;

Description

The GetMaxHeight method’s return value is used to establish a maximum width constraint for the memo control.  As implemented in the TcxCustomWebMemo class, this method returns 0.  Thus, it overrides the inherited method to remove the maximum width constraint.

This method overrides the GetMaxWidth of the TcxWebControl class.


TcxCustomWebMemo.GetMinHeight

TcxCustomWebMemo          See Also

Returns the minimum possible height of the memo control.

function GetMinHeight: Integer; override;

Description

The GetMinHeight method’s return value is used to establish a minimum height constraint for the memo control.  This method returns the sum of text line height and the width of horizontal borders.  Thus, the memo control cannot be resized less than a line of text.

This method overrides the GetMinHeight function of the TcxWebControl class.


TcxCustomWebMemo.GetMinWidth

TcxCustomWebMemo          See Also

Returns the minimum possible width of the memo control.

function GetMinWidth: Integer; override;

Description

The GetMinWidth method’s return value is used to establish a minimum width constraint for the memo control.  This method returns the sum of average character width and the width of vertical borders.  Thus, the memo control cannot be resized less than a single character in width.

This method overrides the GetMinWidth of the TcxWebControl class.


TcxCustomWebMemo.GetText

TcxCustomWebMemo          See Also

Returns the value of the Text property.

function GetText: string; override;

Description

The GetText method is used to obtain the value of the Text property.  It converts the contents of the Lines property to a single-line representation.


TcxCustomWebMemo.RegisterRenderers

TcxCustomWebMemo          See Also

Registers renderer classes that generate HTML code representing the memo control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers a specific renderer class designed to render HTML code for the memo control.  The browser type for which the registered renderer is designed is Internet Explorer.  The registered browser is used to render the code for all browsers (it is registered as the default).

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for a memo control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxCustomWebMemo.SetText

TcxCustomWebMemo          See Also

Sets the value of the Text property.

procedure SetText(const Value: string); override;

Description

The SetText method is used to assign a single-line representation of the memo control’s contents.  The Value parameter specifies the assigned text.  Setting the Text property value affects the Lines property.  A multi-line caption can be set only by using the #13#10 character sequence as the carriage return symbol.


TcxWebCheckBox
 TcxWebCheckBox Object

Hierarchy          Properties          Methods          Events

Represents a web check box control.

Unit

cxWebStdCtrls

TcxWebCheckBox = class(TcxCustomWebCheckBox)

Description

Use the TcxWebCheckBox control to place a web check box on a web page.  This control can be either in a checked or unchecked state.  It is most commonly used to edit Boolean values.

You should use the TcxWebDBCheckBox control in order to edit values of a dataset field using the check box control.

The functionality of the TcxWebCheckBox control is fully implemented by the TcxCustomWebCheckBox class, its ancestor.  The TcxWebCheckBox class simply publishes the Checked property.


TcxWebCheckBox Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxWebFormControl

     |

TcxCustomWebCheckBox


Properties for TcxWebCheckBox
TcxWebCheckBox Properties

TcxWebCheckBox          Legend

Derived from TcxCustomWebCheckBox

Checked

Width

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebCheckBox
TcxWebCheckBox Methods

TcxWebCheckBox          Legend

In the TcxWebCheckBox

RegisterRenderers

Derived from TcxCustomWebCheckBox

Create

DoClick

DoSetValues

GetMaxHeight

GetMinHeight

GetMinWidth

RegisterActions

RegisterEvents

RegisterValues

ScriptsSubscription

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

Destroy

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

RegisterRenderers

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

SetState

ValidateContainer


Events for TcxWebCheckBox
TcxWebCheckBox Events

TcxCustomWebCheckBox          Legend

Derived from TcxCustomWebCheckBox

OnClick

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebCheckBox.RegisterRenderers

TcxWebCheckBox          See Also

Registers renderer classes that generate HTML code representing the check box control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers two specific renderer classes designed to render HTML code for the check box control.  The browser types for which the registered renderers are designed are Internet Explorer and Netscape Navigator 4.0.  The renderer class designed for Internet Explorer is the default.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for a check box control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxWebEdit
 TcxWebEdit Object

Hierarchy          Properties          Methods          Events

Represents a web edit control.

Unit

cxWebStdCtrls

TcxWebEdit = class(TcxCustomWebEdit)

Description

Use the TcxWebEdit control to add a standard edit box to a web page.  This control allows an end user to edit the text it displays.  The TcxWebEdit control always displays a single line of text.  You should use the TcxWebMemo control in order to display and edit multi-line text.

The functionality of the TcxWebEdit control is fully implemented by the TcxCustomWebEdit class, its ancestor.  The TcxWebEdit class simply publishes certain properties.


TcxWebEdit Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxWebFormControl

     |

TcxCustomWebEdit


Properties for TcxWebEdit
TcxWebEdit Properties

TcxWebEdit          Legend

Derived from TcxCustomWebEdit

MaxLength

Password

ReadOnly

Size

Text

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebEdit
TcxWebEdit Methods

TcxWebEdit          Legend

In TcxWebEdit

RegisterRenderers

Derived from TcxCustomWebEdit

CheckNewSize

Create

DoSetValues

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetMaxHeight

GetMinHeight

GetMinWidth

GetText

RegisterValues

SetText

StyleChanged

Derived from TcxWebFormControl

 	RegisterEvents

 	ScriptsSubscription

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

Destroy

GetColor

GetDefaultColor

GetHorzBordersSize

GetMaxWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterActions

SetState

ValidateContainer


Events for TcxWebEdit
TcxWebEdit Events

TcxWebEdit          Legend

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebEdit.RegisterRenderers

TcxWebEdit          See Also

Registers renderer classes that generate HTML code representing the edit control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers a specific renderer class designed to render HTML code for the edit control.  The browser type for which the registered renderer is designed is Internet Explorer.  The registered browser is used to render the code for all browsers (it is registered as the default).

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for an edit control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxWebMemo
 TcxWebMemo Object

Hierarchy          Properties          Methods          Events

Represents a web memo control.

Unit

cxWebStdCtrls

TcxWebMemo = class(TcxCustomWebMemo)

Description

Use the TcxWebMemo control to place a memo control on a web page.  This control represents a multi-line edit box, whose contents can be edited by an end user.  This control can be used to edit lengthy information.  You should use the TcxWebEdit control in order to edit single-line text values.

The functionality of the TcxWebMemo control is fully implemented by the TcxCustomWebMemo class, its ancestor.  The TcxWebMemo class simply publishes certain properties.


TcxWebMemo Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxWebFormControl

     |

TcxCustomWebEdit

     |

TcxCustomWebMemo


Properties for TcxWebMemo
TcxWebMemo Properties

TcxWebMemo          Legend

Derived from TcxCustomWebMemo

Cols

Lines

Rows

WordWrap

Derived from TcxCustomWebEdit

MaxLength

Password

ReadOnly

Size

Text

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebMemo
TcxWebMemo Methods

TcxWebMemo          Legend

In TcxWebMemo

RegisterRenderers

Derived from TcxCustomWebMemo

CheckNewSize

Create

Destroy

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetText

SetText

Derived from TcxCustomWebEdit

DoSetValues

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

RegisterValues

StyleChanged

Derived from TcxWebFormControl

 	RegisterEvents

 	ScriptsSubscription

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

GetColor

GetDefaultColor

GetHorzBordersSize

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterActions

SetState

ValidateContainer


Events for TcxWebMemo
TcxWebMemo Events

TcxCustomWebMemo          Legend

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebMemo.RegisterRenderers

TcxWebMemo          See Also

Registers renderer classes that generate HTML code representing the memo control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers a specific renderer class designed to render HTML code for the memo control.  The browser type for which the registered renderer is designed is Internet Explorer.  The registered browser is used to render the code for all browsers (it is registered as the default).

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for a memo control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxCustomWebImage
TcxCustomWebImage Object

Hierarchy          Properties          Methods          Events

Represents the base class for controls displaying images.

Unit

cxWebStdCtrls

TcxCustomWebImage = class(TcxWebControl)

Description

The TcxCustomWebImage class is the base class for controls that display an image.  In particular, it is the ancestor of the TcxWebImage control.

The TcxCustomWebImage class introduces several properties to specify how the image is displayed within the boundaries of the control.  They also help to control the position of the image relatively to the surrounding elements.  If the path to the image is specified incorrectly (or another error caused an image loading fault) the AltText property provides you a way to add the necessary explanatory text.


TcxCustomWebImage Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl


Properties for TcxCustomWebImage
TcxCustomWebImage Properties

TcxCustomWebImage          Legend

In TcxCustomWebImage

AltText

DesignPicturePath

DisplayStyle

HorzSpace

PictureURL

VertSpace

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxCustomWebImage
TcxCustomWebImage Methods

TcxCustomWebImage          Legend

In TcxCustomWebImage

Create

RegisterRenderers

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

Create

Destroy

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

ScriptsSubscription

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterActions

RegisterEvents

RegisterValues

SetState

ValidateContainer


Events for TcxCustomWebImage
TcxCustomWebImage Events

TcxCustomWebImage          Legend

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxCustomWebImage.AltText

TcxCustomWebImage          See Also

Specifies alternate text to display if a specified image is either being loaded or is not available.

property AltText: string;

Description

Use the AltText property to specify the text displayed within the control’s image area.  The specified text is displayed only if the image specified by the PictureURL is not available or is being loaded.  If the Hint property is not set, the specified text is used as a hint also.

You can also add hints to your web image controls via the Hint property to display additional information when a user points to the web image control and holds the mouse over it momentarily.  To specify whether a hint is shown, you should use the ShowHint property.


TcxCustomWebImage.DisplayStyle

TcxCustomWebImage          See Also

Specifies how the image is displayed within the boundaries of the TcxWebImage control.

type

  TcxWebDisplayStyle = (wdsAutoSize, wdsProportional, wdsStretch);

property DisplayStyle: TcxWebDisplayStyle;

Description

Use the TcxWebDisplayStyle property to specify whether the image, specified via the PictureURL property, should be stretched.  The image can either be stretched proportionally (saving its height to width relationship) or stretched to fill the entire control area.  The manner in which the specified image is stretched can be specified using the following values:

Value	Description
wdsAutoSize	Image is displayed in its original size.
wdsProportional	Image is proportionally sized to occupy the maximum possible area, i.e. image width depends on its height.
wdsStretch	Image is stretched to occupy the entire area of the control.

The default value of the DisplayStyle property is wdsAutoSize.


TcxCustomWebImage.HorzSpace

TcxCustomWebImage          See Also

Defines the horizontal space to the left and to the right of the image.

property HorzSpace: Integer;

Description

Use the HorzSpace property to determine horizontal spacing of the web image.  The property defines the minimum possible distance between the image and its vertical borders. Use the VertSpace property to specify the vertical spacing for the web image control.

The default value of the HorzSpace property is 0.


TcxCustomWebImage.DesignPicturePath

TcxCustomWebImage          See Also

Specifies the address used to display the picture within the web image control at design-time.

property DesignPicturePath: string;

Description

The DesignPicturePath property provides you with the ability to supply the path of an image to be displayed within the web image control at design-time.

The DesignPicturePath property is used for design-time purposes only.  Its setting does not affect the runtime availability of the picture.  In order to specify the picture URL that will be used at runtime, set the PictureURL property.

Note: Neither path (DesignPicturePath or that supplied to PictureURL) has any effect when running via the Web App Debugger.  Set the actual image path(s) used via WAD Options.


TcxCustomWebImage.PictureURL

TcxCustomWebImage          See Also

Specifies the URL of the picture to display within the web image control at runtime.

property PictureURL: string;

Description

Use the PictureURL property to specify the URL address of the picture that will be displayed in the web image control at runtime.  If the URL specified is invalid, the content of AltText is shown instead of the image.

The PictureURL property specifies the value of the SRC attribute of the IMG tag, representing the image control.

In order to display the picture in the web image control at design-time, set the DesignPicturePath property.


TcxCustomWebImage.VertSpace

TcxCustomWebImage          See Also

Defines the vertical space to the top and bottom of the image.

property VertSpace: Integer;

Description

Use the VertSpace property to determine horizontal spacing of the web image.  The property defines a minimum possible distance between the image and its horizontal borders. Use the HorzSpace property to specify the horizontal spacing for the web image control.

The default value of the VertSpace property is 0.


TcxCustomWebImage.Create

TcxCustomWebImage

Creates a new instance of the TcxCustomWebImage class (or descendant, unless overridden).

constructor Create(AOwner: TComponent); override;

Description

Use the Create method to initialize a new instance of the web image control.  The AOwner parameter specifies the owner of the newly created web image.  This method sets the properties of the TcxCustomWebImage class to their default values after calling the inherited constructor.

Note that in order to create an instance of a web image control you should use the constructor of the TcxWebImage class.


TcxCustomWebImage.RegisterRenderers

TcxCustomWebImage          See Also

Registers renderer classes that generate HTML code representing the image control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers a single renderer class designed to render HTML code for the image control.  The browser type for which the registered renderer is designed is \ Internet Explorer.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for an image control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxWebImage
 TcxWebImage Object

Hierarchy          Properties          Methods          Events

Represents a web image control.

Unit

cxWebStdCtrls

TcxWebImage = class(TcxCustomWebImage)

Description

Use the TcxWebImage control to display an image on a web page.  This control is the descendant of the TcxCustomWebImage class.

The TcxCustomWebImage class introduces several properties to specify how the image is displayed within the boundaries of the control.  They also help to control the position of the image relative to the surrounding elements.  If the path to the image is specified incorrectly (or another error causes an image loading fault) AltText provides you a way in which to add explanatory text for the user.  The TcxWebImage control simply changes the visibility of some properties.

To add an image to the form so that it is available to be displayed by other controls, you should use the TcxWebImageList component.


TcxWebImage Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxCustomWebImage


Properties for TcxWebImage
TcxWebImage Properties

TcxWebImage          Legend

Derived from TcxCustomWebImage

AltText

DesignPicturePath

DisplayStyle

HorzSpace

PictureURL

VertSpace

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebImage
TcxWebImage Methods

TcxWebImage          Legend

In TcxWebImage

RegisterRenderers

Derived from TcxCustomWebImage

Create

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

Create

Destroy

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

ScriptsSubscription

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterActions

RegisterEvents

RegisterValues

SetState

ValidateContainer


Events for TcxWebImage
TcxWebImage Events

TcxWebImage          Legend

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebImage.RegisterRenderers

TcxWebImage          See Also

Registers renderer classes that generate HTML code representing the image control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers a single renderer class designed to render HTML code for the image control.  The browser type for which the registered renderer is designed is Internet Explorer.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for an image control. This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxCustomWebLabel
TcxCustomWebLabel Object

Hierarchy          Properties          Methods          Events

Represents the base class for label controls.

Unit

cxWebStdCtrls

TcxCustomWebLabel = class(TcxWebControl)

Description

The TcxCustomWebLabel class represents the base for controls displaying static text on a web page.  This class introduces several properties that control the appearance and layout of the text. The descendant of the TcxCustomWebLabel class is the TcxWebLabel control, which is the base for the TcxWebURLLabel control.

Do not create instances of the TcxCustomWebLabel class.  Use the TcxWebLabel or TcxWebURLLabel control to place static text on a web page.


TcxCustomWebLabel Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl


Properties for TcxCustomWebLabel
TcxCustomWebLabel Properties

TcxCustomWebLabel          Legend

In TcxCustomWebLabel

Alignment

AutoSize

Text

WordWrap

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxCustomWebLabel
TcxCustomWebLabel Methods

TcxCustomWebLabel          Legend

In TcxCustomWebLabel

Create

Destroy

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

RegisterRenderers

SetBounds

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

ScriptsSubscription

SetAttribute

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterActions

RegisterEvents

RegisterValues

SetState

ValidateContainer


Events for TcxCustomWebLabel
TcxCustomWebLabel Events

TcxCustomWebLabel          Legend

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxCustomWebLabel.Alignment

TcxCustomWebLabel          See Also

Controls the horizontal alignment of text within the label.

type

  TcxWebHorzAlignment = (whalLeft, whalCenter, whalRight, whalJustify, whalChar);

property Alignment: TcxWebHorzAlignment;

Description

Use the Alignment property to specify the horizontal placement of text within the label.  The following values can be used to set the value for this property:

Value	Description
whalLeft	Text is left-aligned within the label.
whalCenter	Text is centered within the control.
whalRight	Text is right-aligned within the control.
whalJustify	Text is justified within the label.
whalChar	Text is aligned around a specific character.

The default value of the Alignment property is whalLeft.


TcxCustomWebLabel.AutoSize

TcxCustomWebLabel          See Also

Specifies whether the size of the label is automatically changed to accommodate the text.

property AutoSize: Boolean;

Description

Use the AutoSize property to make the label adjust its size automatically so the client area accommodates the height and width of the text. When this property is set to False, the label is fixed in size. When the AutoSize property is True, the size of the label readjusts whenever the text changes. The size of the label also readjusts when the Font property changes.

When the WordWrap property is set to True, the width of the label is fixed. If the AutoSize property is also True, changes to the text cause the label to change in height. When the AutoSize property is True and the WordWrap property is False, the font determines the height of the label, and changes to text cause the label to change in width.

The default value of the AutoSize property is True.


TcxCustomWebLabel.Text

TcxCustomWebLabel

Stores a multi-line representation of the displayed text.

property Text: TStrings;

Description

Use the Text property to retrieve a multi-line representation of the text displayed by a web label.  This makes sense only if the displayed text is word-wrapped.  Otherwise the Text property contains a single line of text coinciding with the Caption property value.

The text displayed within a web label is specified via the Caption property.  Use the WordWrap property to enable or prohibit word wrapping.


TcxCustomWebLabel.WordWrap

TcxCustomWebLabel          See Also

Specifies whether label text wraps when it is too long for the width of the label.

property WordWrap: Boolean;

Description

Set the WordWrap property to True to allow the web label control to display multiple lines of text. When this property is True, text that is too wide for the label control wraps at the right margin and continues across additional lines.

Set the WordWrap property to False to limit a web label control to a single line. When this property is False, text that is too wide for the label appears truncated.


TcxCustomWebLabel.Create

TcxCustomWebLabel          See Also

Creates a new instance of the TcxCustomWebLabel class.

constructor Create(AOwner: TComponent); override;

Description

Use the Create method to initialize a new instance of the web label control.  The AOwner parameter specifies the owner of the newly created web image.  This method sets the properties of the TcxCustomWebLabel class to their default values after calling the inherited constructor.

Note that in order to create an instance of a web label or URL label control, you should use constructor of the TcxWebLabel or TcxWebURLLabel class respectively.


TcxCustomWebLabel.Destroy

TcxCustomWebLabel          See Also

Destroys the TcxCustomWebLabel object.

destructor Destroy; override;

Description

The Destroy method is used to dispose of the TcxCustomWebLabel object and free any allocated resources.  It frees the Text property before calling the inherited destructor.

You should avoid using the Destroy method.  Use the Free method instead to safely dispose of all the resources allocated.


TcxCustomWebLabel.GetMaxHeight

TcxCustomWebLabel          See Also

Returns the maximum possible height of a web label control with respect to applied font.

function GetMaxHeight: Integer; override;

Description

The GetMaxHeight method’s return value is used to establish a maximum height constraint for a web label control.  If the AutoSize property is set to True, this method returns text height multiplied by the number of lines of text displayed by the control; otherwise it simply calls the inherited method.  Text height depends on the current style of the text.

The method overrides the GetMaxHeight method of the TcxWebControl class.


TcxCustomWebLabel.GetMaxWidth

TcxCustomWebLabel          See Also

Returns the maximum possible width of a web label control with respect to applied font.

function GetMaxWidth: Integer; override;

Description

The GetMaxWidth method’s return value is used to establish a maximum width constraint for a web label control.  If the AutoSize property is set to True, this method returns the width of the widest line of text displayed by the control; otherwise it just simply the inherited method.  Text width depends on the current style of the text.

The method overrides the GetMaxWidth method of the TcxWebControl class.


TcxCustomWebLabel.GetMinHeight

TcxCustomWebLabel          See Also

Returns the minimum possible height of a web label control with respect to applied font.

function GetMinHeight: Integer; override;

Description

The GetMinHeight method’s return value is used to establish a minimum height constraint for a web label control.  If the AutoSize property is set to True, this method returns text height multiplied by the number of lines of text displayed by the control; otherwise it simply calls the inherited method.  Text height depends on the current style of the text.

The method overrides the GetMinHeight method of the TcxWebControl class.


TcxCustomWebLabel.GetMinWidth

TcxCustomWebLabel          See Also

Returns the minimum possible width of a web label control with respect to applied font.

function GetMinWidth: Integer; override;

Description

The GetMinWidth method’s return value is used to establish a minimum width constraint for a web label control.  If the AutoSize property is set to True, this method returns the width of the widest line of text displayed by the control; otherwise it simply calls the inherited method.  Text width depends on the current style of the text.

The method overrides the GetMinWidth method of the TcxWebControl class.


TcxCustomWebLabel.RegisterRenderers

TcxCustomWebLabel          See Also

Registers renderer classes that generate HTML code representing a web label control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers two specific renderer classes designed to render HTML code for a web label control.  The browser types for which the registered renderers are designed are Internet Explorer and Netscape Navigator 4.0.  The renderer class designed for Internet Explorer is the default.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for a web label control. This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxCustomWebLabel.SetBounds

TcxCustomWebLabel          See Also

Responds to resizing of a web label control.

procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;

Description

The SetBounds method is designed to respond to resizing of a web label control.  The ALeft, ATop, AWidth and the AHeight parameters determine the left and top coordinates of the control and its width and height respectively.  This method rearranges text, if the WordWrap property is set to True.


TcxWebLabel
 TcxWebLabel Object

Hierarchy          Properties          Methods          Events

Represents a web label control.

Unit

cxWebStdCtrls

TcxWebLabel = class(TcxCustomWebLabel)

Description

Use properties and methods of the TcxWebLabel class to create, customize and manage a web label. The TcxWebLabel control allows you to display static text on a web page.  You can specify the look & feel of a web label control via several properties affecting its dimensions, word wrap, alignment, style and position.

The TcxWebLabel control inherits most of its functionality from the TcxCustomWebLabel class.  It serves as the base class for the TcxWebURLLabel.


TcxWebLabel Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxCustomWebLabel


Properties for TcxWebLabel
TcxWebLabel Properties

TcxWebLabel          Legend

Derived from TcxCustomWebLabel

Alignment

AutoSize

Text

WordWrap

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebLabel
TcxWebLabel Methods

TcxWebLabel          Legend

In TcxWebLabel

RegisterRenderers

Derived from TcxCustomWebLabel

Create

Destroy

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

SetBounds

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

ScriptsSubscription

SetAttribute

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterActions

RegisterEvents

RegisterValues

SetState

ValidateContainer


Events for TcxWebLabel
TcxWebLabel Events

TcxWebLabel          Legend

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebLabel.RegisterRenderers

TcxWebLabel          See Also

Registers renderer classes that generate HTML code representing the web label control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers two specific renderer classes designed to render HTML code for the web label control.  The browser types for which the registered renderers are designed are Internet Explorer and Netscape Navigator 4.0.  The renderer class designed for Internet Explorer is the default.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for a web label control. This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxWebURLLabel
 TcxWebURLLabel Object

Hierarchy          Properties          Methods          Events

Represents a web label component, which displays a URL string.

Unit

cxWebStdCtrls

TcxWebURLLabel = class(TcxWebLabel, IcxWebTabOrderable)

Description

Use the TcxWebURLLabel control to place a URL label on a web page.  This control has the same features as its ancestor - the TcxWebLabel control.  The only element introduced in the TcxWenURLLabel control is a URL property, which specifies the action performed when the label is clicked.  Most commonly the URL property is used to specify an address of a web page.


TcxWebURLLabel Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxCustomWebLabel

     |

TcxWebLabel


Properties for TcxWebURLLabel
TcxWebURLLabel Properties

TcxWebURLLabel          Legend

In TcxWebURLLabel

URL

Derived from TcxCustomWebLabel

Alignment

AutoSize

Text

WordWrap

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebURLLabel
TcxWebURLLabel Methods

TcxWebURLLabel          Legend

In TcxWebURLLabel

 Create

 Destroy

RegisterRenderers

Derived from TcxCustomWebLabel

Create

Destroy

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

SetBounds

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

ScriptsSubscription

SetAttribute

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterActions

RegisterEvents

RegisterValues

SetState

ValidateContainer


Events for TcxWebURLLabel
TcxWebURLLabel Events

TcxWebLabel          Legend

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebURLLabel.URL

TcxWebURLLabel          See Also

Specifies the link invoked by a control.

property URL: TcxURL;

Description

Use the URL property to specify the link invoked by clicking its label.  This property is represented by the TcxURL object.  This object allows you to specify the destination document and the window in which it is opened.


TcxWebURLLabel.Create

TcxWebURLLabel

Creates an instance of the TcxWebURLLabel class.

procedure Create(AOwner: TComponent); override;

Description

Use the Create method to create a TcxWebURLLabel control at runtime.  The AOwner parameter specifies the owner of the control (a page module).  The method initiates the URL property after calling the inherited constructor.

Be sure to specify the Parent property of a newly created control.


TcxWebURLLabel.Destroy

TcxWebURLLabel

Destroys the TcxWebURLLabel object.

procedure Destroy; override;

Description

The Destroy method is used to dispose the TcxWebURLLabel object and free any allocated memory.  It frees the URL property before calling the inherited destructor.

Do not use the Destroy method in applications.  Call the Free method instead.


TcxWebURLLabel.RegisterRenderers

TcxWebURLLabel          See Also

Registers renderer classes that generate HTML code representing the label control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers a single renderer class designed to render HTML code for the label control.  The browser type for which the registered renderer is designed is Internet Explorer.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for a label control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxWebPanel
 TcxWebPanel Object

Hierarchy          Properties          Methods          Events          See Also

Represents a web panel control.

Unit

cxWebStdCtrls

TcxWebPanel = class(TcxWebContainerControl)

Description

Use the TcxWebPanel control to add an empty panel to a web page.  You should place controls directly on the panel in order to use it as a grouping section for controls.  At runtime, you should set the Parent property of controls to the desired TcxWebPanel instance to place a control onto a panel.

If a control resides on a panel, its Left and Top properties are set with respect to the left-top corner of the parent panel.


TcxWebPanel Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxWebContainerControl


Properties for TcxWebPanel
TcxWebPanel Properties

TcxWebPanel          Legend

Derived from TcxWebContainerControl

WebContainterControlHelper

WebControlContainerCount

WebControlContainers

WebControlCount

WebControls

WebRenderHelper

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebScriptsHelper

WebValuesHelper


Methods for TcxWebPanel
TcxWebPanel Methods

TcxWebPanel          Legend

In TcxWebPanel

Create

RegisterRenderers

Derived from TcxWebContainerControl

Create

Destroy

GetChildren

SetBounds

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

ScriptsSubscription

SetAttribute

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterActions

RegisterEvents

RegisterValues

SetState

ValidateContainer


Events for TcxWebPanel
TcxWebPanel Events

TcxWebPanel          Legend

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebPanel.Create

TcxWebPanel

Creates a new instance of a web panel control.

constructor Create(AOwner: TComponent); override;

Description

Use the Create method to initialize a new instance of a web panel control.  The AOwner parameter determines the owner of a newly created control.  The Create method initializes properties to their default values after calling the inherited constructor.

Don’t forget to set the Parent property to a proper value when creating a control at runtime.  Otherwise it will not be displayed.


TcxWebPanel.RegisterRenderers

TcxWebPanel          See Also

Registers renderer classes that generate HTML code representing the panel control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers a single renderer class designed to render HTML code for the panel control.  The browser type for which the registered renderer is designed is Internet Explorer.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for a panel control. This method overrides the RegisterRenderers method of the TcxWebComponent class.


cxWebStdCtrls Unit Overview
cxWebStdCtrls Unit

Classes

TcxCustomWebCheckBox

TcxCustomWebEdit

TcxCustomWebImage

TcxCustomWebLabel

TcxCustomWebListBox

TcxCustomWebMemo

TcxCustomWebRadioGroup

TcxWebButton

TcxWebCheckBox

TcxWebComboBox

TcxWebCustomControl

TcxWebEdit

TcxWebFormControl

TcxWebImage

TcxWebLabel

TcxWebListBox

TcxWebListItem

TcxWebListItems

TcxWebMemo

TcxWebPanel

TcxWebRadioGroup

TcxWebURLLabel

Other Types

TcxWebButtonTypes

TcxWebDisplayStyle


TcxCustomWebRadioGroup
TcxCustomWebRadioGroup Object

Hierarchy          Properties          Methods          Events

Represents the base class for the TcxWebRadioGroup control.

Unit

cxWebStdCtrls

TcxCustomWebRadioGroup = class(TcxWebFormControl)

Description

The TcxCustomWebRadioGroup class implements the common functionality of radio group controls.  In particular, it is an ancestor of the TcxWebRadioGroup control.

The Items property stores a list of strings which represent captions for radio buttons.  Radio buttons with specified captions are arranged one under the other.  Only one radio button can be selected at a time.  However all the buttons can be deselected.

The selected radio button can be determined via the ItemIndex property.  Note that items are zero-based indexed.  Thus the ItemIndex property is -1 if none of the buttons are selected.


TcxCustomWebRadioGroup Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxWebFormControl


Properties for TcxCustomWebRadioGroup
TcxCustomWebRadioGroup Properties

TcxCustomWebRadioGroup          Legend

In TcxCustomWebRadioGroup

ItemHeight

ItemIndex

Items

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxCustomWebRadioGroup
TcxCustomWebRadioGroup Methods

TcxCustomWebRadioGroup          Legend

In TcxCustomWebRadioGroup

Create

Destroy

DoClick

DoSetValues

GetMaxHeight

GetMinHeight

RegisterActions

RegisterEvents

RegisterRenderers

RegisterValues

ScriptsSubscription

StyleChanged

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

Create

Destroy

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxWidth

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

SetState

ValidateContainer


Events for TcxCustomWebRadioGroup
TcxCustomWebRadioGroup Events

TcxCustomWebRadioGroup          Legend

In TcxCustomWebRadioGroup

OnClick

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxCustomWebRadioGroup.ItemHeight

TcxCustomWebRadioGroup          See Also

Returns an integer value indicating the web radio group item’s height.

property ItemHeight: Integer;

Description

Use the ItemHeight property to determine the height of each individual web radio group item.

ReadOnly Property


TcxCustomWebRadioGroup.ItemIndex

TcxCustomWebRadioGroup          See Also

Specifies which radio button in the group is currently selected.

property ItemIndex: Integer;

Description

The ItemIndex property holds the index of the selected radio button in the Items list.  (The index of the first (upper) button is 0.) The value of this property changes at runtime when a user selects radio buttons.  If you want one of the buttons to be selected when the application starts, assign the index of that button to the ItemIndex property at design time; otherwise, leave ItemIndex set to the default value of -1, which means that no button is selected.

The default value of the ItemIndex property is -1.


TcxCustomWebRadioGroup.Items

TcxCustomWebRadioGroup          See Also

Lists radio buttons in the radio group.

property Items: TStrings;

Description

The Items property holds a TStrings object that lists the captions of the radio buttons in the group.  Radio buttons can be added or removed by editing the Items list from the Object Inspector.

The radio group control always has the same number of radio buttons as the number of strings in the Items property.


TcxCustomWebRadioGroup.OnClick

TcxCustomWebRadioGroup          See Also

Fires when a user clicks the radio group.

property OnClick: TNotifyEvent;

Description

Write an OnClick event handler to perform specific actions each time the radio group is clicked.


TcxCustomWebRadioGroup.Create

TcxCustomWebRadioGroup          See Also

Creates an instance of the TcxCustomWebRadioGroup class.

constructor Create(AOwner: TComponent); override;

Description

The Create method is used to create an instance of the TcxCustomWebRadioGroup class (and its descendants unless they override it).  The AOwner parameter specifies the owner of the control.

Do not create instances of the TcxCustomWebRadioGroup class, instead initialize the TcxWebRadioGroup class which inherits this constructor.


TcxCustomWebRadioGroup.Destroy

TcxCustomWebRadioGroup          See Also

Destroys the TcxCustomWebRadioGroup object.

destructor Destroy; override;

Description

The Destroy method disposes of all the resources allocated by the web radio group.

Note: you should avoid using the Destroy method.  Use the Free method instead.


TcxCustomWebRadioGroup.DoClick

TcxCustomWebRadioGroup          See Also

Executes the OnClick event handler if assigned.

procedure DoClick; dynamic;

Description

The DoClick method is called automatically when a user clicks the web radio group.  Override this method to provide additional processing except calling the OnClick event handler.


TcxCustomWebRadioGroup.GetMaxHeight

TcxCustomWebRadioGroup          See Also

Returns the maximum possible height for the radio group control.

function GetMaxHeight: Integer; override;

Description

The GetMaxHeight method’s return value is used to establish the maximum height constraint for the radio group control.  This method returns the height of a single radio button (the ItemHeight property value) multiplied by the number of items.  It returns a single item height even if there are no radio buttons in the control.

The minimum height constraint is implemented by the GetMinHeight method, which returns the same value.


TcxCustomWebRadioGroup.GetMinHeight

TcxCustomWebRadioGroup          See Also

Returns the minimum possible height for the radio group control.

function GetMinHeight: Integer; override;

Description

The GetMinHeight method’s return value is used to establish the minimum height constraint for the radio group control.  This method returns the height of a single radio button (the ItemHeight property value) multiplied by the number of items.  It returns a single item height even if there are no radio buttons in the control.

The maximum height constraint is implemented by the GetMaxHeight method, which returns the same value.


TcxCustomWebRadioGroup.DoSetValues

TcxCustomWebRadioGroup          See Also

Updates the radio group control with respect to changes made by the end user.

procedure DoSetValues; override;

Description

The request contains information about the index of the selected radio button.  This information is used to set the value of the ItemIndex property in order to update the control with respect to changes made in the client browser.  This is performed by the DoSetValues method.

This method implements the DoSetValues method of the IcxWebValues interface.


TcxCustomWebRadioGroup.RegisterActions

TcxCustomWebRadioGroup          See Also

Registers action handlers for the radio group control.

procedure RegisterActions; override;

Description

The RegisterActions method registers a single handler for two actions.  These actions are the action, handling the OnClick event, and the default, which handles the same event if data transmission errors occur.

This method overrides the RegisterActions method of the TcxWebComponent class.


TcxCustomWebRadioGroup.RegisterEvents

TcxCustomWebRadioGroup          See Also

Registers client event handlers for the radio group control.

procedure RegisterEvents; override;

Description

The RegisterEvents method registers the client handler for the OnClick event if the OnClick event handler is assigned.  It calls the inherited method also.

This method implements the RegisterEvents method of the IcxWebEvents interface.


TcxCustomWebRadioGroup.RegisterRenderers

TcxCustomWebRadioGroup          See Also

Registers renderer classes that generate HTML code representing the radio group control under specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers two specific renderer classes designed to render HTML code for the radio group control.  The browser types for which the registered renderers are designed are Internet Explorer and Netscape Navigator 4.0.  The renderer class designed for Internet Explorer is the default.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for a radio group control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxCustomWebRadioGroup.RegisterValues

TcxCustomWebRadioGroup          See Also

Registers HTML elements, which contain data related to a component.

procedure RegisterValues; override;

Description

The RegisterValues method is used to register HTML elements, which contain data related to the web radio group control.  It registers the INPUT tag representing the radio group on a web page.  This is necessary to determine the index of the selected item after end-user manipulations.  The DoSetValues method implements the update of the ItemIndex property.

This method implements the RegisterValues method of the IcxWebValues interface.  It can be overridden in descendant classes to register other elements, whose values are required for proper functioning of the control.


TcxCustomWebRadioGroup.ScriptsSubscription

TcxCustomWebRadioGroup          See Also

Subscribes the control to client scripts.

procedure ScriptsSubscription; override;

Description

The ScriptSubscription method is used to subscribe the web radio group control to a post back script.  Note that if the control does not have a handler for the OnClick event, script subscription is skipped.

This method implements the ScriptsSubscription method of the IcxWebScripts interface.  It can be overridden in descendant classes to subscribe a derived control to additional scripts.


TcxCustomWebRadioGroup.StyleChanged

TcxCustomWebRadioGroup          See Also

Responds to style changes.

procedure StyleChanged(Style: TcxWebStyleItem); override;

Description

The StyleChanged method is implemented in order to respond to changes made to the style applied to the control.  As implemented in the TcxCustomWebRadioGroup class, it recalculates the height of its items (the ItemHeight property value).  This is necessary to provide new maximum and minimum height constraints implemented via the GetMinHeight and GetMaxHeight methods.


TcxWebButton
 TcxWebButton Object

Hierarchy          Properties          Methods          Events

Represents a web button control.

Unit

cxWebStdCtrls

TcxWebButton = class(TcxWebFormControl)

Description

There are four known button types representing all HTML buttons.  They are as follows: a simple button, an image button, a submit button and a reset button.  The first two represent simple buttons with or without an image. The last two are used for submitting or resetting a form.  The ButtonType property is responsible for a particular web button type.

Note: The simple buttons mentioned above do not display an image in Netscape Navigator.

Whatever the ButtonType property value is, a server side handler can be assigned to the OnClick event of the button control.


TcxWebButton Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxWebFormControl


Properties for TcxWebButton
TcxWebButton Properties

TcxWebButton          Legend

In TcxWebButton

ButtonType

GlyphIndex

GlyphPosition

Height

Images

Width

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebButton
TcxWebButton Methods

TcxWebButton          Legend

In TcxWebButton

Click

Create

GetDefaultColor

RegisterActions

RegisterEvents

RegisterRenderers

ScriptsSubscription

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

Destroy

GetColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterValues

SetState

ValidateContainer


Events for TcxWebButton
TcxWebButton Events

TcxWebButton          Legend

In TcxWebButton

OnClick

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebButton.ButtonType

TcxWebButton          See Also

Specifies the web button type.

TcxWebButtonTypes = (btButton, btSubmit, btReset, btImage);

property ButtonType: TcxWebButtonTypes;

Description

Use the ButtonType property to specify the web button type.  The following values are available for the ButtonType property:

Web Button Type	Description
btButton	Represents a simple web button.
btSubmit	Represents a submit web button.  It is used to transfer form data to a server-side script via the POST method.
btReset	Represents a reset web button.  It is used to reset all fields of a form to their initial values.
btImage	Represents a web button with an image.  The GlyphIndex property is used to determine the index of the image displayed on the button’s surface.
Note: If the ButtonType property is set to btSubmit, the OnClick event doesn’t fire.  This was done to avoid double post backs when clicking such buttons.

The default value for ButtonType is btButton.


TcxWebButton.GlyphIndex

TcxWebButton          See Also

Specifies the image displayed within the button control.

property GlyphIndex: Integer;

Description

Use the GlyphIndex property to specify the image displayed within the button.  The image is specified by its index within the collection specified via the Images property.  Use the TcxWebImageList component to set the value of the Images property.  If the GlyphIndex property specifies an index unavailable within the associated TcxWebImageList control, no image is displayed within the button.

The default value of the GlyphIndex property is -1.


TcxWebButton.GlyphPosition

TcxWebButton          See Also

Specifies the position of the assigned glyph in relation to the caption.

property GlyphPosition: TcxWebButtonGlyphPosition;

Description

Use the GlyphPositon property to specify whether the assigned glyph is located before or after the caption.  The gpBeforeText value determines that a glyph is located to the left and the gpAfterText value determines that a glyph is located to the right of the caption.

In order to assign a glyph to the button control use the Images and GlyphIndex properties.


TcxWebButton.Height

TcxWebButton          See Also

Specifies the height of the button control.

property Height: Integer;

Description

Use the Height property to specify the height of the web button.  This property value is set in pixels.

The default value of the Height property is 25.


TcxWebButton.Images

TcxWebButton          See Also

Specifies the source images used by the button control.

property Images: TcxWebImageList;

Description

The TcxWebButton control allows you to display a glyph before or after its caption.  The Images property specifies the source images used for this purpose.  You should use the TcxWebImageList component in order to create a collection of images and set the value of the Images property.  If this property value is properly set, the GlyphIndex properties should be used to assign a glyph for the button control.


TcxWebButton.OnClick

TcxWebButton          See Also

Fires when a user clicks on a button control.

property OnClick: TNotifyEvent;

Description

Write an OnClick event handler to perform specific actions each time a user clicks on a button control.

Note: If the ButtonType property is set to btSubmit, the OnClick event doesn’t fire.  This was done to avoid double post backs when clicking such buttons.


TcxWebButton.Width

TcxWebButton          See Also

Specifies the width of the button control.

property Width: Integer;

Description

Use the Width property to specify the width of the web button.  This property value is set in pixels.

The default value of the Width property is 100.


TcxWebButton.Click

TcxWebButton          See Also

Executes the OnClick event handler if it is assigned.

procedure Click; dynamic;

Description

The Click method is used to invoke the OnClick event handler.  It checks whether it is assigned and runs it if true.

Override this method in descendant classes in order to perform additional actions when the end user clicks the button.  Note that this method is called only if the OnClick event handler is assigned.


TcxWebButton.Create

TcxWebButton          See Also

Creates an instance of the TcxWebButton class.

constructor Create(AOwner: TComponent); override;

Description

Use the Create method to create an instance of the web button control at runtime.  The AOwner parameter determines the owner of the button.  The Create method calls the inherited Create method and sets certain properties to their default values.

Do not forget to set the Parent property of the initialized TcxWebButton object to a proper value.  Otherwise the generated button will not be displayed.


TcxWebButton.GetDefaultColor

TcxWebButton          See Also

Returns the default color of the web button.

TcxWebColor = -$7FFFFFFF-1..$7FFFFFFF;

function GetDefaultColor: TcxWebColor; override;

Description

The GetDefaultColor method is used to determine the default color of the web button.  The returned value is clWebButtonFace.  Override this method in descendant classes to implement a different default color for the button control.


TcxWebButton.RegisterActions

TcxWebButton          See Also

Registers server side event handlers for the button control.

procedure RegisterActions; override;

Description

The RegisterActions method is used to register two actions for the web button.  These actions are the action handling the OnClick event, and the default, which handles the same event if data transmission errors occur.

This method overrides the RegisterActions method of the TcxWebComponent class.  You can override the RegisterActions method in descendant classes to register additional actions.


TcxWebButton.RegisterEvents

TcxWebButton          See Also

Registers client side events required by the button control to function properly.

procedure RegisterEvents; override;

Description

The RegisterEvents method is used to register the client side OnClick event, in addition to that registered in the inherited method.  This event is used to perform post back if the OnClick event handler is assigned.

This method implements the RegisterEvents method of the IcxWebEvents interface.  You can override it in descendant classes to register additional client side events.


TcxWebButton.RegisterRenderers

TcxWebButton          See Also

Registers renderer classes that generate HTML code representing the button control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers two specific renderer classes designed to render HTML code for the button control.  The browser types for which the registered renderers are designed are Internet Explorer and Netscape Navigator 4.0.  The renderer class designed for Internet Explorer is the default.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for a button control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxWebButton.ScriptsSubscription

TcxWebButton          See Also

Subscribes the button control to client side scripts.

procedure ScriptsSubscription; override;

Description

The ScriptSubscription method is used to perform subscription to the post back script.  Note that ScriptSubscription succeeds only if the OnClick event is implemented.

This method implements the ScriptsSubscription method of the IcxWebScripts interface.  You can override this method in descendant classes to subscribe your control to additional scripts.


TcxWebCustomControl
 TcxWebCustomControl Object

Hierarchy          Properties          Methods          Events

Represents a control which displays custom HTML within its area.

Unit

cxWebStdCtrls

TcxWebCustomControl = class(TcxWebControl)

Description

Use the TcxWebCustomControl to display custom HTML on a page.  The HTML code, which specifies the contents of the control, is stored within the Content property.  If styles are applied to the control, they are applied to all the elements of the HTML code (contents) unless custom styles are applied within the code.


TcxWebCustomControl Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl


Properties for TcxWebCustomControl
TcxWebCustomControl Properties

TcxWebCustomControl          Legend

In TcxWebCustomControl

Content

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebCustomControl
TcxWebCustomControl Methods

TcxWebCustomControl          Legend

In TcxWebCustomControl

Create

Destroy

RegisterRenderers

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

Create

Destroy

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

ScriptsSubscription

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterActions

RegisterEvents

RegisterValues

SetState

ValidateContainer


Events for TcxWebCustomControl
TcxWebCustomControl Events

TcxWebCustomControl          Legend

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebCustomControl.Content

TcxWebCustomControl          See Also

Specifies the HTML code rendered within the area of the TcxWebCustomControl control.

property Content: TStrings;

Description

Use the Content property to specify the HTML code, which is rendered within the area occupied by the control.  Applying a style to the control means that this style is applied to each element of the HTML code, represented by the Content property.  An exception is when a particular element already has a style assigned.


TcxWebCustomControl.Create

TcxWebCustomControl          See Also

Creates an instance of the TcxWebCustomControl class.

constructor Create(AOwner: TComponent); override;

Description

Use the Create method to create a new control, which displays its HTML contents at runtime.  The AOwner parameter specifies the owner of the newly created control.  The Create method first invokes the inherited Create constructor for the TcxWebControl class and then initializes some of its properties.

Do not forget to set the Parent property to a proper value.  Otherwise the control will not be displayed.


TcxWebCustomControl.Destroy

TcxWebCustomControl          See Also

Destroys the TcxWebCustomControl object.

destructor Destroy; override;

Description

The Destroy method destroys the custom web control and disposes of all resources it has allocated.  It frees the Content property before calling the inherited destructor.

You should avoid using the Destroy method.  Use the Free method instead.


TcxWebCustomControl.RegisterRenderers

TcxWebCustomControl          See Also

Registers renderer classes that generate HTML code representing the web custom control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers two specific renderer classes designed to render HTML code for the control.  The browser types for which the registered renderers are designed are Internet Explorer and Netscape Navigator 4.0.  The renderer class designed for Internet Explorer is the default.

You can override the RegisterRenderers method in descendant classes to register your own renderer class for a control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxWebRadioGroup
 TcxWebRadioGroup Object

Hierarchy          Properties          Methods          Events

Represents a radio group control.

Unit

cxWebStdCtrls

TcxWebRadioGroup = class(TcxCustomWebRadioGroup)

Description

Use methods and properties of the TcxWebRadioGroup object to create, customize and manage a web radio group control.  This control is a set of vertically arranged radio buttons.

The Items property stores a list of strings, which represent the captions of radio buttons.  Radio buttons with specified captions are arranged one under the other.  Only one radio button can be selected at a time.  However all the buttons can be deselected.

The selected radio button can be determined via the ItemIndex property.  Note that items are zero-based indexed.  Thus the ItemIndex property is -1 if none of the buttons is selected.

The basic functionality of the TcxWebRadioGroup control is implemented in the TcxCustomWebRadioGroup class.


TcxWebRadioGroup Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxWebFormControl

     |

TcxCustomWebRadioGroup


Properties for TcxWebRadioGroup
TcxWebRadioGroup Properties

TcxWebRadioGroup          Legend

Derived from TcxCustomWebRadioGroup

ItemHeight

ItemIndex

Items

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebRadioGroup
TcxWebRadioGroup Methods

TcxWebRadioGroup          Legend

In TcxWebRadioGroup	RegisterRenderers

Derived from TcxCustomWebRadioGroup

Create

Destroy

DoClick

DoSetValues

GetMaxHeight

GetMinHeight

RegisterActions

RegisterEvents

RegisterValues

ScriptsSubscription

StyleChanged

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

Create

Destroy

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxWidth

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

SetState

ValidateContainer


Events for TcxWebRadioGroup
TcxWebRadioGroup Events

TcxWebRadioGroup          Legend

Derived from TcxCustomWebRadioGroup

OnClick

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebButtonTypes
TcxWebButtonTypes type

See Also

Contains values corresponding to web button types.

Unit

cxWebStdCtrls

TcxWebButtonTypes = (btButton, btSubmit, btReset, btImage);

Description

TcxWebButtonTypes represents a set of possible web button types.  The following values are available:

Value	Description
btButton	Represents a simple web button.
btSubmit	Represents a submit button which is used to submit the contents of a web form to a server-side script.
btReset	Represents a reset button which is used to set values of all web form component fields to their default values.
btImage	Represents an image button.

TcxWebButtonTypes type values are used to specify the ButtonType property of the TcxWebButton control.


TcxWebDisplayStyle
TcxWebDisplayStyle type

See Also

Contains values specifying the manner in which an image is displayed within a control.

Unit

cxWebStdCtrls

TcxWebDisplayStyle = (wdsAutoSize, wdsProportional, wdsStretch);

Description

TcxWebDisplayStyle contains values specifying image display styles.  The following values are available:

Value	Description
wdsAutoSize	Image is displayed in their original size.
wdsProportional	Image is proportionally sized to occupy the maximum possible area, i.e. image width depends on its height.
wdsStretch	Image is stretched to occupy the entire area of the control.

TcxWebDisplayStyle type values are used to set the value of the DisplayStyle property of the TcxWebImage class.


TcxWebButtonGlyphPosition
TcxWebButtonGlyphPosition type

See Also

Represents glyph position type.

Unit

cxWebStdCtrls

TcxWebButtonGlyphPosition = (gpBeforeText, gpAfterText);

Description

TcxWebButtonGlyphPosition represents a set of values defining possible glyph positions.

gpBeforeText determines that a glyph is located to the left and gpAfterText determines that a glyph is located to the right of a web component.  These value types are used to set the value of the GlyphPosition property of the TcxWebButton control.


TcxWebImageItem
TcxWebImageItem Object

Hierarchy          Properties          Methods          See Also

Represents a particular image item in a TcxWebImages collection.

Unit

cxWebImgList

TcxWebImageItem = class(TCollectionItem)

Description

The TcxWebImageItem class represents an individual image item which completely describes a particular web image used within an HTML document.  The TcxWebImageItem class implements a FileName property that specifies the image file name.  The location of image files is specified by the ImagesPath property of the corresponding TcxWebImageList control to which a TcxWebImageItem belongs.

Additionally the TcxWebImageItem class has a number of properties which affect image size and appearance within a web page.


TcxWebImageItem Hierarchy
Hierarchy

TCollectionItem


Properties for TcxWebImageItem
TcxWebImageItem Properties

TcxWebImageItem          Legend

In TcxWebImageItem

BorderWidth

FileName

Height

Hint

HorzSpace

ImageList

Name

VertSpace

Width


Methods for TcxWebImageItem
TcxWebImageItem Methods

TcxWebImageItem          Legend

In TcxWebImageItem

Assign

WriteHTML


TcxWebImageItem.BorderWidth

TcxWebImageItem          See Also

Specifies the width of the image’s border.

property BorderWidth: Integer;

Description

The BorderWidth property specifies the width of the image border in pixels.  Use the BorderWidth property to control the thickness of the border around an image.

The BorderWidth property value is used to generate valid HTML code for the BORDER attribute of the <IMG> tag.

The default value of the BorderWidth property is 0.


TcxWebImageItem.FileName

TcxWebImageItem          See Also

Specifies the name of a graphic file containing the image.

property FileName: string;

Description

Use the FileName property to specify the name of a graphic file containing the image.

When a valid file name is assigned to the FileName property, the corresponding image (described by this TcxWebImageItem object) can be displayed with the help of a TcxWebImage control or another specifically designed control (TcxWebTreeView, for instance).

Along with the ImagesPath property of the corresponding TcxWebImageList object the FileName property takes part in the forming valid HTML code for the SRC attribute of the <IMG> tag. Appropriate formats of graphic files specified by the FileName property include GIF (.gif) files, and JPEG (.jpg) files.


TcxWebImageItem.Height

TcxWebImageItem          See Also

Specifies the height of an image.

property Height: Integer;

Description

Use the Height property to get or set the height (in pixels) which the corresponding image will have within a web page.

Generally the Height property is used in combination with the Width property.  They are used together to generate valid HTML code for the HEIGHT and WIDTH attributes of the <IMG> tag.

The HEIGHT and WIDTH attributes allow the browser to determine the text layout surrounding images before the entire image has been downloaded, which can significantly speed up display of document text.  If you specify these, a visitor will not have to wait for the image to be loaded over the network and its size calculated.

Internet Explorer and Netscape use image placement mechanisms, so that if the display of in-line images has been turned off, the space that the images would occupy in the page is marked as if the image were there (with any Hint text being displayed in the place holder).  This allows you to be sure that the text layout on the page will be as desired, even if a user is not displaying the images.

The default value for the Height property is 0.


TcxWebImageItem.Hint

TcxWebImageItem          See Also

Contains the text string that can be used as a Help Hint for the corresponding image.

property Hint: string;

Description

Internet Explorer and Netscape (4.0 and above) can use any text specified by the Hint property as a Help Hint to be displayed when the user’s mouse pauses over the image.  A Help Hint is a box containing help text that appears for a corresponding image when the user moves the mouse pointer over the image and pauses momentarily.

The Hint property can also be used to specify the text that is to be the alternative for the graphic when rendering in non-graphical environments.  Alternate text should be provided whenever the image is not rendered (i.e. if a user has image loading turned off). The Hint property value is used to generate valid HTML code for the ALT attribute of the <IMG> tag.


TcxWebImageItem.HorzSpace

TcxWebImageItem          See Also

Specifies horizontal margins around an image.

property HorzSpace: Integer;

Description

The HorzSpace property value controls the horizontal space (in pixels) to the left and right of an image.

The HorzSpace property provides horizontal text wrapping around the image.  This property is similar to the BorderWidth property (its horizontal constituent), except the margins do not have their own color.

The HorzSpace property value is used to generate valid HTML code for the HSPACE attribute of the <IMG> tag.

The default value for the HorzSpace property is 0.


TcxWebImageItem.WriteHTML

TcxWebImageItem          See Also

Generates the HTML code for an image represented by an image item.

procedure WriteHTML(HTMLTextBuilder: TcxHTMLTextBuilder);

Description

The WriteHTML method is used to generate the HTML code for the <IMG> tag which represents an image within an HTML document.  Values of the Name, ImagesPath and FileName, Height and Width, HorzSpace and VertSpace, BorderWidth, Hint properties are used to generate the HTML code for the corresponding attributes of the <IMG> tag.


TcxWebImageItem.ImageList

TcxWebImageItem          See Also

Specifies a TcxWebImageItem object to which a given image item belongs.

property ImageList: TcxWebImageList;

Description

The ImageList property is used to gain access to a TcxWebImageItem object which is the owner of a given TcxWebImageItem object.

ReadOnly Property


TcxWebImageItem.Name

TcxWebImageItem

Specifies the name of an image.

property Name: string;

Description

The Name property is used to specify the string identifying an image.  Use the Name property to uniquely specify an individual image item in code anywhere in the application.

The Name property value is used to generate valid HTML code for the ID attribute of the <IMG> tag.  So the Name property value should be unique throughout the scope of the current HTML document.


TcxWebImageItem.VertSpace

TcxWebImageItem          See Also

Specifies vertical margins around an image.

property VertSpace: Integer;

Description

The VertSpace property value controls the vertical space (in pixels) above and below an image.

The VertSpace property provides vertical text wrapping around the image.  This property is similar to the BorderWidth property (its vertical constituent), except the margins do not have their own color. The VertSpace property value is used to generate valid HTML code for the VSPACE attribute of the <IMG> tag.

The default value for the VertSpace property is 0.


TcxWebImageItem.Width

TcxWebImageItem          See Also

Specifies the horizontal size of an image.

property Width: Integer;

Description

Use the Width property to get or set the width (in pixels) which a corresponding image will have within a web page.

Generally the Width property is used in combination with the Height property.  They are used together to generate valid HTML code for the WIDTH and HEIGHT attributes of the <IMG> tag.

The HEIGHT and WIDTH attributes allow the browser to determine the text layout surrounding images before the entire image has been downloaded, which can significantly speed up display of document text.  If you specify these, a visitor will not have to wait for the image to be loaded over the network and its size calculated.

Internet Explorer and Netscape use image placement mechanisms, so that if the display of in-line images has been turned off, the space that the images would occupy in the page is marked as if the image were there (with any Hint text being displayed in the place holder).  This allows you to be sure that the text layout on the page will be as desired, even if a user is not displaying the images.

The default value for the Width property is 0.


TcxWebImageItem.Assign

TcxWebImageItem          See Also

Assigns the contents of one TcxWebImageItem object to another.

procedure Assign(Source: TPersistent); override;

Description

The Assign method copies the property values of one TcxWebImageItem to another.  The object passed as the parameter serves as the source while the object whose Assign method is called serves as the destination object.  Use this method instead of direct assignment.

This method is useful when it is necessary to create a new image item that slightly differs (possibly only by name) from an existing image.  For instance you may want to use the same height and width settings but change border width and Help Hint text.  Use the Assign method in order not to set the Height and Width properties values once again.


cxWebImgList Unit Overview
cxWebImgList Unit

Classes

TcxWebImageItem

TcxWebImageList

TcxWebImages


TcxWebImageList
 TcxWebImageList Object

Hierarchy          Properties          Methods          See Also

Represents a component which manages a set of web images.

Unit

cxWebImgList

TcxWebImageList = class(TComponent)

Description

The TcxWebImageList object is used to manage sets of images within an HTML document.  The TcxWebImageList class implements its own Images property which refers to the TcxWebImages class.  This class represents a collection of the TcxWebImageItem classes each of which contains complete information about a particular web image used within an HTML document.

Additionally the TcxWebImageList class has an ImagesPath property designed to specify a valid path for all the images described by specific TcxWebImageItem classes.

The TcxWebImageList control functions as a storehouse for images.  It needs a second control to display the stored images.  Such a control can be a TcxWebImage control which can form the value of its PictureURL property by using the ImagesPath property value of the TcxWebImageList control and the FileName property value of an appropriate TcxWebImageItem.  Moreover, there are some controls specifically designed for using the TcxWebImageList component.

In order to use a TcxWebImageList component with this specifically designed control (a TcxWebTreeView control, for instance), you must bind a TcxWebImageList object with the second control through an appropriate property.  For the TcxWebTreeView control, you must set the Images property to the desired TcxWebImageList object.

At design time, you can add images to a TcxWebImageList control using the ImageList Editor dialog box.  At runtime, you can add images using the Add method for the TcxWebImages collection.


TcxWebImageList Hierarchy
Hierarchy

TComponent


Properties for TcxWebImageList
TcxWebImageList Properties

TcxWebImageList          Legend

In TcxWebImageList

DesignImagesPath

Images

ImagesPath


Methods for TcxWebImageList
TcxWebImageList Methods

TcxWebImageList          Legend

In TcxWebImageList

Create

Destroy

ValidIndex


TcxWebImageList.DesignImagesPath

TcxWebImageList          See Also

Specifies the common path used at design time for all the images of a TcxWebImages collection.

property DesignImagesPath: string;

Description

The DesignImagesPath property contains a valid path used at design-time only to specify the location of all web images represented via the image list.  Setting the DesignImagesPath property provides you with the ability to display web images at design-time.

The DesignImagesPath property setting does not affect runtime availability of the image list’s images.  In order to specify the images path that will be used at runtime, you should use the ImagesPath property.


TcxWebImageList.Images

TcxWebImageList          See Also

Specifies a collection of web images.

property Images: TcxWebImages;

Description

The Images property is used to gain access to the TcxWebImages class.  This class represents a collection of TcxWebImageItem classes each of which contains complete information about a specific web image which may be used within an HTML document.  A particular TcxWebImages collection item can be accessed through the Items property of the TcxWebImages class.


TcxWebImageList.ImagesPath

TcxWebImageList          See Also

Specifies the common path used at runtime for all the images of a TcxWebImages collection.

property ImagesPath: string;

Description

The ImagesPath property contains a valid path specifying the runtime location of all web images represented via the image list.  The value of the ImagesPath property is used in combination with a filename referenced by an image collection item within the SRC attribute of the <IMG> tag (when calling the WriteHTML method of a corresponding TcxWebImageItem object).

In order to have the ability to display web images represented by the images list at design-time use the DesignImagesPath property.


TcxWebImageList.Create

TcxWebImageList          See Also

Creates a new instance of the TcxWebImageList class.

constructor Create(AOwner: TComponent); override;

Description

The Create method is used to create a new instance of the TcxWebImageList class and initialize its Images property.  The Images property is initialized by creating an instance of the TcxWebImages class which is designed to represent a collection of web images.


TcxWebImageList.Destroy

TcxWebImageList          See Also

Destroys an instance of the TcxWebImageList class.

destructor Destroy; override;

Description

The Destroy method is used to destroy an instance of the TcxWebImageList class and release any allocated memory.


TcxWebImageList.ValidIndex

TcxWebImageList          See Also

Checks whether a specific integer represents a valid index used to access a particular TcxWebImages collection item.

function ValidIndex(AIndex: Integer): Boolean;

Description

The ValidIndex method verifies whether an integer specified by the AIndex parameter can be used as a valid index to access a particular item from the Images collection (represented by the TcxWebImages class).


TcxWebImages
TcxWebImages Object

Hierarchy          Properties          Methods          See Also

Represents a collection of web images.

Unit

cxWebImageList

TcxWebImages = class(TCollection)

Description

The TcxWebImages class is used by the TcxWebImageList class to represent a collection of TcxWebImageItem classes - each of which can contain complete information about a particular web image used within an HTML document.  The TcxWebImageList class provides access to the TcxWebImages class via the Images property.  A specific image item (represented by the TcxWebImageItem class) can be accessed via the Items property of the TcxWebImages class.

At design time, you can add images to a TcxWebImages collection using the ImageList Editor dialog box.  At runtime, you can add images using the Add method for the TcxWebImages collection.


TcxWebImages Hierarchy
Hierarchy

TCollection


Properties for TcxWebImages
TcxWebImages Properties

TcxWebImages          Legend

In TcxWebImages

Items


Methods for TcxWebImages
TcxWebImages Methods

TcxWebImages          Legend

In TcxWebImages

Add

Create

GetOwner


TcxWebImages.Items

TcxWebImages          See Also

Provides access to a particular image item by its index.

property Items[Index:Integer]: TcxWebImageItem;

Description

The Items property is an array that contains references to image items represented by the TcxWebImageItem objects.  Use the integer Index parameter to access a specific image item.  The first image item index is 0.  The number of image items in the Items array is specified by the Count property.


TcxWebImages.Add

TcxWebImages          See Also

Creates a new TcxWebImageItem instance and adds it to the Items collection.

function Add: TcxWebImageItem;

Description

Call the Add method to create a new image item in the TcxWebImages collection.  The new item is placed at the end of the Items array.

The Add method returns the newly created image item.


TcxWebImages.Create

TcxWebImages

Creates a new instance of the TcxWebImages class.

constructor Create(AImageList: TcxWebImageList);

Description

The Create method is used to create a new instance of the TcxWebImages class.  The Create method is called by the Create method of the TcxWebImageList class in order to create a collection of web images together with the corresponding image list control.


TcxWebImages.GetOwner

TcxWebImages

Returns an image list control to which the collection of web images belongs.

function GetOwner: TPersistent; override;

Description

The GetOwner method is used to return a TcxWebImageList control which owns the collection of web images.

This is an internally used protected method.


TcxWebPopupMenu
 TcxWebPopupMenu Object

Hierarchy          Properties          Methods          Events

Represents a popup menu component.

Unit

cxWebControls

TcxWebPopupMenu = class(TcxWebComponent, IcxMenuSupport)

Description

The TcxWebPopupMenu class represents a component which defines a popup menu.  A popup menu is designed to be associated with one or more web controls used to invoke the popup menu.

There are two ways in which a popup menu can be invoked:

•	when the mouse cursor moves over a control associated with the popup menu.

•	when a user clicks a mouse button over a control associated with the popup menu.

The manner in which a popup menu is invoked is specified by the PopupShowingType property of an associated web control. To make a popup menu available, assign the TcxWebPopupMenu object to the control’s PopupMenu property.

The TcxWebPopupMenu class encapsulates the properties and methods which are necessary to implement the functionality of a popup menu.


TcxWebPopupMenu Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent


Properties for TcxWebPopupMenu
TcxWebPopupMenu Properties

TcxWebPopupMenu          Legend

In TcxWebPopupMenu

ClickedArea

CoveredArea

DisabledStyles

Designer

HorizOffset

Images

ImagesBackgroundColor

Items

ItemWidth

MenuHelper

PopupType

SeparatorColor

SeparatorWidth

VertOffset

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebPopupMenu
TcxWebPopupMenu Methods

TcxWebPopupMenu          Legend

In TcxWebPopupMenu

Create

Destroy

GetChildren

ItemByName

PopupSubscript

PopupUnsubscript

RegisterActions

RegisterRenderers

ScriptsSubscription

SetChildOrder

Derived from TcxWebComponent

CanSetValues

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterEvents

RegisterValues

SetState

StyleChanged

ValidateContainer


Events for TcxWebPopupMenu
TcxWebPopupMenu Events

TcxWebPopupMenu          Legend

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebPopupMenu.ClickedArea

TcxWebPopupMenu          See Also

Represents a list of HTML element names which activate the popup menu when they are clicked.

property ClickedArea: TStrings;

Description

The ClickedArea property is used to store names of specific HTML elements within a list of strings.  Each of these HTML elements is designed to activate the popup menu when the element is clicked using the mouse. The name of such an HTML element should be known and specified by the ID attribute of the element.  So you can force a popup menu to appear over any HTML element (DIV, SPAN, INPUT, etc) whose ID attribute is assigned.

Basically the ClickedArea property can contain web control names as well, although web controls can assign a specific popup menu via their PopupMenu property.


TcxWebPopupMenu.CoveredArea

TcxWebPopupMenu          See Also

Represents a list of HTML element names which activate the popup menu when the mouse cursor is over them.

property CoveredArea: TStrings;

Description

The CoveredArea property is used to store names of specific HTML elements within a list of strings.  Each of these HTML elements is designed to activate the popup menu when a user first moves the mouse cursor over the element. The name of such an HTML element should be known and specified by the ID attribute of the element.  So you can force a popup menu to appear over any HTML element (DIV, SPAN, INPUT, etc) whose ID attribute is assigned.

Basically the CoveredArea property can contain web control names as well, although web controls can assign a specific popup menu via their PopupMenu property.


TcxWebPopupMenu.DisabledStyles

TcxWebPopupMenu          See Also

Specifies the default and hover styles of disabled items within the popup menu control.

property DisabledStyles: TcxWebStyles;

Description

Use the DisabledStyles property to specify the look of the disabled items within the popup menu control.  This property is represented by the TcxWebStyles object, whose Default and Hover properties specify the default and hover styles.

If a default style is applied to disabled menu items and hover style is not specified, each item will have the specified default style even when the mouse pointer hovers over it.

If no styles are assigned to the DisabledStyles property, the default style will be applied to disabled items.  This default style differs from the default style applied to enabled items.

Note that you should use the TcxWebStyleController component to create the styles which can be applied to disabled items.


TcxWebPopupMenu.Designer

TcxWebPopupMenu

Obtains a specific popup menu designer.

property Designer: TAbstractcxWebMenuDesigner;

Description

The Designer property is used to obtain the TAbstractcxWebMenuDesigner class which is responsible for creating and destroying of a particular menu helper object (represented by the TcxWebMenuHelper class) and for performing specific operations which affect popup menu functionality.

ReadOnly Property


TcxWebPopupMenu.HorizOffset

TcxWebPopupMenu          See Also

Specifies the horizontal offset which child menu items have relative to the edge of the parent item.

property HorizOffset: Integer;

Description

Use the HorizOffset property to control the horizontal placement of popup menu subitems.  When a user first moves the mouse over an item - which contains another item (subitems) - these subitems appear.  The HorizOffset property specifies the horizontal offset (in pixels) which these subitems will have relative to the left or right edge of their parent item.

Determination of a specific parent item’s edge from which the horizontal offset of child items will be counted depends on the PopupType property value.  If the PopupType property is set to ptToLeft (subitems appear to the left of the parent menu item), the horizontal offset of subitems is relative to the left edge of the parent item.  Positive values for the HorizOffset property move subitems to the right, negative values to the left of the parent item’s left edge.

If the PopupType property is set to ptToRight (subitems appear to the right of the parent menu item), the horizontal offset of subitems is relative to the right edge of the parent item.  In this case, positive values for the HorizOffset property move subitems to the left, negative values to the right of the parent item’s right edge.

To control the vertical placement of popup menu subitems, use the VertOffset property.

The HorizOffset property is initialized by the Create method of a specific menu helper object (represented via the TcxWebMenuHelper class) and receives a value of 10.


TcxWebPopupMenu.Images

TcxWebPopupMenu

Specifies the source images used by the popup menu control.

property Images: TcxWebImageList;

Description

The popup menu control allows you to display glyphs within its items.  The Images property specifies the source images used for this purpose.  You should use the TcxWebImageList component in order to create a collection of images and set the value of the Images property.  If this property value is properly set, the ImageIndex property should be used to assign a glyph for each popup menu item.


TcxWebPopupMenu.ImagesBackgroundColor

TcxWebPopupMenu          See Also

Specifies the background color for images used by the popup menu control.

property ImagesBackgroundColor: TcxWebColor;

Description

The popup menu control allows you to display glyphs within its items.  Use the ImagesBackgroundColor property to specify the background color which the item images will have within the popup menu control.  You should use the TcxWebImageList component in order to create a collection of images and set the value of the Images property.  If this property value is properly set, the ImageIndex property should be used to assign a glyph for each menu item.


TcxWebPopupMenu.Items

TcxWebPopupMenu          See Also

Provides access to top-level elements of a popup menu.

property Items: TcxWebMenuItem;

Description

Use the Items property to access information about the top-level elements of a popup menu.  Each menu item, including top-level items, is a single TcxWebMenuItem object.  This TcxWebMenuItem object has its own Items property to describe its child items (subitems), if any.

ReadOnly Property


TcxWebPopupMenu.ItemWidth

TcxWebPopupMenu

Specifies the width of top-level menu items.

property ItemWidth: Integer;

Description

Use the ItemWidth property to specify the width in pixels for popup menu items which are top-level items.  The width of child menu items (subitems) is controlled by the Width property of these subitems, which are represented via the TcxWebMenuItem objects.

Note that the height of popup menu items is calculated automatically based upon the font settings of a web style (specified via the Styles.Default and Styles.Hover properties) applied to the popup menu.


TcxWebPopupMenu.MenuHelper

TcxWebPopupMenu          See Also

Specifies a helper object used to provide the functionality for a popup menu.

property MenuHelper: TcxWebMenuHelper;

Description

The MenuHelper method implements the MenuHelper method of the IcxMenuSupport interface.  The MenuHelper property is used to gain access to a specific TcxWebMenuHelper class which initializes most of popup menu properties and contains a number of its own properties used to provide functionality for a popup menu.

A popup menu helper object specified by the MenuHelper property is created and initialized the first time it is referred.

ReadOnly Property


TcxWebPopupMenu.PopupType

TcxWebPopupMenu

Specifies whether sub-items appear to the left or to the right side of their parent menu item.

type

  TcxWebMenuPopupType = (ptToLeft, ptToRight);

property PopupType: TcxWebMenuPopupType;

Description

When a user first moves the mouse over an item which contains other items (sub-items), these sub-items appear.  The PopupType property specifies at which side child items (sub-items) will appear with respect to their parent menu item.

The following values are available for the PopupType property.

Value	Meaning
ptToLeft	Sub-items appear to the left of the parent menu item.
ptToRight	Sub-items appear to the right of the parent menu item.


TcxWebPopupMenu.SeparatorColor

TcxWebPopupMenu          See Also

Specifies item separator color.

property SeparatorColor: TcxWebColor;

Description

Use the SeparatorColor property to specify the color of an item separator.  A popup menu item separator is a horizontal line between menu items.

Use the SeparatorWidth property of the popup menu to specify the width of item separator.


TcxWebPopupMenu.SeparatorWidth

TcxWebPopupMenu          See Also

Specifies item separator width.

property SeparatorWidth: Integer;

Description

Use the SeparatorWidth property to specify item separator width.  A popup menu item separator is a horizontal line between menu items.

Use the SeparatorColor property of the popup menu to specify the color of item separator.


TcxWebPopupMenu.SubscriptedClickedArea

TcxWebPopupMenu          See Also

Represents a list of HTML element names which activate a popup menu when clicked.

property SubscriptedClickedArea: TStrings;

Description

The SubscriptedClickedArea property is used to obtain a list of names of specific HTML elements.  Each of these HTML elements is designed to activate the popup menu when the element is clicked by the mouse.

The SubscriptedClickedArea property contains only names of those HTML elements which were subscribed to the popup menu using by the PopupSubscript method.

ReadOnly Property


TcxWebPopupMenu.SubscriptedCoveredArea

TcxWebPopupMenu          See Also

Represents a list of HTML element names, which activate the popup menu when the mouse cursor is over them.

property SubscriptedCoveredArea: TStrings;

Description

The SubscriptedCoveredArea property is used to obtain a list of names of specific HTML elements.  Each of these HTML elements is designed to activate the popup menu when a user first moves the mouse cursor over the element.

The SubscriptedCoveredArea property contains only names of those HTML elements which were subscribed to the popup menu using by the PopupSubscript method.

ReadOnly Property


TcxWebPopupMenu.VertOffset

TcxWebPopupMenu          See Also

Specifies the vertical offset which child menu items have relative to the top edge of the parent item.

property VertOffset: Integer;

Description

Use the VertOffset property to control the vertical placement of popup menu subitems.  When a user first moves the mouse over an item, which contains other items (subitems), these subitems appear.  The VertOffset property specifies the vertical offset (in pixels) these subitems will have relative to the top edge of their parent item.  Positive values for the VertOffset property move subitems up, negative values - down relative to the parent item’s top edge.

To control the horizontal placement of popup menu subitems, use the HorizOffset property.

The VertOffset property is initialized by the Create method of a specific menu helper object (represented via the TcxWebMenuHelper class) and receives the value of 5.


TcxWebPopupMenu.Create

TcxWebPopupMenu          See Also

Creates a new instance of the TcxWebPopupMenu class.

constructor Create(AOwner: TComponent); override;

Description

The Create method is used to create a new instance of the TcxWebPopupMenu class and initialize some of its properties.

The Create method calls the inherited constructor and then initializes some control’s properties.


TcxWebPopupMenu.Destroy

TcxWebPopupMenu          See Also

Destroys an instance of the TcxWebPopupMenu class.

destructor Destroy; override;

Description

The Destroy method is used to destroy an instance of the TcxWebPopupMenu class and release any allocated memory.


TcxWebPopupMenu.GetChildren

TcxWebPopupMenu

Executes a callback for child menu items.

procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;

Description

The GetChildren method is called automatically by the streaming system so that child menu items are saved and read with their parent menu.

This method performs a function call specified by the Proc parameter for each menu item, which is owned by the Root item.


TcxWebPopupMenu.ItemByName

TcxWebPopupMenu

Returns the object representing an item with a specified name.

function ItemByName(const AName: string): TcxWebMenuItem;

Description

Use the ItemByName method to retrieve the TcxWebMenuItem object, which represents a popup menu item,  with the specified name.  Item name is specified by the AName parameter.  The parameter value is compared to the value of the popup menu item’s Name property.

If the item with the specified name is not found, the ItemByName method returns nil.


TcxWebPopupMenu.PopupSubscript

TcxWebPopupMenu          See Also

Subscribes a specific HTML element to the popup menu.

type

  TcxPopupShowingType = (stClick, stMouseOver);

procedure PopupSubscript(AName: string; AShowingType: TcxPopupShowingType);

Description

The PopupSubscript method is used to add a new HTML element name specified by the AName parameter to a list of HTML element names, which are designed to activate the popup menu.  The AShowingType parameter specifies a user;s action which forces the popup menu to appear.

Value	Meaning
stClick	Popup menu appears when an HTML element is clicked by the mouse
stMouseOver	Popup menu appears when a user first moves the mouse cursor over an HTML element.
Note:  HTML element names, which are subscribed to the popup menu by the PopupSubscript method can be obtained via the SubscriptedClickedArea or SubscriptedCoveredArea properties.


TcxWebPopupMenu.PopupUnsubscript

TcxWebPopupMenu          See Also

Unsubscribes a specific HTML element from using a popup menu.

procedure PopupUnsubscript(AName: string; AShowingType: TcxPopupShowingType);

Description

The PopupUnsubscript method is used to delete an HTML element name specified by the AName parameter from a list of HTML element names, which are designed to activate the popup menu.  The AShowingType parameter specifies whether to remove the name from the SubscriptedClickedArea or SubscriptedCoveredArea properties.

Value	Meaning
stClick	The specified HTML element is removed from the SubscriptedClickedArea property.
stMouseOver	The specified HTML element is removed from the SubscriptedCoveredArea property.
Note:  The SubscriptedClickedArea or SubscriptedCoveredArea properties can be used to obtain HTML element names, which are subscribed to the popup menu by the PopupSubscript method.


TcxWebPopupMenu.RegisterActions

TcxWebPopupMenu          See Also

Registers server side events, which can be handled by the popup menu.

procedure RegisterActions; override;

Description

The RegisterActions method registers two actions for a popup menu: the default and the "CLICK" action.  Both are designed to register a server side handler for the OnClick event used by the TcxWebMenuItem class.

Note: It is recommended to register an event with an empty string name.  This allows EWF to avoid errors, when the __ACTIONNAME hidden input (specifying the event name) is transmitted empty.  An error should only occur if the __TARGETNAME hidden input (specifying the component) is not empty.


TcxWebPopupMenu.RegisterRenderers

TcxWebPopupMenu          See Also

Registers renderer classes, which render the HTML code representing the popup menu component for a particular browser.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers three renderer classes which should render the HTML code representing the popup menu component for a particular browser (two different versions of Internet Explorer and Netscape Navigator).  This provides multi-browser support.


TcxWebPopupMenu.ScriptsSubscription

TcxWebPopupMenu          See Also

Subscribes the popup menu component to the required scripts.

procedure ScriptsSubscription; override;

Description

The ScriptsSubscription method implements the ScriptsSubscription method of the IcxWebScripts interface.  It is designed to register TcxWebScript descendant classes, which represent the scripts required for component functionality.

The ScriptsSubscription method performs subscription to two scripts.  This method registers two TcxWebScript descendant classes, which represent the PostBack and Init scripts, required for popup menu functionality.


TcxWebPopupMenu.SetChildOrder

TcxWebPopupMenu

Ensures that menu item indexes reflect the order in which they are loaded and saved.

procedure SetChildOrder(Child: TComponent; Order: Integer); override;

Description

The SetChildOrder method is called automatically when a popup menu is loaded into memory.  The Child parameter specifies the child object that was loaded.  The Order parameter specifies the order in which it was loaded.  The SetChildOrder method assigns the MenuIndex for each child to match the order in which the items are loaded.


GetContainerControlBounds
GetContainerControlBounds Function

Returns the bounding rectangle of a container control, expressed in the coordinate system of its parent control.

Unit

cxWebControls

function GetContainerControlBounds(const AControl: IcxWebContainerControl): TRect;

Description

Use the GetContainerControlBounds function to return the pixel locations of all corners of a container control passed via the AControl parameter all at once.  The origin of the pixel coordinate system is in the top left corner of the container control’s parent.


TcxWebControlState
TcxWebControlState type

Specifies the state of a web control.

Unit

cxWebControls

type

  TcxWebControlState = (wcsReadingState);

  TcxWebControlStates = set of TcxWebControlState;

Description

The TcxWebControlStates type is a set of TcxWebControlState values.  TcxWebControlState can have one or more of the following values:

Value	Meaning
wcsReadingState	The control’s data is being read from a stream.

Values of type TcxWebControlStates are used to set the ControlState property of a web control.


TcxWebControlStyle
TcxWebControlStyle type

Specifies appropriate modes for a web control.

Unit

cxWebControls

type

  TcxWebControlStyle = (wcsAcceptsControls, wcsFixedHeight, wcsFixedWidth);

  TcxWebControlStyles = set of TcxWebControlStyle;

Description

The TcxWebControlStyles type is a set of TcxWebControlStyle values.  The TcxWebControlStyle type can have one or more of the following values:

Value	Meaning
wcsAcceptsControls	Control can be the parent of any controls dropped on it
wcsFixedHeight	Control’s height has a fixed value and it cannot be changed.
wcsFixedWidth	Control’s width has a fixed value and it cannot be changed.

Values of the TcxWebControlStyles type are used to set the ControlStyle property of a web control.


TcxWebHorzAlignment
TcxWebHorzAlignment type

Specifies horizontal text alignment within a web control.

Unit

cxWebControls

TcxWebHorzAlignment = (whalLeft, whalCenter, whalRight, whalJustify, whalChar);

Description

The TcxWebHorzAlignment type contains values which can be used to specify horizontal text alignment within a specific web control (for instance, within a web label control).  The TcxWebHorzAlignment type can have one of the following values:

Value	Meaning
whalLeft	Text is left-justified: All lines begin at the left edge of a web control.
whalCenter	Text is horizontally centered within a web control.
whalRight	Text is right-justified: All lines end at the right edge of a web control.
whalJustify	Text is aligned to both the left and right edges of a web control.
whalChar	Reserved for future use.

TcxWebHorzAlignment value types are used to set the Alignment properties of the TcxWebColumn and TcxCustomWebLabel objects.


TcxWebVertAlignment
TcxWebVertAlignment type

Specifies vertical text alignment within a web control.

Unit

cxWebControls

TcxWebVertAlignment = (wvalTop, wvalCenter, wvalBottom, wvalBaseLine);

Description

The TcxWebVertAlignment type contains values which can be used to specify vertical text alignment within a specific web control.  The TcxWebVertAlignment type can have one of the following values:

Value	Meaning
wvalTop	Top of the text is aligned with the top of the tallest item in the line.
wvalCenter	Text is vertically centered within a web control.
wvalBottom	Bottom of the text is aligned with the bottom of a web control.
wvalBaseLine	Baseline (or bottom) of the text is aligned with the baseline of a web control.

TcxWebVertAlignment value types are used to set the VAlignment property of the TcxWebColumn object.


cxWebHorzAlignment constant
cxWebHorzAlignment global constant

Unit

cxWebControls

const cxWebHorzAlignment : array[TcxWebHorzAlignment] of string = ('left', 'center', 'right', 'justify', 'char');

Description

The cxWebHorzAlignment array constant holds an array of strings representing HTML equivalents for the TcxWebHorzAlignment type values which specify horizontal text alignment within a web control.


cxWebVertAlignment constant
cxWebVertAlignment global constant

Unit

cxWebControls

const cxWebVertAlignment : array[TcxWebVertAlignment] of string = ('top', 'middle', 'bottom', 'baseline');

Description

The cxWebVertAlignment array constant holds an array of strings representing the HTML equivalents for the TcxWebVertAlignment type values which specify vertical text alignment within a web control.


TcxWebDBLabel
 TcxWebDBLabel Object

Hierarchy          Properties          Methods          Events

Represents a data-aware label control.

Unit

cxWebDataCtrls

TcxWebDBLabel = class(TcxCustomWebLabel, IcxWebDataSourceSupport, IcxWebViewDataSupport)

Description

Use the TcxWebDBLabel control to display the contents of a dataset field.  It displays the field value of the current record within the associated dataset.  An end user cannot modify field values displayed by the TcxWebDBLabel control. To allow a user to edit the field value, use TcxWebDBEdit or TcxWebDBMemo instead. The currently displayed field value can be obtained via the Caption property of the label control.

If the application does not require the data-aware capabilities of the TcxWebDBLabel control, use the label component (TcxWebLabel) instead.


TcxWebDBLabel Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxCustomWebLabel


Properties for TcxWebDBLabel
TcxWebDBLabel Properties

TcxWebDBLabel          Legend

In TcxWebDBLabel

DataBinding

Derived from TcxCustomWebLabel

Alignment

AutoSize

Text

WordWrap

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebDBLabel
TcxWebDBLabel Methods

TcxWebDBLabel          Legend

In TcxWebDBLabel

Destroy

GetDataBinding

RegisterRenderers

ScriptsSubscription

SetData

Derived from TcxCustomWebLabel

Create

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

SetBounds

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterActions

RegisterEvents

RegisterValues

SetState

ValidateContainer


Events for TcxWebDBLabel
TcxWebDBLabel Events

TcxWebDBLabel          Legend

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebDBLabel.DataBinding

TcxWebDBLabel          See Also

Binds the label control to a dataset field.

property DataBinding: TcxWebDataBinding;

Description

Use the DataBinding property to bind a label to a dataset field.  You should specify two properties of the TcxWebDataBinding class for this purpose.  The DataSource property specifies the data source connected to a dataset containing the desired field.  You should use either the TcxStdWebDataSource, TcxWebDataSource or TcxWebDBDataSource component to set the value for this property.  The FieldName property of the TcxWebDataBinding object specifies the name of the field to which the label control is bound.

The TcxWebDBLabel control delegates the implementation of the IcxWebDataSourceSupport interface to the TcxWebDataBinding class via the DataBinding property.


TcxWebDBLabel.Destroy

TcxWebDBLabel          See Also

Destroys the TcxWebDBLabel object.

destructor Destroy; override;

Description

The Destroy method disposes of the TcxWebDBLabel control and frees resources it allocated.  It frees the DataBinding property before calling the inherited destructor.

Do not use the Destroy method to delete the label control.  Use the Free method instead.


TcxWebDBLabel.GetDataBinding

TcxWebDBLabel          See Also

Returns the DataBinding property value.

function GetDataBinding: TcxWebDataBinding; virtual;

Description

The GetDataBinding method is used to return the value of the DataBinding property.  If this property value is nil, it initializes it a newly created TcxWebDataBinding object.

You can override this method in descendant classes as your needs dictate.


TcxWebDBLabel.RegisterRenderers

TcxWebDBLabel          See Also

Registers renderer classes that generate HTML code representing the data-aware label control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers two classes used to render the HTML code for the data-aware label.  These classes render HTML code representing the control in Internet Explorer and Netscape Navigator 4.0.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for a label control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxWebDBLabel.ScriptsSubscription

TcxWebDBLabel          See Also

Subscribes the data-aware label control to client side scripts required for proper functionality.

procedure ScriptsSubscription; override;

Description

The ScriptsSubscription method subscribes the data-aware label control to a post back script.  In addition, it calls the inherited ScriptsSubscription method.

This method implements the ScriptsSubscription method of the IcxWebScripts interface.  You can override this method in descendant classes to subscribe your control to additional scripts.


TcxWebDBLabel.SetData

TcxWebDBLabel          See Also

Sets the properties of the control with respect to values of the field it is bound to.

procedure SetData(Value: Variant);

Description

This method implements the SetData method of the IcxWebViewDataSupport interface.  It is designed to update the property values of the data-aware label with respect to the value of the dataset field to which it is bound.  The value of the field is transmitted as the Value parameter.  As implemented in the TcxWebDBLabel class, the SetData method assigns the parameter value to the Caption property.


TcxWebDBListBox
 TcxWebDBListBox Object

Hierarchy          Properties          Methods          Events

Represents a data-aware list box control.

Unit

cxWebDataCtrls

TcxWebDBListBox = class(TcxCustomWebListBox, IcxWebDataSourceSupport, IcxWebUpdateDataSupport, IcxWebViewDataSupport)

Description

Use the TcxWebDBListBox control to add a data-aware list box onto a web page.  This control allows end users to change values of the associated field by selecting an item from a list.  The TcxWebDBListBox control is bound to a field via the DataBinding property.

If the application doesn’t require the data-aware capabilities of the TcxWebDBListBox control, use the TcxWebListBox control instead.

Note that the multi-select feature is disabled for data-aware list box control.


TcxWebDBListBox Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxWebFormControl

     |

TcxCustomWebListBox


Properties for TcxWebDBListBox
TcxWebDBListBox Properties

TcxWebDBListBox          Legend

In TcxWebDBListBox

DataBinding

Derived from TcxCustomWebListBox

ItemHeight

ItemIndex

Items

MinSize

MultiSelect

SelCount

Size

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebDBListBox
TcxWebDBListBox Methods

TcxWebDBListBox          Legend

In TcxWebDBListBox

CanGetData

Destroy

GetData

GetDataBinding

RegisterRenderers

ScriptsSubscription

SetData

Derived from TcxCustomWebListBox

CheckItemIndex

CheckNewSize

Clear

Create

DoChange

DoSetValues

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetItemIndex

GetMinHeight

GetMinSize

GetSize

RegisterActions

RegisterEvents

RegisterValues

SetItemIndex

SetSize

StyleChanged

Derived from TcxWebFormControl

 	RegisterEvents

 	ScriptsSubscription

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

Create

Destroy

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

RegisterRenderers

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterActions

RegisterValues

SetState

ValidateContainer


Events for TcxWebDBListBox
TcxWebDBListBox Events

TcxWebDBListBox          Legend

Derived from TcxCustomWebListBox

OnChange

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebDBListBox.DataBinding

TcxWebDBListBox          See Also

Binds the list box control to a dataset field.

property DataBinding: TcxWebDataBinding;

Description

Use the DataBinding property to bind the list box to a dataset field.  You should specify two properties for the TcxWebDataBinding class for this purpose.  The DataSource property specifies the data source connected to a dataset containing the desired field.  You should either use the TcxStdWebDataSource, TcxWebDataSource or TcxWebDBDataSource component to set the value for this property.  The FieldName property of the TcxWebDataBinding object specifies the name of the field to which the check box control is bound.  If at least one of these properties is not set or set incorrectly, the data-aware list box control will act like the TcxWebListBox control.


TcxWebDBListBox.CanGetData

TcxWebDBListBox          See Also

Returns a value identifying whether the list box control can return the data it displays.

function CanGetData: Boolean;

Description

This method implements the CanGetData method of the IcxWebUpdateDataSupport interface.  It is designed to determine whether the control has transmitted its data within the request.  Since the data-aware list box is represented by the SELECT tag, it always transmits its data within the request.  Thus the CanGetData method of the TcxWebDBListBox control always returns True.

The CanGetData method’s return value is used to determine whether the GetData method should be called.


TcxWebDBListBox.Destroy

TcxWebDBListBox          See Also

Destroys the TcxWebDBListBox control.

destructor Destroy; override;

Description

The Destroy method is used to dispose of the TcxWebDBListBox control and free any allocated memory.  It frees the DataBinding property before calling the inherited destructor.

Do not use the Destroy method to delete the list box control.  Use the Free method instead.


TcxWebDBListBox.GetData

TcxWebDBListBox          See Also

Gets data, displayed by the list box control, in order to update the associated data source.

function GetData: Variant;

Description

Each time values of data-aware controls are posted, the associated data source should be updated.  The data source scans through all of its clients for this purpose and gets their data.  It calls the GetData method of the IcxWebUpdateDataSupport interface implemented by data-aware controls.  The GetData method of the TcxWebDBListBox control implements this method.

The GetData method returns the text of the selected item.  If no item is selected, it returns null.

The GetData method is called only if the CanGetData method returns True.


TcxWebDBListBox.GetDataBinding

TcxWebDBListBox          See Also

Returns the DataBinding property value.

function GetDataBinding: TcxWebDataBinding; virtual;

Description

The GetDataBinding method is used to return the value of the DataBinding property.  If this property value is nil, it initializes it with a newly created TcxWebDataBinding object.

You can override this method in descendant classes as your needs dictate.


TcxWebDBListBox.RegisterRenderers

TcxWebDBListBox          See Also

Registers renderer classes that generate HTML code representing the data-aware list box control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers two classes used to render the HTML code for the data-aware list box.  These classes render HTML code representing the control in Internet Explorer and Netscape Navigator 4.0.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for a list box control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxWebDBListBox.ScriptsSubscription

TcxWebDBListBox          See Also

Subscribes the data-aware list box control to client side scripts required for proper functionality.

procedure ScriptsSubscription; override;

Description

The ScriptsSubscription method subscribes the data-aware list box control to a post back script.  In addition, it calls the inherited ScriptsSubscription method.

This method implements the ScriptsSubscription method of the IcxWebScripts interface.  You can override this method in descendant classes to subscribe your control to additional scripts.


TcxWebDBListBox.SetData

TcxWebDBListBox          See Also

Sets the properties of the control with respect to a value of the field to which it is bound.

procedure SetData(Value: Variant);

Description

This method implements the SetData method of the IcxWebViewDataSupport interface.  It is designed to update the properties of the database list box with respect to the value of the dataset field to which it is bound.  The value of the field is transmitted as the Value parameter.  As implemented in the TcxWebDBListBox class, the SetData method updates the value of the ItemIndex property.


TcxWebDBMemo
 TcxWebDBMemo Object

Hierarchy          Properties          Methods          Events

Represents a data-aware memo control.

Unit

cxWebDataCtrls

TcxWebDBMemo = class(TcxCustomWebMemo, IcxWebDataSourceSupport, IcxWebUpdateDataSupport, IcxWebViewDataSupport)

Description

Use the TcxWebDBMemo control to add a data-aware memo onto a web page.  This control allows end users to edit field values that contain lengthy text data.  You can also use it only to display the contents of such a field. The TcxWebDBMemo control uses the Text property to represent the contents of the field.  The DataBinding property is used to bind the control to a dataset field.

Consider using a TcxWebDBEdit control if field values don’t contain lengthy data.  If the application doesn’t require the data-aware capabilities of the TcxWebDBMemo control, use the TcxWebMemo control instead.


TcxWebDBMemo Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxWebFormControl

     |

TcxCustomWebEdit

     |

TcxCustomWebMemo


Properties for TcxWebDBMemo
TcxWebDBMemo Properties

TcxWebDBMemo          Legend

In TcxWebDBMemo

DataBinding

Derived from TcxCustomWebMemo

Cols

Lines

Rows

WordWrap

Derived from TcxCustomWebEdit

MaxLength

Password

ReadOnly

Size

Text

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebDBMemo
TcxWebDBMemo Methods

TcxWebDBMemo          Legend

In TcxWebDBMemo

CanGetData

Destroy

GetData

GetDataBinding

RegisterRenderers

ScriptsSubscription

SetData

Derived from TcxCustomWebMemo

CheckNewSize

Create

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetText

SetText

Derived from TcxCustomWebEdit

DoSetValues

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

RegisterValues

StyleChanged

Derived from TcxWebFormControl

 	RegisterEvents

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

GetColor

GetDefaultColor

GetHorzBordersSize

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterActions

SetState

ValidateContainer


Events for TcxWebDBMemo
TcxWebDBMemo Events

TcxWebDBMemo          Legend

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebDBMemo.DataBinding

TcxWebDBMemo          See Also

Binds the memo control to a dataset field.

property DataBinding: TcxWebDataBinding;

Description

Use the DataBinding property to bind the memo to a field of a dataset.  You should specify two properties of the TcxWebDataBinding class for this purpose.  The DataSource property specifies the data source connected to a dataset containing the desired field.  You should either use the TcxStdWebDataSource, TcxWebDataSource or TcxWebDBDataSource component to set the value for this property.  The FieldName property of the TcxWebDataBinding object specifies the name of the field to which the memo control is bound.


TcxWebDBMemo.CanGetData

TcxWebDBMemo          See Also

Designed to return a value indicating whether a data-aware control can provide values it displays.

function CanGetData: Boolean;

Description

This method implements the CanGetData method of the IcxWebUpdateDataSupport interface.  It is designed to determine whether the control has transmitted its data within the request.  Since the data-aware memo is represented by the TEXTAREA tag, it always transmits its data within the request.  Thus the CanGetData method of the TcxWebDBMemo control simply returns True.

The CanGetData method’s return value is used to determine whether the GetData method should be called.


TcxWebDBMemo.Destroy

TcxWebDBMemo          See Also

Destroys the TcxWebDBMemo control.

destructor Destroy; override;

Description

The Destroy method is used to dispose of the TcxWebDBMemo control and free any allocated memory.  It frees the DataBinding property before calling the inherited destructor.

Do not use the Destroy method to delete the check edit control.  Use the Free method instead.


TcxWebDBMemo.GetData

TcxWebDBMemo          See Also

Gets data displayed by the memo control to update the associated data source.

function GetData: Variant;

Description

Each time values of data-aware controls are posted, the associated data source should be updated.  The data source scans through all of its clients for this purpose and gets their data.  It calls the GetData method of the IcxWebUpdateDataSupport interface implemented by data-aware controls.  The GetData method of the TcxWebDBMemo control implements this method.

The GetData method returns the value of the Text property.

The GetData method is called only if the CanGetData method returns True.


TcxWebDBMemo.GetDataBinding

TcxWebDBMemo          See Also

Returns the DataBinding property value.

function GetDataBinding: TcxWebDataBinding; virtual;

Description

The GetDataBinding method is used to return the value of the DataBinding property.  If this property value is nil, it initializes it with a newly created TcxWebDataBinding object.

You can override this method in descendant classes as your needs dictate.


TcxWebDBMemo.RegisterRenderers

TcxWebDBMemo          See Also

Registers renderer classes that generate HTML code representing the data-aware memo control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers two classes used to render the HTML code for the data-aware memo control.  These classes render HTML code representing the control in Internet Explorer and Netscape Navigator 4.0.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for a memo control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxWebDBMemo.ScriptsSubscription

TcxWebDBMemo          See Also

Subscribes the data-aware memo control to client side scripts required for proper functionality.

procedure ScriptsSubscription; override;

Description

The ScriptsSubscription method subscribes the data-aware memo control to a post back script.  In addition, it calls the inherited ScriptsSubscription method.

This method implements the ScriptsSubscription method of the IcxWebScripts interface.  You can override this method in descendant classes to subscribe your control to additional scripts.


TcxWebDBMemo.SetData

TcxWebDBMemo          See Also

Sets the properties of the control with respect to a value of the field to which it is bound.

procedure SetData(Value: Variant);

Description

This method implements the SetData method of the IcxWebViewDataSupport interface.  It is designed to update the properties of the data-aware memo control with respect to the value of the dataset field it is bound to.  The value of the field is transmitted as the Value parameter.  As implemented in the TcxWebDBMemo class, the SetData method assigns the parameter value to the Text property.


TcxWebDBRadioGroup
 TcxWebDBRadioGroup Object

Hierarchy          Properties          Methods          Events

Represents a data-aware radio group control.

Unit

cxWebDataCtrls

TcxWebDBRadioGroup = class(TcxCustomWebRadioGroup, IcxWebDataSourceSupport, IcxWebUpdateDataSupport, IcxWebViewDataSupport)

Description

Use the TcxWebDBRadioGroup control to place a data-aware radio group control onto a web page.  When a radio button is checked, all other radio buttons in its group become unchecked.  Database radio groups provide an easy way to ensure that an end user enters one (or at most one) of the options presented for a field.  They are also useful for displaying data from fields that have only a few possible values.

When the user selects a radio button, the "value" of the selected button becomes the contents of the linked field for the current record in the dataset.  The "value" of a radio button is specified by the corresponding string within the Items property.

If the application doesn’t require the data-aware capabilities of the TcxWebDBRadioGroup control, use the TcxWebRadioGroup control instead, to conserve system resources.


TcxWebDBRadioGroup Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxWebFormControl

     |

TcxCustomWebRadioGroup


Properties for TcxWebDBRadioGroup
TcxWebDBRadioGroup Properties

TcxWebDBRadioGroup          Legend

In TcxWebDBRadioGroup

DataBinding

Derived from TcxCustomWebRadioGroup

ItemHeight

ItemIndex

Items

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebDBRadioGroup
TcxWebDBRadioGroup Methods

TcxWebDBRadioGroup          Legend

In TcxWebDBRadioGroup

CanGetData

Destroy

GetData

GetDataBinding

RegisterRenderers

ScriptsSubscription

SetData

Derived from TcxCustomWebRadioGroup

Create

DoClick

DoSetValues

GetMaxHeight

GetMinHeight

RegisterActions

RegisterEvents

RegisterValues

StyleChanged

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

Create

Destroy

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxWidth

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

SetState

ValidateContainer


Events for TcxWebDBRadioGroup
TcxWebDBRadioGroup Events

TcxWebDBRadioGroup          Legend

In TcxCustomWebRadioGroup

OnClick

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebDBRadioGroup.DataBinding

TcxWebDBRadioGroup          See Also

Binds the TcxWebDBRadioGroup control to a dataset field.

property DataBinding: TcxWebDataBinding;

Description

Use the DataBinding property to bind the TcxWebDBRadioGroup control to a field within a dataset.  You should specify two properties of the TcxWebDataBinding class for this purpose.  The DataSource property specifies the data source connected to a dataset containing the desired field.  You should use either the TcxStdWebDataSource, TcxWebDataSource or TcxWebDBDataSource component to set the value of this property.  The FieldName property of the TcxWebDataBinding object specifies the name of the field to which the check box control is bound.  If at least one of these properties is not set or set incorrectly, the radio group will act like it is not data-aware.


TcxWebDBRadioGroup.CanGetData

TcxWebDBRadioGroup          See Also

Returns a value identifying whether the radio group control can return data it displays.

function CanGetData: Boolean;

Description

This method implements the CanGetData method of the IcxWebUpdateDataSupport interface.  It is designed to determine whether the control has transmitted its data within the request.  Since the data-aware radio group is represented by INPUT tags, it always transmits its data within the request.  Thus the CanGetData method of the TcxWebDBRadioGroup control simply returns True.

The CanGetData method’s return value is used to determine whether the GetData method should be called.


TcxWebDBRadioGroup.Destroy

TcxWebDBRadioGroup          See Also

Destroys the TcxWebDBRadioGroup control.

destructor Destroy; override;

Description

The Destroy method is used to dispose of the TcxWebDBRadioGroup control and free any allocated memory.  If frees the DataBinding property before calling the inherited destructor.

Do not use the Destroy method to delete the radio group control.  Use the Free method instead.


TcxWebDBRadioGroup.GetData

TcxWebDBRadioGroup          See Also

Gets data displayed by the radio group control to update the associated data source.

function GetData: Variant;

Description

Each time values of data-aware controls are posted, the associated data source should be updated.  The data source scans through all of its clients for this purpose and gets their data.  It calls the GetData method of the IcxWebUpdateDataSupport interface implemented by data-aware controls.  The GetData method of the TcxWebDBRadioGroup control implements this method.

The GetData method returns the string corresponding to the selected button.  Strings corresponding to buttons are specified via the Items property.

The GetData method is called only if the CanGetData method returns True.


TcxWebDBRadioGroup.GetDataBinding

TcxWebDBRadioGroup          See Also

Returns the DataBinding property value.

function GetDataBinding: TcxWebDataBinding; virtual;

Description

The GetDataBinding method is used to return the value of the DataBinding property.  If this property value is nil, it initializes it with a newly created TcxWebDataBinding object.

You can override this method in descendant classes as your needs dictate.


TcxWebDBRadioGroup.RegisterRenderers

TcxWebDBRadioGroup          See Also

Registers renderer classes that generate HTML code representing the data-aware check box control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers two classes used to render the HTML code for the data-aware radio group.  These classes render HTML code representing the control in Internet Explorer and Netscape Navigator 4.0.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for a radio group control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxWebDBRadioGroup.ScriptsSubscription

TcxWebDBRadioGroup          See Also

Subscribes the database radio group control to client side scripts required for proper functionality.

procedure ScriptsSubscription; override;

Description

The ScriptsSubscription method subscribes the database radio group control to a post back script.  In addition, it calls the inherited ScriptsSubscription method.

This method implements the ScriptsSubscription method of the IcxWebScripts interface.  You can override this method in descendant classes to subscribe your control to additional scripts.


TcxWebDBRadioGroup.SetData

TcxWebDBRadioGroup          See Also

Sets the values of the control with respect to a value of the field to which it is bound.

procedure SetData(Value: Variant);

Description

This method implements the SetData method of the IcxWebViewDataSupport interface.  It is designed to update the properties of the database radio group with respect to the value of the dataset field to which it is bound.  The value of the field is transmitted as the Value parameter.

The SetData method sets the ItemIndex property to a proper value.


TcxWebGridColumnDataBinding
TcxWebGridColumnDataBinding Object

Hierarchy          Properties          Methods

Represents data binding object for TcxWebDBGrid columns.

Unit

cxWebDataCtrls

TcxWebGridColumnDataBinding = class(TcxAbstractWebDataBinding)

Description

Data-aware controls are bound to data sources by means of data binding objects.  These objects provide interfaces between controls and data sources.  This means that data binding objects store information about both the control and the associated data source.  The TcxWebGridColumnDataBinding object provides the WebDBColumn and DataSource properties for this purpose.

As the descendants of the TcxAbstractWebDataBinding class, the TcxWebGridColumnDataBinding class implements its abstract GetDataSource method.


TcxWebGridColumnDataBinding Hierarchy
Hierarchy

TPersistent

     |

TcxAbstractWebDataBinding


Properties for TcxWebGridColumnDataBinding
TcxWebGridColumnDataBinding Properties

TcxWebGridColumnDataBinding          Legend

In TcxWebGridColumnDataBinding

DataSource

FieldIndex

FieldName

KeyFieldIndex

ListFieldIndex

ListSource

WebDBColumn

Derived from TcxAbstractWebDataBinding

Component


Methods for TcxWebGridColumnDataBinding
TcxWebGridColumnDataBinding Methods

TcxWebGridColumnDataBinding          Legend

In TcxWebGridColumnDataBinding

Assign

GetDataSource

Derived from TcxAbstractWebDataBinding

Create


TcxWebGridColumnDataBinding.DataSource

TcxWebGridColumnDataBinding          See Also

Specifies the data source, to which the TcxWebDBColumn is bound.

property DataSource: TcxCustomWebDataSource;

Description

The DataSource property is used to specify a data source component, to which the associated column is bound.  This property is automatically set to the value specified by the DataSource property of the associated TcxWebGridDataBinding object.  This object stands for the DataBinding property of the TcxWebDBGrid control owning the column.

ReadOnly Property


TcxWebGridColumnDataBinding.FieldIndex

TcxWebGridColumnDataBinding          See Also

Returns index of the field to which the associated column is bound.

function FieldIndex: Integer;

Description

The FieldIndex method is used to obtain the index of the data source field, to which the column is bound.  Columns are bound to fields via the FieldName property.  In other words the FieldIndex method returns the index of the field specified by the FieldName property.


TcxWebGridColumnDataBinding.KeyFieldIndex

TcxWebGridColumnDataBinding

Returns index of the lookup field which bounds the edited field to the lookup dataset.

function KeyFieldIndex: Integer;

Description

The KeyFieldIndex method is used to obtain the index of the lookup field that contains the same values as the edited field.  This field is specified via the KeyFieldName property.  Field index can be used to access dataset values via the DisplayTexts property of a data source, for instance.


TcxWebGridColumnDataBinding.ListFieldIndex

TcxWebGridColumnDataBinding

Returns index of the lookup field whose values are displayed within the editor and its dropdown window.

function ListFieldIndex: Integer;

Description

The ListFieldIndex property is used to obtain the index of the lookup field containing descriptive values for the edited field.  This field is specified via the ListFieldName property.  Field index can be used to access dataset values via the DisplayTexts property of a data source, for instance.


TcxWebGridColumnDataBinding.ListSource

TcxWebGridColumnDataBinding          See Also

Specifies the data source providing lookup data for the associated column.

property ListSource: TcxCustomWebDataSource;

Description

Use the ListSource property to assign a lookup dataset to the column.  The specified dataset must provide two fields to bind the edited field with the lookup data source and provide display values for the lookup editor dropdown window.  These fields are specified via the KeyFieldName and ListFieldName properties respectively.

The ListSource property can be set to any TcxCustomWebDataSource descendant.  Available descendants are the TcxStdWebDataSource, TcxWebDataSource and TcxWebDBDataSource components.

All the mentioned properties are not in effect (the column doesn’t act like lookup column) if the column’s ViewType property value is not cvtLookup.


TcxWebGridColumnDataBinding.FieldName

TcxWebGridColumnDataBinding          See Also

Binds the associated column to a data source field.

property FieldName: string;

Description

The FieldName property is used to specify the field, to which the column is bound.  The field belongs to the data source component, specified by the DataSource property.


TcxWebGridColumnDataBinding.KeyFieldName

TcxWebGridColumnDataBinding          See Also

Specifies the lookup dataset field which bounds the edited field to the lookup dataset.

property KeyFieldName: string;

Description

Set the KeyFieldName property to the name of the lookup field containing the same values as the edited field.  This allows to find a record within the lookup dataset which corresponds to the edited field value.  The value substituted to the lookup editor is taken from the field specified via the ListFieldName property.  Values of these field are also displayed within the dropdown window which allows to select the desired record.

This property is not in effect if the associated column’s ViewType property value is not cvtLookup.


TcxWebGridColumnDataBinding.ListFieldName

TcxWebGridColumnDataBinding          See Also

Specifies the lookup field whose values are displayed within the lookup editor and its dropdown window.

property ListFieldName: string;

Description

Lookup editors are used to substitute edited values with values from another dataset’s field.  Suppose edited values are IDs of some objects, while some table contains these IDs with corresponding descriptions.  Substituting edited IDs with their descriptions makes editing easier.

The ListFieldName property specifies the field whose values are substituted into the lookup editor and displayed within its dropdown window.  The field containing IDs used to find a substitute is specified by the KeyFieldName property.  Both these fields are from the data source specified via the ListSource property.

This property is not in effect if the associated column’s ViewType property value is not cvtLookup.


TcxWebGridColumnDataBinding.WebDBColumn

TcxWebGridColumnDataBinding          See Also

Provides access to the column which uses the TcxWebGridColumnDataBinding object to access dataset field values.

property WebDBColumn: TcxWebDBColumn;

Description

The WebDBColumn property is used to obtain access to the column of the TcxWebDBGrid control.  This column uses the TcxWebGridColumnDataBinding object to access dataset field values.  The value of the WebDBColumn property is initialized in the constructor.

ReadOnly Property


TcxWebGridColumnDataBinding.Assign

TcxWebGridColumnDataBinding          See Also

Assigns the contents of one TcxWebGridColumnDataBinding object to another.

procedure Assign(Source: TPersistent); override;

Description

The Assign method is used to assign the contents of one object to another.  The Source parameter represents the source object.  The caller is the destination object.

The Assign method checks whether the Source parameter has a TcxWebGridColumnDataBinding type.  If so, it assigns the FieldName property value of the source object to the destination object.


TcxWebGridColumnDataBinding.GetDataSource

TcxWebGridColumnDataBinding          See Also

Returns the value of the DataSource property.

function GetDataSource: TcxCustomWebDataSource; override;

Description

The GetDataSource method returns the data source component to which the column is bound.  It retrieves the data source component which is used by the grid control (owning the column), to perform the task.


TcxWebGridDataBinding
TcxWebGridDataBinding Object

Hierarchy          Properties          Methods

Binds the TcxWebDBGrid control to data.

Unit

cxWebDataCtrls

TcxWebGridDataBinding = class(TcxCustomWebDataBinding)

Description

Data-aware controls are bound to data sources by means of data binding objects.  These objects provide interfaces between controls and data sources.  This means that data binding objects store information about both the control and the associated data source.  The TcxWebGridDataBinding object provides the WebGrid and DataSource properties for this purpose.

Each column of the TcxWebDBGrid control (represented by the TcxWebDBColumn object) is bound to a dataset field with the help of the TcxWebGridColumnDataBinding object.


TcxWebGridDataBinding Hierarchy
Hierarchy

TPersistent

     |

TcxAbstractWebDataBinding

     |

TcxCustomWebDataBinding


Properties for TcxWebGridDataBinding
TcxWebGridDataBinding Properties

TcxWebGridDataBinding          Legend

In TcxWebGridDataBinding

WebGrid

Derived from TcxCustomWebDataBinding

DataSource

Derived from TcxAbstractWebDataBinding

Component


Methods for TcxWebGridDataBinding
TcxWebGridDataBinding Methods

TcxWebGridDataBinding          Legend

In TcxWebGridDataBinding

ChangedDataLayout

GetFirstVisibleRow

GetPageSize

UpdateData

Derived from TcxCustomWebDataBinding

Assign

GetDataSource

GetFieldIndex

SetDataSource

WriteScripts

Derived from TcxAbstractWebDataBinding

Create


TcxWebGridDataBinding.WebGrid

TcxWebGridDataBinding          See Also

Provides access to the associated TcxWebDBGrid control.

property WebGrid: TcxWebDBGrid;

Description

The WebGrid property is used to obtain access to the associated TcxWebDBGrid control.  The value of this property is initialized in the constructor.

ReadOnly Property


TcxWebGridDataBinding.ChangedDataLayout

TcxWebGridDataBinding          See Also

Responds to data changes occurring in the associated dataset.

procedure ChangedDataLayout; override;

Description

This method implements the ChangedDataLayout method of the IcxWebDataSourceSupport interface.  It reloads the data to the associated TcxWebDBGrid control in response to changes in the associated dataset.


TcxWebGridDataBinding.GetFirstVisibleRow

TcxWebGridDataBinding          See Also

Returns the index of the first row visible in the TcxWebDBGrid control.

function GetFirstVisibleRow: Integer; override;

Description

Data-aware controls can display values for more than one row at a time (grid control).  The GetFirstVisibleRow method is used to determine the index of the top row currently displayed by a control.  It is required to properly render the code for data-aware controls.

The GetFirstVisibleRow method is used in conjunction with the GetPageSize method.  These method return values are used to determine whether a post back is required when navigating through a dataset.  If the current record index is greater than the index of the first visible row plus the page size or less than the first visible row index, a post back is required.  This is not applicable when the data source is in Load All Records mode (since post backs are not required at all in such an instance).

As implemented in the TcxWebGridDataBinding class, this method returns the associated TcxWebDBGrid control’s FirstVisibleRow property value.


TcxWebGridDataBinding.GetPageSize

TcxWebGridDataBinding          See Also

Returns the number of rows whose values can be displayed by the associated grid control at once.

function GetPageSize: Integer; override;

Description

Data-aware controls can display values of more than one row at a time (grid control).  The GetPageSize method is used to determine the number of records displayed by the associated control at a time.  It is needed to render the code for data-aware controls properly.

The GetPageSize method is used in conjunction with the GetFirstVisibleRow method.  These method return values are used to determine whether a post back is required when navigating through a dataset.  If the current record index is greater than the index of the first visible row plus the page size or less than the first visible row index, a post back is required.  This is not applicable when the data source is in Load All Records mode (since post backs are not required at all in such a case).

As implemented in the TcxWebGridDataBinding class, this method returns the associated TcxWebDBGrid control’s PageSize property value.


TcxWebGridDataBinding.UpdateData

TcxWebGridDataBinding          See Also

Designed to respond to TcxWebDBGrid value changes in order to update the associated dataset.

procedure UpdateData; override;

Description

The UpdateData method updates the associated dataset when the values of the TcxWebDBGrid control change.  It writes its data to the dataset to which it is bound.

This method implements the UpdateData method of the IcxWebDataSourceSupport interface


cxWebDataNavigator Unit Overview
cxWebDataNavigator Unit

Classes

TcxCustomWebDataNavigator

TcxWebDataNavigatorButton

TcxWebDataNavigatorButtons

Other Types

TcxWebNavigatorButtonType

TcxWebNavigatorEvent


TcxWebNavigatorEvent
TcxWebNavigatorEvent type

Contains values specifying custom event types for the web navigator.

Unit

cxWebDataNavigator

TcxWebNavigatorEvent = (neOnButtonClick, neOnChangePageSize);

Description

The TcxWebNavigatorEvent type specifies the types of custom client-side events supported by the web navigator control.  These values are used to set the EventType property of the navigator control’s custom events, if any.

The following values are available in the TcxWebNavigatorEvent type:

Value	Description
neOnButtonClick	Fires when clicking a navigator button.
neOnChangePageSize	Fires when changing the page size.


TcxCustomWebDataNavigator
TcxCustomWebDataNavigator Object

Hierarchy          Properties          Methods          Events          See Also

Represents the base class for data navigator controls.

Unit

cxWebDataNavigator

TcxCustomWebDataNavigator = class(TcxWebControl)

Description

The TcxCustomWebDataNavigator class is the base class for data navigator controls.  It is the ancestor of the TcxWebDBDataNavigator class.  It implements the properties and methods controlling visual representation of data navigator controls.  It also overrides methods to provide proper functioning of a web control.

Use the TcxWebDBDataNavigator control to navigate through a data source.  You can also implement your own descendant of the TcxCustomWebDataNavigator class to create a custom data navigator control.

The TcxWebDBDataNavigator control supports a set of custom events which you can handle straight on the client side.  These event types are specified by the TcxWebNavigatorEvent type.


TcxCustomWebDataNavigator Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl


Properties for TcxCustomWebDataNavigator
TcxCustomWebDataNavigator Properties

TcxCustomWebDataNavigator          Legend

In TcxCustomWebDataNavigator

ButtonCount

Buttons

ButtonWidth

Height

Images

PageSize

ShowHint

Width

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxCustomWebDataNavigator
TcxCustomWebDataNavigator Methods

TcxCustomWebDataNavigator          Legend

In TcxCustomWebDataNavigator

Create

Destroy

DoSetValues

RegisterActions

RegisterRenderers

RegisterValues

ScriptsSubscription

UpdateButtonWidth

UpdateWidth

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterEvents

SetState

ValidateContainer


Events for TcxCustomWebDataNavigator
TcxCustomWebDataNavigator Events

TcxCustomWebDataNavigator          Legend

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxCustomWebDataNavigator.ButtonCount

TcxCustomWebDataNavigator          See Also

Returns the number of buttons displayed by a data navigator control.

property ButtonCount: Integer;

Description

A data navigator control displays a set of buttons used to navigate through a data source.  TcxWebDataNavigatorButtons lists all available buttons.  The Buttons property allows you to specify which buttons are to be displayed.  The ButtonCount property allows you to determine the number of buttons displayed by the data navigator control at any moment.

ReadOnly Property


TcxCustomWebDataNavigator.Buttons

TcxCustomWebDataNavigator          See Also

Specifies a set of buttons displayed by a data navigator control.

property Buttons: TcxWebDataNavigatorButtons;

Description

Use the Buttons property to specify buttons that should be displayed by your data navigator control.  Available button types are listed by the TcxWebNavigatorButtonType type.  By default, the Buttons property contains all button types, except for the nbCustom type button.

You can use methods and properties of the TcxWebDataNavigatorButtons object to add, remove and access individual buttons.  Each button is represented by the TcxWebDataNavigatorButton object.  The properties of this object allow you to customize button type, its image and hint.

Please review TcxWebNavigatorButtonType for the complete list of available buttons and their default characteristics.


TcxCustomWebDataNavigator.ButtonWidth

TcxCustomWebDataNavigator          See Also

Returns buttons width displayed by a data navigator control in pixels.

property ButtonWidth: Integer;

Description

A data navigator control displays a set of buttons used to navigate through a data source.  All buttons except for the page size edit have the same width.  Once the Width property value is changed, all buttons are resized proportionally.

The ButtonWidth property allows you to determine the current width of the buttons displayed by the data navigator control.  Note that the page size edit has a width twice as much as the ButtonWidth property value.

ReadOnly Property


TcxCustomWebDataNavigator.Height

TcxCustomWebDataNavigator          See Also

Specifies the height of a data navigator control.

property Height: Integer;

Description

Use the Height property to specify the height of a data navigator control.  Changing its height resizes buttons vertically.  The height cannot be less than 26.  This constraint is implemented by the GetMinHeight method.  You can remove or change the constraint by overriding this method in derived classes.

Use the Width property to change the width of the data navigator control.


TcxCustomWebDataNavigator.Images

TcxCustomWebDataNavigator          See Also

Specifies the source of images displayed within the navigator control’s buttons.

property Images: TcxWebImageList;

Description

Use the Images property to specify the source of images that can be displayed within buttons of a data navigator control.  You should use the TcxWebImageList component to set this property value.

The image displayed within a button can be specified via the ImageIndex property of the TcxWebDataNavigatorButton object representing the button.  An individual button object is accessed via the Items property of the buttons collection, stored by the Buttons property of the data navigator control.

Note that each button type has a corresponding default image (except custom buttons).  Please refer to TcxWebNavigatorButtonType for the complete list of button types and corresponding default images.


TcxCustomWebDataNavigator.PageSize

TcxCustomWebDataNavigator          See Also

Specifies the number of records within a page.

property PageSize: Integer;

Description

A data navigator control provides the ability to change data source position by a predefined number of records.  This can be done by clicking the "next page" and "previous page" buttons.  The PageSize property specifies the number of records by which the data source position changes in such an instance.

PageSize can also be changed by the end user.  The "page size" edit and the "apply page size" button should be both visible for this purpose.  In such an instance, a user can click the "apply page size" button, type the desired value, and click the button once more.  If the "apply page size" button is invisible, the "page size" edit is read only.  Use the Buttons property to access the buttons collection.  Button visibility is specified by the Visible property of the TcxWebDataNavigatorButton object.  Buttons can also be removed from or added to the collection.


TcxCustomWebDataNavigator.ShowHint

TcxCustomWebDataNavigator          See Also

Specifies whether hints are displayed when the mouse pointer hovers over buttons.

property ShowHint: Boolean;

Description

A data navigator control displays a set of buttons used to navigate through a data source.  Each button can have a hint assigned to it.  The ShowHint property specifies whether hints should be displayed.

Use the Hint property of the TcxWebDataNavigatorButton object, representing a button, to specify the button’s hint.  An individual button object is accessed via the Items property of the buttons collection, stored by the Buttons property of the data navigator control.

The default value of the ShowHint property is False.


TcxCustomWebDataNavigator.Width

TcxCustomWebDataNavigator          See Also

Specifies the width of a data navigator control in pixels.

property Width: Integer;

Description

Use the Width property to specify the width of a data navigator control.  Once the width of the control is changed, buttons are resized proportionally.  Note that all buttons except the "page size" edit always have the same width.

The Width property has a minimum constraint implemented by the GetMinWidth method.  This method is used to prevent buttons to be resized less than 26 pixels wide (52 for the "page size" edit).  You can remove or change the constraint by overriding the GetMinWidth method in derived classes.

Use the Height property to specify the height of the data navigator control.


TcxCustomWebDataNavigator.Create

TcxCustomWebDataNavigator          See Also

Creates a TcxCustomWebDataNavigator class instance.

constructor Create(AOwner: TComponent); override;

Description

The Create method is used to instantiate the TcxCustomWebDataNavigator object.  After calling the inherited Create method, it perform the following actions:

•	Initializes the buttons collection (the Buttons property) with the newly created TcxWebDataNavigatorButtons object.

•	Sets the default size of the data navigator control (initializes the Height and Width properties).

Do not create instances of the TcxCustomWebDataNavigator class.  Use the TcxWebDBDataNavigator class or other descendants instead.


TcxCustomWebDataNavigator.Destroy

TcxCustomWebDataNavigator          See Also

Destroys the TcxCustomWebDataNavigator object.

destructor Destroy; override;

Description

The Destroy method disposes of the TcxCustomWebDataNavigator object and frees any allocated memory.  It frees the Buttons property before calling the inherited destructor.

The destructor of the TcxCustomWebDataNavigator class is called from the Destroy method of the TcxWebDBDataNavigator class.


TcxCustomWebDataNavigator.DoSetValues

TcxCustomWebDataNavigator          See Also

Updates a data navigator control based on the changes made at the client side of the application.

procedure DoSetValues; override;

Description

The only thing the end user can change is page size displayed within the "page size" edit.  Thus the DoSetValues method simply sets this value, received within the request, to the PageSize property.

This method implements the DoSetValues method of the IcxWebValues interface.  It can be overridden in derived classes to update the data navigator control with respect to the changes made at the client side of the application.


TcxCustomWebDataNavigator.RegisterActions

TcxCustomWebDataNavigator          See Also

Registers action handlers for a data navigator control.

procedure RegisterActions; override;

Description

The RegisterActions method registers a single handler for two actions: to handle the OnClick event of buttons and to invoke the same handler if data transmission errors occur (the default).

This method overrides the RegisterActions method of the TcxWebComponent class.


TcxCustomWebDataNavigator.RegisterRenderers

TcxCustomWebDataNavigator          See Also

Registers renderer classes that generate HTML code representing a data navigator control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers three specific renderer classes used to render HTML code for the data navigator control.  The browser types for which the registered renderers are designed are Internet Explorer, Netscape Navigator 4.0 and Netscape Navigator 6.0.  The renderer class designed for Internet Explorer is the default.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for the data navigator control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxCustomWebDataNavigator.RegisterValues

TcxCustomWebDataNavigator          See Also

Registers HTML elements that contain data related to a component.

procedure RegisterValues; override;

Description

The only thing the end user can change is page size displayed within the "page size" edit.  Thus the RegisterValues method registers only this edit field.  It also calls the inherited RegisterValues method of the TcxWebComponent class.

This method implements the RegisterValues method of the IcxWebValues interface.  You can override it in descendant classes to register additional HTML elements, whose values are required for proper functionality.


TcxCustomWebDataNavigator.ScriptsSubscription

TcxCustomWebDataNavigator          See Also

Subscribes a data navigator control to the client side scripts required for its proper functioning.

procedure ScriptsSubscription; override;

Description

The ScriptsSubscription method subscribes a data navigator control to a post-back script.  In addition, it calls the inherited ScriptsSubscription method.

This method implements the ScriptsSubscription method of the IcxWebScripts interface.  You can override this method in descendant classes to subscribe your control to additional scripts.


TcxCustomWebDataNavigator.UpdateButtonWidth

TcxCustomWebDataNavigator          See Also

Recalculates the width of buttons displayed by a data navigator control.

procedure UpdateButtonWidth(AWidth: Integer); virtual;

Description

The UpdateButtonWidth method is called when a new value is assigned to the Width property - Necessary to adjust this property value to set the same width to all buttons displayed by the control.  Note that the button displaying the page size edit is twice as wide as the others.  The AWidth parameter specifies the newly assigned value for the Width property.  The UpdateButtonWidth method writes the updated value back to this parameter.


TcxCustomWebDataNavigator.UpdateWidth

TcxCustomWebDataNavigator          See Also

Updates the width of a data navigator control.

procedure UpdateWidth; virtual;

Description

The UpdateWidth method is called when the data navigator control’s width is changed.  The UpdateWidth method uses the AdjustBounds method to fulfill this task.


TcxWebDataNavigatorButton
TcxWebDataNavigatorButton Object

Hierarchy          Properties          Methods          Events          See Also

Represents a single button within the TcxWebDataNavigatorButtons collection.

Unit

cxWebDataNavigator

TcxWebDataNavigatorButton = class(TCollectionItem)

Description

Data navigator controls (descendants of the TcxCustomWebDataNavigator class) display a set of buttons, which are used to navigate through an associated dataset.  TcxWebNavigatorButtonType lists all possible button types.  You can specify which buttons are to be displayed by a data navigator control via the Buttons property of the TcxCustomWebDataNavigator class (and descendants).  This property represents a collection of buttons each of which is represented by a TcxWebDataNavigatorButton object.

TcxWebDataNavigatorButton class properties allow you to customize button type, the applied hint and the displayed image.


TcxWebDataNavigatorButton Hierarchy
Hierarchy

TCollectionItem


Properties for TcxWebDataNavigatorButton
TcxWebDataNavigatorButton Properties

TcxWebDataNavigatorButton          Legend

In TcxWebDataNavigatorButton

Buttons

ButtonType

Hint

ImageIndex

Navigator

Visible


Methods for TcxWebDataNavigatorButton
TcxWebDataNavigatorButton Methods

TcxWebDataNavigatorButton          Legend

In TcxWebDataNavigatorButton

Create


Events for TcxWebDataNavigatorButton
TcxWebDataNavigatorButton Events

TcxWebDataNavigatorButton          Legend

In TcxWebDataNavigatorButton

OnClick


TcxWebDataNavigatorButton.Buttons

TcxWebDataNavigatorButton          See Also

Returns the collection object, to which the TcxWebDataNavigatorButton object belongs.

property Buttons: TcxWebDataNavigatorButtons;

Description

The Buttons property is used to access the TcxWebDataNavigatorButtons collection owning a specific button object.  The obtained object represents the associated data navigator’s Buttons property value.

ReadOnly Property


TcxWebDataNavigatorButton.ButtonType

TcxWebDataNavigatorButton          See Also

Specifies button type.

property ButtonType: TcxWebNavigatorButtonType;

Description

Use the ButtonType property to specify button type.  Available button types are listed by the TcxWebNavigatorButtonType type.  Each button type has a corresponding action, hint text and displayed image.  See the table below.  You can, however, change hint text and the displayed image via the Hint and ImageIndex properties.

The following values are available for the ButtonType property.

Value	Default Action	Default Appearance	Default Hint
nbFirst	Moves the cursor to the first record within the data source.		First record
nbPrevPage	Moves the cursor backwards by the number of records specified by the "page size" edit (the PageSize property).		Prior page
nbPrev	Moves the cursor to the previous record.		Prior record
nbPageSize	Represents the "page size" edit.  Contains the number of records within a page.		Page size
nbApplyPageSize	Allows editing and applies the page size.		Apply page size
nbNext	Moves the cursor to the next record.		Next record
nbNextPage	Moves the cursor forward by the number of records specified by the "page size" edit (PageSize property).		Next page
nbLast	Moves the cursor to the last record within the data source.		Last record
nbInsert	Inserts a new record.		Insert record
nbEdit	Switches the current record to edit mode.		Edit record
nbDelete	Deletes the current record.		Delete record
nbPost	Posts the changes made.		Post changes
nbCancel	Cancels the changes made.		Cancel changes
nbRefresh	Reloads the associated data.		Refresh
nbCustom	Has no associated action by default.  Write an OnClick event handler for these buttons to perform a specific action when it is clicked.	Has no associated image by default.	Has no associated hint by default.


TcxWebDataNavigatorButton.Hint

TcxWebDataNavigatorButton          See Also

Specifies hint text for a button.

property Hint: string;

Description

Use the Hint property to specify the hint text, which appears when the mouse pointer hovers over its button.  Note, each button has a hint corresponding to its type assigned by default.  The button type is specified by the ButtonType property.

Please refer to the ButtonType property description for a list of default hints.


TcxWebDataNavigatorButton.ImageIndex

TcxWebDataNavigatorButton          See Also

Specifies the image displayed within the button.

property ImageIndex: Integer;

Description

Data navigator buttons can display custom images.  The source of images is specified by the Images property of the TcxCustomWebDataNavigator class (and its descendants).  You should use the TcxWebImageList component to set this property value.

Once the Images property value is set, you should use the ImageIndex property of the TcxWebDataNavigatorButton object to specify the image displayed within a button.  The image is specified via its index within the TcxWebImageList collection.  If the ImageIndex property value is –1 or greater than the last available image index, the default image for the button type is displayed.  The button type is specified via the ButtonType property.

Please refer to the ButtonType property for a list of default images.

The default value of the ImageIndex property is -1.


TcxWebDataNavigatorButton.Navigator

TcxWebDataNavigatorButton          See Also

Returns the data navigator object, to which the button belongs.

property Navigator: TcxCustomWebDataNavigator;

Description

The Navigator property is used to access the navigator control owning the button.

ReadOnly Property


TcxWebDataNavigatorButton.Visible

TcxWebDataNavigatorButton          See Also

Specifies whether the button is visible.

property Visible: Boolean;

Description

Use the Visible property to control the visibility of data navigator buttons.  Set this property to False to make a button invisible.  You can also hide a button by removing it from the Buttons collection (represented by the TcxWebDataNavigatorButtons class).

The default value of the Visible property is True.


TcxWebDataNavigatorButton.Create

TcxWebDataNavigatorButton          See Also

Creates a TcxWebDataNavigatorButton class instance.

constructor Create(Collection: TCollection); override;

Description

The Create method is used to create a new TcxWebDataNavigatorButton object.  The Collection parameter specifies the collection owning the newly created object.  The available collection, specifically designed to hold items of type TcxWebDataNavigatorButton, is the TcxWebDataNavigatorButtons class.

Do not use the Create method to create TcxWebDataNavigatorButton objects.  Use the Add method of the TcxWebDataNavigatorButtons class instead.


TcxWebDataNavigatorButton.OnClick

TcxWebDataNavigatorButton          See Also

Fires when the end user clicks the button.

type

  TNotifyEvent = procedure(Sender: TObject) of object;

property OnClick: TNotifyEvent;

Description

Write an OnClick event handler to perform specific actions each time the navigator button is clicked.  The Sender parameter specifies the sender of the event.  Writing an event handler disables the default behavior of the button.  Please refer to the ButtonType property for the list of default behaviors for button types.


TcxWebDataNavigatorButtons
TcxWebDataNavigatorButtons Object

Hierarchy          Properties          Methods

Represents the collection of buttons displayed by a data navigator control.

Unit

cxWebDataNavigator

TcxWebDataNavigatorButtons = class(TCollection)

Description

Data navigator controls (descendants of the TcxCustomWebDataNavigator class) display a set of buttons, which are used to navigate through an associated dataset.  TcxWebNavigatorButtonType lists all possible button types.  You can specify which buttons are to be displayed by a data navigator control via the Buttons property of the TcxCustomWebDataNavigator class (and descendants).  This property represents a collection of buttons each of which is represented by a TcxWebDataNavigatorButton object.

The Buttons property of the TcxCustomWebDataNavigator class is represented by the TcxWebDataNavigatorButtons object.  This object’s properties and methods are used to manipulate items within the collection.


TcxWebDataNavigatorButtons Hierarchy
Hierarchy

TCollection


Properties for TcxWebDataNavigatorButtons
TcxWebDataNavigatorButtons Properties

TcxWebDataNavigatorButtons          Legend

In TcxWebDataNavigatorButtons

Items

Navigator


Methods for TcxWebDataNavigatorButtons
TcxWebDataNavigatorButtons Methods

TcxWebDataNavigatorButtons          Legend

In TcxWebDataNavigatorButtons

Add

Create

CreateDefaultButtons

UpdateNavigatorContext

UpdateNavigatorWidth


TcxWebDataNavigatorButtons.Items

TcxWebDataNavigatorButtons          See Also

Provides indexed access to collection items.

property Items[Index:Integer]: TcxWebDataNavigatorButton;

Description

Use the Items property to access an individual button within the collection.  The Index parameter specifies the zero-based index of the accessed item.

Buttons can be added to and deleted from the collection via the Add and Delete methods of the TcxWebDataNavigatorButtons object.


TcxWebDataNavigatorButtons.Navigator

TcxWebDataNavigatorButtons          See Also

Returns the data navigator object, to which the buttons collection belongs.

property Navigator: TcxCustomWebDataNavigator;

Description

The Navigator property is used to access the navigator control owning the buttons collection.

ReadOnly Property


TcxWebDataNavigatorButtons.Add

TcxWebDataNavigatorButtons          See Also

Adds a button to the collection.

function Add: TcxWebDataNavigatorButton;

Description

Use the Add method to add a new button to the TcxWebDataNavigatorButtons collection.  This method creates a new TcxWebDataNavigatorButton object, adds it to the end of the collection and returns a reference to it.  Adjust the properties of the returned object as your needs dictate.

Use the Delete method to remove the specified item from the collection.


TcxWebDataNavigatorButtons.Create

TcxWebDataNavigatorButtons          See Also

Creates a TcxWebDataNavigatorButtons class instance.

constructor Create(ANavigator: TcxCustomWebDataNavigator);

Description

The Create method is used to create a new TcxWebDataNavigatorButtons object.  The ANavigator parameter specifies the navigator control owning the newly created buttons collection.  The Create method calls the CreateDefaultButtons method to initialize the collection.

Do not create instances of the TcxWebDataNavigatorButtons class in applications.  This class is instantiated when the owning data navigator control is created.


TcxWebDataNavigatorButtons.CreateDefaultButtons

TcxWebDataNavigatorButtons          See Also

Fills the buttons collection with the default button set.

procedure CreateDefaultButtons; virtual;

Description

Use the CreateDefaultButtons method to assign the default button set to the collection represented by the TcxWebDataNavigatorButtons object.  The default button set contains all button types listed in TcxWebNavigatorButtonType except nbCustom.  All buttons are assigned with default actions, displayed images and hints.  Please refer to TcxWebNavigatorButtonType for a list of default actions, displayed images and hints for button types.


TcxWebDataNavigatorButtons.UpdateNavigatorContext

TcxWebDataNavigatorButtons          See Also

Updates the owning data navigator control at design time.

procedure UpdateNavigatorContext;

Description

The UpdateNavigatorContext method is called when the owning navigator control needs to be updated due to changes in the buttons collection.  These changes are assigning a new type or image to a button.

The UpdateNavigatorContext method forces the owning data navigator control to redraw itself when changes are being implemented to it at design time.


TcxWebDataNavigatorButtons.UpdateNavigatorWidth

TcxWebDataNavigatorButtons          See Also

Updates the owning data navigator control’s width at design time.

procedure UpdateNavigatorWidth;

Description

The UpdateNavigatorWidth method is called when the owning navigator control’s width needs to be updated.

The UpdateNavigatorWidth method forces the owning data navigator control to redraw itself, when changes are being implemented to it at design time.


TcxWebNavigatorButtonType
TcxWebNavigatorButtonType type

See Also

Lists the types of buttons available in the TcxWebDBDataNavigator control.

Unit

cxWebDataNavigator

TcxWebNavigatorButtonType = (nbFirst, nbPrevPage, nbPrev, nbPageSize, nbApplyPageSize, nbNext, nbNextPage, nbLast, nbInsert, nbEdit, nbDelete, nbPost, nbCancel, nbRefresh, nbCustom);

Description

A data navigator control displays a set of buttons used to navigate through a data source.  The TcxWebNavigatorButtonType type lists all available buttons.  The collection of buttons displayed by the TcxWebDBDataNavigator control is specified via its Buttons property.  Each button type within the collection is specified by the ButtonType property of the TcxWebDataNavigatorButton object.

The following values are available for the TcxWebNavigatorButtonType type.

Value	Default Action	Default Appearance	Default Hint
nbFirst	Moves the cursor to the first record within the data source.		First record
nbPrevPage	Moves the cursor backwards by the number of records specified by the "page size" edit (PageSize property).		Prior page
nbPrev	Moves the cursor to the previous record.		Prior record
nbPageSize	Represents the "page size" edit.  Contains the number of records within a page.		Page size
nbApplyPageSize	Allows editing and applies the page size.		Apply page size
nbNext	Moves the cursor to the next record.		Next record
nbNextPage	Moves the cursor forward by the number of records specified by the "page size" edit (PageSize property).		Next page
nbLast	Moves the cursor to the last record within the data source.		Last record
nbInsert	Inserts a new record.		Insert record
nbEdit	Switches the current record to edit mode.		Edit record
nbDelete	Deletes the current record.		Delete record
nbPost	Posts the changes made.		Post changes
nbCancel	Cancels the changes made.		Cancel changes
nbRefresh	Reloads the associated data.		Refresh
nbCustom	Has no associated action by default.  Write an OnClick event handler for this button to perform specific actions when it is clicked.	Has no associated image by default.	Has no associated hint by default.


cxWebMainMenu Unit Overview
cxWebMainMenu Unit

Classes

TcxWebMainMenu


TcxWebMainMenu
 TcxWebMainMenu Object

Hierarchy          Properties          Methods          Events

Represents a main menu control.

Unit

cxWebMainMenu

TcxWebMainMenu = class(TcxWebControl, IcxMenuControlSupport, IcxMenuSupport)

Description

Use the TcxWebMainMenu control to add a main menu to your web page.  This is a visual menu control whose top-level items are visible on a page.  Each item is represented by the TcxWebMenuItem object and thus can have a child menu.  Each child menu item can have its own child menu.  Top-level items can be arranged horizontally or vertically, as specified by the Horizontal property.

The Item Editor dialog provides an easy way to customize your main menu.  It can be invoked by double-clicking the TcxWebMainMenu control, choosing the Menu Editor… item of its popup menu, or clicking the button corresponding to the Items property within the Object Inspector window.


TcxWebMainMenu Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl


Properties for TcxWebMainMenu
TcxWebMainMenu Properties

TcxWebMainMenu          Legend

In TcxWebMainMenu

DisabledStyles

Designer

HorizOffset

Horizontal

ImagesBackgroundColor

ItemHeight

Images

Items

MenuHelper

PopupType

SeparatorColor

SeparatorWidth

VertOffset

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebMainMenu
TcxWebMainMenu Methods

TcxWebMainMenu          Legend

In TcxWebMainMenu

Create

Destroy

GetChildren

GetMenuHelper

ItemByName

RegisterActions

RegisterRenderers

ScriptsSubscription

SetChildOrder

UpdateMenu

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterEvents

RegisterValues

SetState

ValidateContainer


Events for TcxWebMainMenu
TcxWebMainMenu Events

TcxWebMainMenu          Legend

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebMainMenu.DisabledStyles

TcxWebMainMenu          See Also

Specifies the default and hover styles of disabled items within the menu control.

property DisabledStyles: TcxWebStyles;

Description

Use the DisabledStyles property to specify the look of the disabled items within the menu control.  This property is represented by the TcxWebStyles object, whose Default and Hover properties specify the default and hover styles.  So, via the DisabledStyles property, you can set the desired default and hover styles for menu items whose Enabled property is set to False.

If a default style is applied to disabled menu items and the hover style is not specified, each item will have the specified default style even when the mouse pointer hovers over it.

If no styles are assigned to the DisabledStyles property, the default predefined style will be applied to disabled items.  This default style differs from the default style applied to enabled items.

Note that you should use the TcxWebStyleController component to create and adjust individual styles.


TcxWebMainMenu.Designer

TcxWebMainMenu          See Also

Obtains a specific popup menu designer.

property Designer: TAbstractcxWebMenuDesigner;

Description

The Designer property is used to obtain the TAbstractcxWebMenuDesigner class which is responsible for creation and destruction of a specific menu helper object (represented by the TcxWebMenuHelper class) and for performing specific operations which affect popup menu functionality.

ReadOnly Property


TcxWebMainMenu.HorizOffset

TcxWebMainMenu          See Also

Specifies the horizontal offset of child items from the top-level item’s edge.

property HorizOffset: Integer;

Description

The HorizOffset property specifies the horizontal offset (in pixels) which these sub-items will have relative to the left or right edge of their parent item.

Determination of a specific parent item’ edge from which the horizontal offset of child items will be counted off depends on the PopupType property value.

If the PopupType property is set to the ptToLeft (sub-items appear to the left of the parent menu item), the horizontal offset of sub-items is relative to the left edge of the parent item.  Positive values for the HorizOffset property move sub-items to the right, negative values moves them to the left of the parent item’s left edge.

If the PopupType property is set to the ptToRight (sub-items appear to the right of the parent menu item), the horizontal offset of sub-items is relative to the right edge of the parent item.  In this instance, positive values for the HorizOffset property move sub-items to the left, negative values move them to the right of the parent item’s right edge.

Use the VertOffset property to control the vertical placement of popup menu sub-items.


TcxWebMainMenu.Horizontal

TcxWebMainMenu          See Also

Specifies whether top-level menu items are arranged horizontally.

property Horizontal: Boolean;

Description

Use the Horizontal property to specify the arrangement of top-level items for the main menu.  Set this property to True to arrange them horizontally.  Child menus will appear directly below top-level items.  Setting the Horizontal property to False arranges the main menu horizontally.  In such an instance, child menus will appear to the left or to the right of top-level items as specified by the PopupType property.

You can control the arrangement of a child menu via the Horizontal property of the TcxWebMenuItem object representing its parent item.


TcxWebMainMenu.ImagesBackgroundColor

TcxWebMainMenu          See Also

Specifies the background color for images used by the menu control.

property ImagesBackgroundColor: TcxWebColor;

Description

The main menu control allows you to display glyphs within its items.  Use the ImagesBackgroundColor property to specify the background color for these images will have within the menu control.  Use the TcxWebImageList component in order to create a collection of images and set the value of the menu’s Images property.  If this property value is set properly, the ImageIndex property can be used to assign a glyph for each menu item.


TcxWebMainMenu.ItemHeight

TcxWebMainMenu          See Also

Returns the height of menu items in pixels.

property ItemHeight: Integer;

Description

Use the ItemHeight property to retrieve the height of menu items in pixels which is automatically adjusted to fit the applied font.  (Styles can be applied via the Styles property.)  Note that the ItemHeight property value is not applicable to the menu items whose caption is word wrapped.

ReadOnly Property


TcxWebMainMenu.Images

TcxWebPopupMenu

Specifies the source images used by the menu control.

property Images: TcxWebImageList;

Description

The main menu control allows you to display glyphs within its items.  The Images property specifies the source images used for this purpose.  Use the TcxWebImageList component in order to create a collection of images and set the value of the menu’s Images property.  If this property value is set properly, the ImageIndex property can be used to assign a glyph for each menu item.


TcxWebMainMenu.Items

TcxWebMainMenu          See Also

Represents the root item of the main menu.

property Items: TcxWebMenuItem;

Description

Use the Items property to access the root item of the TcxWebMainMenu control.  The root item is that which contains top-level items.  The number of top-level items can be determined via the Count property of the obtained TcxWebMenuItem object.

The Items property allows you to manipulate top-level menu items.

ReadOnly Property


TcxWebMainMenu.MenuHelper

TcxWebMainMenu          See Also

Represents an object to which the common elements of menu component’s functionality are delegated.

property MenuHelper: TcxWebMenuHelper;

Description

Functionality of menu components is rather similar.  In order to avoid code duplication, the common elements of a menu component’s functionality are delegated to its property, represented by a specifically designed class (TcxWebMenuHelper).  The MenuHelper property returns this object.  The GetMenuHelper method is a ‘read’ of this property.

The MenuHelper property and the GetMenuHelper method are declared in the IcxMenuSupport interface.

ReadOnly Property


TcxWebMainMenu.PopupType

TcxWebMainMenu          See Also

Specifies whether child menus appear to the left or to the right of the parent item.

property PopupType: TcxWebMenuPopupType;

Description

Use the PopupType property to specify whether child menus appear to the left or to the right of top-level menu items.  This property is in effect only if the top-level items of the main menu are arranged vertically.  Set the Horizontal property to False to arrange the main menu vertically.

The PopupType property value affects the HorizOffset property setting.


TcxWebMainMenu.SeparatorColor

TcxWebMainMenu          See Also

Specifies the color of separator lines.

property SeparatorColor: TcxWebColor;

Description

Each item in a menu is separated from others by a separator line.  Use the SeparatorColor property to specify the color of these lines.  The width of separator lines is specified by the SeparatorWidth property.

You can change other style aspects of the menu using the Styles property.


TcxWebMainMenu.SeparatorWidth

TcxWebMainMenu          See Also

Specifies the width of separator lines.

property SeparatorWidth: Integer;

Description

Each item in a menu is separated from others by a separator line.  Use the SeparatorWidth property to specify the width of these lines.  The color of separator lines is specified by the SeparatorColor property.

You can change other style aspects of the menu using the Styles property.


TcxWebMainMenu.VertOffset

TcxWebMainMenu          See Also

Specifies the vertical offset of a child menu relative to a top-level item.

property VertOffset: Integer;

Description

The VertOffset property specifies the vertical offset (in pixels) which sub-items will have relative to the top edge of their parent item.  Positive values of the VertOffset property move sub-items up, negative values move them down relative to the parent item’s top edge.

To control the horizontal placement of sub-items use the HorizOffset property.


TcxWebMainMenu.Create

TcxWebMainMenu          See Also

Creates a TcxWebMainMenu class instance.

constructor Create(AOwner: TComponent); override;

Description

Use the Create method to create a main menu control at runtime.  Remember to set the Parent property to a proper value.

After calling the inherited Create method the constructor sets the Horizontal property to True.


TcxWebMainMenu.Destroy

TcxWebMainMenu          See Also

Destroys the TcxWebMainMenu object.

destructor Destroy; override;

Description

The Destroy method disposes the main menu control and frees the memory allocated by it.  Do not call the Destroy method directly.  Use the Free method instead.


TcxWebMainMenu.GetChildren

TcxWebMainMenu          See Also

Executes the specified callback for top-level items.

procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;

Description

Use the GetChildren method to execute the specified callback for each top-level item of the main menu.  The callback is specified by the Proc parameter.  Top-level items can be also accessed via the Items property.  This method is also called internally by streaming systems when components are loaded or saved.  This method overrides the GetChildren method of the TComponent class.  Thus the method has a Root parameter that is not used.


TcxWebMainMenu.GetMenuHelper

TcxWebMainMenu          See Also

Returns the MenuHelper property value.

function GetMenuHelper: TcxWebMenuHelper;

Description

The GetMenuHelper method is a ‘read‘ of the MenuHelper property.  This method returns the TcxWebMenuHelper object to which the common elements of the menu component’s functionality are delegated.  If the MenuHelper property value is nil, a new instance of the TcxWebMenuHelper object is created.

This method implements the GetMenuHelper method of the IcxMenuSupport interface.


TcxWebMainMenu.ItemByName

TcxWebPopupMenu

Returns the object representing an item with a specified name.

function ItemByName(const AName: string): TcxWebMenuItem;

Description

Use the ItemByName method to retrieve the TcxWebMenuItem object, which represents a menu item,  with the specified name.  Item name is specified by the AName parameter.  The parameter value is compared to the value of the menu item’s Name property.

If the item with the specified name is not found, the ItemByName method returns nil.


TcxWebMainMenu.RegisterActions

TcxWebMainMenu          See Also

Registers server side events for the main menu control.

procedure RegisterActions; override;

Description

The RegisterActions method registers the server side OnClick event and the default event with the same handler.  The default event is useful when the __ACTIONNAME hidden input value was transmitted empty while the __TARGETNAME was not.  Although only one event is registered, you can assign the OnClick event handlers to each of the menu items.  This is possible since the parameter identifying the clicked menu item is transmitted to the server and a proper handler is called.

You can override the RegisterActions method in descendant classes to register your own server side events. This method overrides the RegisterActions method of the TcxWebComponent class.


TcxWebMainMenu.RegisterRenderers

TcxWebMainMenu          See Also

Registers renderer classes for the main menu control.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers two specific renderer classes intended to render HTML code for the main menu control under the IE 4.0 and Netscape Navigator 4.0 browsers.  It also registers the default renderer that is used by the main menu control if the browser type differs from the two listed above.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for a menu control. This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxWebMainMenu.ScriptsSubscription

TcxWebMainMenu          See Also

Subscribes the main menu control to client side scripts required for it to function properly.

procedure ScriptsSubscription; override;

Description

The ScriptsSubscription method subscribes the main menu control to the initialization and post back scripts.  You can override this method in descendant classes to subscribe a menu control to the other scripts.

This method implements the ScriptsSubscription method of the IcxWebScripts interface.


TcxWebMainMenu.SetChildOrder

TcxWebMainMenu          See Also

Moves the top-level item to a specified location within the top-level items list.

procedure SetChildOrder(Child: TComponent; Order: Integer); override;

Description

Use the SetChildOrder method to change the position of a specified top-level item.  The Child parameter specifies the item to be moved.  The Order parameter sets a new item position within the top-level items list.  The SetChildOrder method simply calls the SetChildOrder method of the TcxWebMenuItem object, which stands for the Items property.

The same effect can be achieved by changing the Index property value of the desired top-level item.


TcxWebMainMenu.UpdateMenu

TcxWebMainMenu

Updates the properties of a main menu control to respond to changes made.

procedure UpdateMenu; virtual;

Description

The UpdateMenu method is called when certain properties of the TcxWebMainMenu class are changed.  This allows a main menu control to recalculate some of its parameters to respond to the changes made.  As implemented in the TcxWebMainMenu class, this method recalculates the width and height property values with respect to the number of top-level items, their width and height.  This is required to update the main menu control at design time.

You can override the UpdateMenu method in descendant classes to update your menu control in a desired manner. This method implements the UpdateMenu method of the IcxMenuControlSupport interface.


cxWebMenus Unit Overview
cxWebMenus Unit

Classes

TcxWebMenuHelper

TcxWebMenuItem

Interfaces

IcxMenuControlSupport

IcxMenuSupport

Other Types

TcxPopupShowingType

TcxWebMenuAlign

TcxWebMenuBreak

TcxWebMenuPopupType


TcxWebMenuItem
TcxWebMenuItem Object

Hierarchy          Properties          Methods          Events          See Also

Represents a menu item.

Unit

cxWebMenus

TcxWebMenuItem = class(TComponent)

Description

EWF provides you with a TcxWebPopupMenu and TcxWebMainMenu components that represent a popup menu and the main menu respectively.  Each item for either a popup or main menu is represented by the TcxWebMenuItem object.

One can control the general behavior of a menu via the properties and methods of the TcxWebPopupMenu or TcxWebMainMenu class.  Further it is possible to control each individual menu item via the properties and methods of the corresponding TcxWebMenuItem object.

The TcxWebMenuItem class contains an Items property representing a collection of child items (a submenu).  Child items are also of type TcxWebMenuItem.  First-level menu items can be accessed via the Items property of the TcxWebMainMenu object or via the Items property of the TcxWebPopupMenu object (according to the menu type you are using).


TcxWebMenuItem Hierarchy
Hierarchy

TComponent


Properties for TcxWebMenuItem
TcxWebMenuItem Properties

TcxWebMenuItem          Legend

In TcxWebMenuItem

Align

Break

Caption

Count

DisabledImageIndex

Enabled

HiliteOver

HorizOffset

Horizontal

ImageIndex

Index

Items

Menu

Parent

SelectedImageIndex

Status

URL

VertOffset

Visible

Width


Methods for TcxWebMenuItem
TcxWebMenuItem Methods

TcxWebMenuItem          Legend

In TcxWebMenuItem

Add

Clear

Click

ClickRender

Create

Delete

Destroy

ItemByName

GetChildren

GetParentComponent

HasParent

IndexOf

Insert

MenuChanged

ParentMenu

Remove

SetChildOrder

SetParentComponent

WriteScript


Events for TcxWebMenuItem
TcxWebMenuItem Events

TcxWebMenuItem          Legend

In TcxWebMenuItem

OnClick


TcxWebMenuItem.Align

TcxWebMenuItem          See Also

Specifies text alignment within the sub-items of a menu item.

TcxWebMenuAlign = (maLeft, maRight);

property Align: TcxWebMenuAlign;

Description

Use the Align property to set or get a value specifying text alignment within the sub-items of a menu item.  Text alignment within the menu item itself can be set via the Align property of the TcxWebMenuItem object - which represents its parent item.

The following values are available for the Align property:

Value	Meaning
maLeft	Text is left justified within child menu items.
maRight	Text is right justified within child menu items.


TcxWebMenuItem.Break

TcxWebMenuItem

Specifies whether the menu item represents a separator between neighboring items.

TcxWebMenuBreak = (mbNone, mbBreak);

property Break: TcxWebMenuBreak;

Description

Each menu item can serve as a separator between neighboring items.  The Break property specifies whether a specific menu item is a separator.

The following values are available for the Break property:

Value	Meaning
mbNone	A menu item is not a separator.
mbBreak	A menu item represents a separator.

The default value of the Break property is mbNone.


TcxWebMenuItem.Caption

TcxWebMenuItem          See Also

Specifies the text displayed within a menu item.

property Caption: string;

Description

Use the Caption property to set or get the text displayed within a menu item.  If the text assigned to this property is too long to fit inside the item, it is word wrapped.  If the text cannot be word wrapped (it doesn’t contain spaces), it is truncated to fit inside the item’s width.  You should use the Width property of the TcxWebMenuItem object representing the parent item to control the menu item’s width.

Use the Align property to specify the manner in which text is aligned within a menu item.


TcxWebMenuItem.Count

TcxWebMenuItem          See Also

Returns the number of child items owned by a menu item.

property Count: Integer;

Description

Use the Count property to determine the number of items a menu item owns.  This property can be used in conjunction with the Items property to iterate through child items.

Since item indexing is zero-based, the Count property value is always one greater than the index of the last item.

ReadOnly Property


TcxWebMenuItem.DisabledImageIndex

TcxWebMenuItem          See Also

Specifies the image displayed within a disabled menu item.

property DisabledImageIndex: Integer;

Description

Each menu item can display an image before its text.  In order to use this feature, you should assign the TcxWebImageList component containing the desired list of images to the Images property of the menu control (main menu or popup menu).  The DisabledImageIndex property specifies the index of the image that will be displayed within a menu item if it is disabled (its Enabled property is set to False).

In order to specify an image for display within a standard enabled menu item, use the ImageIndex property.    Also, you can use the SelectedImageIndex property to specify an image to be displayed in the menu item when it is selected within the menu control.  Images indexes are zero-based within the TcxWebImageList component.


TcxWebMenuItem.Enabled

TcxWebMenuItem          See Also

Controls whether a menu item responds to user actions.

property Enabled: Boolean;

Description

Use the Enabled property to enable or disable a menu item.  If this property is set to True, the item can be clicked to perform redirection to a location specified by the URL property.  If the Enabled property is False, the menu item (its icon and caption) appears dimmed by default and a user click does not result in any action.  You can control the look of disabled menu items more precisely by setting the DisabledStyles property of the menu control.  Moreover, you can set the DisabledImageIndex property to specify an alternative image to be displayed for a disabled menu item.


TcxWebMenuItem.HiliteOver

TcxWebMenuItem          See Also

Specifies whether a menu item is highlighted when the mouse pointer hovers over it.

property HiliteOver: Boolean;

Description

Each menu item is highlighted when the mouse pointer hovers over it, by default.  Set the HiliteOver property to False to disable such default behavior.

You can control the default and hover styles of menu items via the Styles property of the TcxWebPopupMenu or the Styles property of the TcxWebMainMenu (according to the menu type you are using).


TcxWebMenuItem.HorizOffset

TcxWebMenuItem          See Also

Specifies the horizontal offset of child items relative to the edge of a menu item.

property HorizOffset: Integer;

Description

Use the HorizOffset property to specify the offset of child items relative to the edge of a menu item. The determination of a specific parent item’s edge from which the horizontal offset of child items will be counted, depends on the PopupType property value.

If the PopupType property is set to ptToLeft, (sub-items appear to the left of the parent menu item), the horizontal offset of sub-items is relative to the left edge of the parent item.  Positive values for the HorizOffset property move sub-items to the right; negative values move them to the left of the parent item’s left edge.

If the PopupType property is set to ptToRight, (sub-items appear to the right of the parent menu item), the horizontal offset of sub-items is relative to the right edge of the parent item.  In this instance, positive values for the HorizOffset property move sub-items to the left; negative values move them to the right of the parent item’s right edge.

To control the vertical placement of the popup menu sub-items use the VertOffset property.


TcxWebMenuItem.Horizontal

TcxWebMenuItem          See Also

Specifies whether child items of a menu item are arranged horizontally.

property Horizontal: Boolean;

Description

Set the Horizontal property to True to arrange child items of menu items horizontally.  Otherwise, they will be arranged vertically.

If you are using a menu control of the TcxWebMainMenu type you can control the arrangement of first-level menu items via the Horizontal property of the TcxWebMainMenu object.


TcxWebMenuItem.ImageIndex

TcxWebMenuItem          See Also

Specifies the image displayed within a menu item.

property ImageIndex: Integer;

Description

Each menu item can display an image before its text.  In order to use this feature, you should assign the TcxWebImageList component containing the desired list of images to the Images property of the menu control (main menu or popup menu).  The ImageIndex property specifies the index of the image that will be displayed within a menu item.  Image indexes are zero-based within the TcxWebImageList component.

In order to specify an image for display of a menu item when it is selected, use the SelectedImageIndex property.  Also, you can use the DisabledImageIndex property to specify an alternative image to be displayed for a disabled menu item.

The text displayed by the item is specified by the Caption property.


TcxWebMenuItem.Items

TcxWebMenuItem          See Also

Contains a collection of child items.

property Items[Index:Integer]: TcxWebMenuItem;

Description

Use the Items property to access child items for a menu item.  The number of items within the collection is specified by the Count property.  You can use these properties together to iterate through child items of the menu item.

Since items are zero-based, the Count property value is always one greater than the index of the last item.

ReadOnly Property


TcxWebMenuItem.Menu

TcxWebMenuItem          See Also

Returns the menu component to which a menu item belongs.

property Menu: TcxWebComponent;

Description

The Menu property returns the menu component that owns a menu item.  Note that the menu item represented by the TcxWebMenuItem object can be owned by both the popup and main menus.  Thus, this property returns a TcxWebComponent type value, which can either be of type TcxWebPopupMenu or TcxWebMainMenu.

Use the Parent property to access the TcxWebMenuItem object representing the parent item of a menu item.

ReadOnly Property


TcxWebMenuItem.Index

TcxWebMenuItem

Specifies the menu item index within the parent’s child list.

property Index: Integer;

Description

Use the Index property to set or get a value indicating the item index within the parent’s child items list.  Items are zero-based indexed.

This property allows you to move a menu item to another position within the current-level menu.  Setting the Index property to a negative value moves it to the first position within the parent’s list.  Setting this property to a value greater than the index of the last item moves it to the last position.

Use the SetChildOrder method to control the positions of child items of a menu item.


TcxWebMenuItem.OnClick

TcxWebMenuItem          See Also

Fires when a user clicks a menu item.

property OnClick: TNotifyEvent;

Description

Write an OnClick event handler to perform specific actions each time a menu item is clicked.  Note that if the URL property doesn’t specify any destination document, the event will not fire.


TcxWebMenuItem.Parent

TcxWebMenuItem          See Also

Returns the parent of a menu item.

property Parent: TcxWebMenuItem;

Description

Use the Parent property to obtain the parent item of a menu item.  This property returns the TcxWebMenuItem object even for the first-level items.  Use the Menu property in order to get the menu (the TcxWebPopupMenu or TcxWebMainMenu object) to which the item belongs.

ReadOnly Property


TcxWebMenuItem.SelectedImageIndex

TcxWebMenuItem          See Also

Specifies the image displayed within a selected menu item.

property SelectedImageIndex: Integer;

Description

Each menu item can display an image before its text.  In order to use this feature, you should assign the TcxWebImageList component containing the desired list of images to the Images property of the menu control (main menu or popup menu).  The SelectedImageIndex property specifies the index of the image that will be displayed if a menu item is selected within the menu control.

In order to specify an image for a standard non-selected but enabled menu item, use the ImageIndex property.    Also, you can use the DisabledImageIndex property to specify an image for a disabled menu item.  Image indexes  are zero-based within the TcxWebImageList component.


TcxWebMenuItem.Status

TcxWebMenuItem

Specifies the text displayed within the status bar of the browser when the mouse pointer hovers over a menu item.

property Status: string;

Description

Use the Status property to add some explanatory text to your menu item.  This text is displayed within the status bar of the browser when the mouse pointer hovers over the item.


TcxWebMenuItem.URL

TcxWebMenuItem          See Also

Specifies the HTML link invoked by a menu item.

property URL: TcxURL;

Description

Use the URL property to specify the link invoked by clicking a menu item.  This property is represented by the TcxURL object.  This object allows you to specify the destination document and the window in which it is opened.


TcxWebMenuItem.VertOffset

TcxWebMenuItem          See Also

Specifies the vertical offset of child items relative to the top edge of a menu item.

property VertOffset: Integer;

Description

Use the VertOffset property to control the vertical placement of child items.  This property specifies the vertical offset (in pixels) that child items will have relative to the top edge of their menu item.  Positive values of the VertOffset property move child items up, negative values move them down relative to the parent item’s top edge.

To control the horizontal placement of child items, use the HorizOffset property.


TcxWebMenuItem.Visible

TcxWebMenuItem          See Also

Specifies whether the menu item is visible.

property Visible: Boolean;

Description

Use the Visible property to control the visibility of the menu item within the menu control.  If the Visible property is set to False, an item is hidden.  Change the Visible property of a hidden menu item to True to display it.


TcxWebMenuItem.Width

TcxWebMenuItem          See Also

Specifies the width of child items.

property Width: Integer;

Description

Use the Width property to set the width of child items in pixels.  The current item width can be changed via the Width property of the TcxWebMenuItem object representing the parent menu item.

The height of menu items is set automatically to fit the applied font.  You can control the style applied to menu items via the Styles property of the TcxWebMainMenu object or the Styles property of the TcxWebPopupMenu (based upon the menu type you are using).


TcxWebMenuItem.Add

TcxWebMenuItem          See Also

Adds an item to the child items collection.

function Add: TcxWebMenuItem;

Description

Use the Add method to append a new menu item to the end child items collection.  Modify the properties of the returned object (the added item) to apply desired item settings.

The collection of a menu item’s children is represented by the Items property of the TcxWebMenuItem object.  The number of items in the collection can be determined via the Count property.  When calling the Add method, the Count property value is automatically increased by the number of added items.


TcxWebMenuItem.Clear

TcxWebMenuItem          See Also

Clears the child items collection.

procedure Clear;

Description

Use the Clear method to remove all items from the child items collection.

The collection of child items is represented by the Items property of the TcxWebMenuItem object.  The number of child items can be determined via the Count property.  A Clear method call removes all items from the Items property and sets the Count property to 0.


TcxWebMenuItem.Click

TcxWebMenuItem          See Also

Invokes the OnClick event handler.

procedure Click; virtual;

Description

The Click method is called automatically when a user clicks a menu item.  This method checks whether the OnClick event handler is assigned and runs it if so.

You can override this method in descendant classes to perform additional actions when the menu item is being clicked.


TcxWebMenuItem.ClickRender

TcxWebMenuItem

Renders HTML code required by the menu item to handle the client OnClick event.

function ClickRender: string;

Description

This method returns the Href property value of the TcxURL object representing the URL property, if it is not an empty string.  Otherwise, it renders HTML code intended for handling the server side OnClick event (if assigned).

You can override this method in descendant classes to render specific HTML code for client OnClick event handling.


TcxWebMenuItem.Create

TcxWebMenuItem          See Also

Creates a new TcxWebMenuItem class instance.

constructor Create(AOwner: TComponent); override;

Description

Use the Create method to create a new menu item at runtime.  The AOwner parameter specifies the owner of the newly created item.  After calling the inherited constructor, this method sets the TcxWebMenuItem object’s properties to their default values.

The following sample code adds a new item to the TcxWebMainMenu component at runtime.

// Delphi

var AMenuItem: TcxWebMenuItem;

//...

AMenuItem := TcxWebMenuItem.Create(cxWebPageModule3);

AMenuItem.Caption := 'Just Added';

cxWebMainMenu1.Items.Insert(0, AMenuItem);


TcxWebMenuItem.Delete

TcxWebMenuItem          See Also

Removes an item at the position specified by the parameter.

procedure Delete(Index: Integer);

Description

Use the Delete method to remove an item at the specified position from the list of child items.  The Index parameter specifies the position of the item to be removed.  Items are zero-based.

The list of child items is stored in the Items property.  The number of items in the list is specified by the Count property.  Calling the Delete method shifts items that follow the deleted item and reduces the Count property value by one.

You should use the Remove method to delete the child item specified by the TcxWebMenuItem object representing it.


TcxWebMenuItem.Destroy

TcxWebMenuItem          See Also

Destroys the TcxWebMenuItem object.

destructor Destroy; override;

Description

The Destroy method disposes of the TcxWebMenuItem object and frees any allocated memory.  Before calling the inherited Destroy it performs the following:

•	removes itself from the parent’s child list and sets its parent to nil;

•	calls the MenuChanged method transmitting the parent menu as a parameter (the parent menu is obtained via the ParentMenu method call);

•	clears and frees the child items list.


TcxWebMenuItem.ItemByName

TcxWebMenuItem

Returns the child item specified by its name.

function FindMenuItemByName(const AName: string): TcxWebMenuItem;

Description

Use the ItemByName method to get the TcxWebMenuItem object representing the menu item specified by its name.  The name of the sought for item is specified by the AName parameter.  The parameter value is compared to the Name property value of the scanned child items.

Once no item matching the condition is found in the child list of the menu item, the item is searched within the child lists of child items.  The process goes further until the lowest level items are scanned.  If no item matching the condition was found, the ItemByName method returns nil.


TcxWebMenuItem.GetChildren

TcxWebMenuItem          See Also

Executes the specified callback for every child item.

procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;

Description

Use the GetChildren method to scan through the items stored within the Items collection and execute the specified callback for each of them.  The callback is specified by the Proc parameter. This method is also called internally by the streaming systems when components are loaded or saved.

This method overrides the GetChildren method of the TComponent class.  Thus the method includes a Root parameter that is not used.


TcxWebMenuItem.GetParentComponent

TcxWebMenuItem

Returns the parent of a menu item.

function GetParentComponent: TComponent; override;

Description

The GetParentComponent method is used by a streaming system that loads and saves VCL components.  This method returns the Menu property values if it is not nil.  Otherwise, it returns the Parent property value.


TcxWebMenuItem.ParentMenu

TcxWebMenuItem

Accesses the menu to which a specific menu item belongs.

function ParentMenu: TcxWebComponent;

Description

Use the ParentMenu method to obtain the menu component to which a menu item belongs.  Although the return value type is TcxWebComponent, the returned component can either be of type TcxWebPopupMenu or TcxWebMainMenu.  This depends on the menu type to which the item belongs.


TcxWebMenuItem.HasParent

TcxWebMenuItem          See Also

Indicates whether the menu item has a parent.

function HasParent: Boolean; override;

Description

The HasParent method is used by a streaming system that loads and saves VCL components.  A return value of True indicates that some other object (a parent) is responsible for writing the menu item to a stream.

The HasParent method of the TcxWebMenuItem object always returns True.  Because of this, the object also implements the GetParentComponent and SetParentComponent methods.


TcxWebMenuItem.IndexOf

TcxWebMenuItem          See Also

Returns the index of the specified menu item within the child items list.

function IndexOf(Item: TcxWebMenuItem): Integer;

Description

Use the IndexOf method to determine the position of the specified item within the Items collection.  The item to be located is specified as an Item parameter.

Items are zero-based indexed.  Thus this method returns 0 for the first item, 1 for the second one, etc.  If the specified item is not found or the list of child items is empty, the IndexOf method returns –1. You should use the Items property to access a child item by its index.


TcxWebMenuItem.Insert

TcxWebMenuItem          See Also

Inserts a specific item to the specified location within the Items collection.

procedure Insert(Index: Integer; Item: TcxWebMenuItem);

Description

Use the Insert method to add a specific menu item to the child items collection at a specified location.  The Index parameter specifies the position of the inserted item within the Items collection.  Items are zero-based.  If the Index parameter value is negative or exceeds the index of the last item within the list, the item is inserted to the first or to the last position respectively.  Inserting an item shifts the item that previously occupied that position, and all subsequent items, up.  Calling the Insert method also increments the Count property value.

Use the Add method to add an item to the end of the child items collection.


TcxWebMenuItem.MenuChanged

TcxWebMenuItem          See Also

Updates the parent menu when menu item properties change.

procedure MenuChanged(AMenu: TComponent);

Description

This method is called internally when menu item properties change.  The AMenu parameter specifies the parent component of the menu item.  The MenuChanged method calls the UpdateMenu method of the IcxMenuControlSupport interface implemented by the transmitted component (if the component supports this interface).

You can override this method in descendant classes to perform additional processing when properties of the menu item change.


TcxWebMenuItem.WriteScript

TcxWebMenuItem

Renders HTML code representing a menu item and its child items.

procedure WriteScript(HTMLTextBuilder: TcxHTMLTextBuilder);

Description

This method is used by the menu components (TcxWebPopupMenu and TcxWebMainMenu) to render the client script constructing the menu.  Both these components call the WriteScript method for each top-level menu item to get the corresponding code.  Since this method also renders code for all child items of the menu item, it is enough to render script for all menu items.

Script is written to the inner buffer of the object represented by the HTMLTextBuilder parameter.  This is performed via the TcxHTMLTextBuilder class methods. You can override this method in descendant classes to implement your own rendering for a menu item and its children.


TcxWebMenuItem.Remove

TcxWebMenuItem          See Also

Deletes the specified item from the child items list.

procedure Remove(Item: TcxWebMenuItem);

Description

Use the Remove method to delete the specified item from the Items collection.  The Item parameter specifies the TcxWebMenuItem object representing the item to be deleted.  After the item is removed, the items following it are shifted and the Count property value is decremented.

Use the Delete method to remove the item with the specified index from the child items list.


TcxWebMenuItem.SetChildOrder

TcxWebMenuItem

Moves a child item to the specified location within the child items list.

procedure SetChildOrder(Child: TComponent; Order: Integer); override;

Description

Use the SetChildOrder method to change the position of the specified child item within the Items collection.  The Child parameter specifies the item to be moved.  The Order parameter sets a new position for the item within the child items list.

The same effect can be achieved via changing theIndex property value of the desired child item.


TcxWebMenuItem.SetParentComponent

TcxWebMenuItem

Sets the parent of a menu item.

procedure SetParentComponent(Value: TComponent); override;

Description

The SetParentComponent method is used by a streaming system that loads and saves VCL components.  As implemented in the TcxWebMenuItem class, this method adds a menu item to the child items list of its parent.  The parent is specified by the Value parameter.

You can override this method in descendant classes to perform your own actions setting the parent of your menu item.


IcxMenuControlSupport
IcxMenuControlSupport Interface

Hierarchy          Methods

Declares the method used to update a menu component.

Unit

cxWebMenus

IcxMenuControlSupport = interface(IUnknown)

Description

A menu control should properly respond to changes made to it at design time.  For instance, a menu control should perform some actions when a menu item is either added to or deleted from it.  The IcxMenuControlSupport interface declares a method that should be implemented by the menu control to update itself when necessary.  When the changes that require response from the component are performed, the reference to the IcxMenuControlSupport interface is retrieved from the component and the UpdateMenu method is called.  If the menu control doesn’t support the IcxMenuControlSupport interface, it should provide response to the changes made at design time via some other means.

This interface is supported by the TcxWebMainMenu control.


IcxMenuControlSupport Hierarchy
Hierarchy

IUnknown


Methods for IcxMenuControlSupport
IcxMenuControlSupport Methods

IcxMenuControlSupport          Legend

In IcxMenuControlSupport

UpdateMenu


IcxMenuControlSupport.UpdateMenu

IcxMenuControlSupport

Updates the properties of a menu control.

procedure UpdateMenu;

Description

A menu control should update itself when the changes are made to it at design time.  In order to perform this, it should support the IcxMenuControlSupport interface, and thus implement the UpdateMenu method.  This method is called automatically when the changes that require a control’s response have been made. This method is implemented by the UpdateMenu method of the TcxWebMainMenu control.

Note: It is unnecessary to implement this method in your own menu controls.  It is recommended to do so only if your control uses the TcxWebMenuItem objects as its items.  This allows you to simplify control updates, since it is called automatically.


IcxMenuSupport
IcxMenuSupport Interface

Hierarchy          Properties             Methods

Declares the property to which the common functionality of menu components is delegated.

Unit

cxWebMenus

IcxMenuSupport = interface(IUnknown)

Description

The functionality of menu controls is rather similar.  In order to avoid code duplication, the common parts of a menu component’s functionality is delegated to its property, represented by a specifically designed class (TcxWebMenuHelper).  The IcxMenuSupport interface declares the MenuHelper property of the TcxWebMenuHelper class and the GetMenuHelper method that returns this property and initializes it when needed.

The IcxMenuSupport interface is implemented by both the TcxWebPopupMenu and TcxWebMainMenu components.


IcxMenuSupport Hierarchy
Hierarchy

IUnknown


Properties for IcxMenuSupport
IcxMenuSupport Properties

IcxMenuSupport          Legend

In IcxMenuSupport

MenuHelper

MenuZIndex


Methods for IcxMenuSupport
IcxMenuSupport Methods

IcxMenuSupport          Legend

In IcxMenuSupport

GetMenuHelper

GetMenuZIndex


IcxMenuSupport.MenuHelper

IcxMenuSupport

Represents the object to which the common part of menu component’s functionality is delegated.

property MenuHelper: TcxWebMenuHelper;

Description

The functionality of menu controls is rather similar.  In order to avoid code duplication the common parts of a menu component’s functionality are delegated to its property, represented by a specifically designed class (TcxWebMenuHelper).  The MenuHelper property returns namely this object.

ReadOnly Property


IcxMenuSupport.MenuZIndex

IcxMenuSupport

Used to contain the value of the z-index attribute of the associated menu.

property MenuZIndex: Integer;

Description

The MenuZIndex property value is retrieved to obtain the z-index attribute value of the menu.  The TcxWebMainMenu control uses the ZIndex property value to return this property value. The MenuZIndex property value should be returned by the GetMenuZIndex method.

ReadOnly Property


IcxMenuSupport.GetMenuHelper

IcxMenuSupport

Designed to return the MenuHelper property value.

function GetMenuHelper: TcxWebMenuHelper;

Description

The GetMenuHelper method should return the MenuHelper property value when implemented.  If this property is nil, this method should initialize it.


IcxMenuSupport.GetMenuZIndex

IcxMenuSupport

Used to return the MenuZIndex property value.

function GetMenuZIndex: Integer;

Description

The GetMenuZIndex method should be implemented in order to return the MenuZIndex property value.


TcxPopupShowingType
TcxPopupShowingType type

Specifies the action that invokes a popup menu.

Unit

cxWebMenus

TcxPopupShowingType = (stClick, stMouseOver);

Description

These value types specify the action which forces a popup menu to appear.  These values are used to set the PopupShowingType property value of controls.  The popup menu assigned to a control is specified by its PopupMenu property.

The following values are available for the TcxPopupShowingType type:

Value	Description
stClick	A popup menu appears when a control is clicked.
stMouseOver	A popup menu appears when the mouse pointer hovers over a control.


TcxWebMenuAlign
TcxWebMenuAlign type

Specifies the horizontal alignment of the text displayed within menu items.

Unit

cxWebMenus

TcxWebMenuAlign = (maLeft, maRight);

Description

These value types specify whether the text displayed within menu items is right or left aligned.  These values are used to set the Align property value of the TcxWebMenuItem class. The following values are available in the TcxWebMenuAlign type:

Value	Description
maLeft	Text is left aligned within menu items.
maRight	Text is right aligned within menu items.


TcxWebMenuBreak
TcxWebMenuBreak type

Specifies menu item type.

Unit

cxWebMenus

TcxWebMenuBreak = (mbNone, mbBreak);

Description

The TcxWebMenuBreak type values specify whether a menu item is a separator.  These values are used to set the Break property value for the TcxWebMenuItem class.

The following values are available for the TcxWebMenuBreak type:

Value	Description
mbNone	A menu item is not a separator.
mbBreak	A menu item is a separator.


TcxWebMenuPopupType
TcxWebMenuPopupType type

Specifies the direction to which the child menu of a menu item is displayed.

Unit

cxWebMenus

TcxWebMenuPopupType = (ptToLeft, ptToRight);

Description

These type values specify whether the child menu of a menu item is displayed to the right or to the left of it.  These values are used to set the PopupType property values of the TcxWebPopupMenu component and the PopupType property of the TcxWebMainMenu control.

The following values are available for the TcxWebMenuPopupType type:

Value	Description
ptToLeft	The child menu appears to the left of a menu item.
ptToRight	The child menu appears to the right of a menu item.


cxWebTV Unit Overview
cxWebTV Unit

Classes

TcxWebTreeItem

TcxWebTreeView

Other Types

TcxWebTreeViewEvent

TcxWebTVCollapsingEvent

TcxWebTVExpandingEvent

TcxWebTVItemEvent


TcxWebTreeViewEvent
TcxWebTreeViewEvent type

Contains values specifying custom event types for the web tree view.

Unit

cxWebTV

TcxWebTreeViewEvent = (teOnTreeItemClick, teOnTreeItemCollapse, teOnTreeItemExpand);

Description

The TcxWebTreeViewEvent type specifies the type of custom client-side events supported by a web tree view control.  These values are used to set the EventType property of the tree view control’s custom events, if any.  Custom events of a web control are available via the CustomEvents property.

The following values are available in the TcxWebTreeViewEvent type:

Value	Description
teOnTreeItemClick	Fires when clicking a tree view item.
teOnTreeItemCollapse	Fires when collapsing a tree view item.
teOnTreeItemExpand	Fires when expanding a tree view item.


TcxWebTreeItem
TcxWebTreeItem Object

Hierarchy          Properties          Methods          See Also

Represents a tree view control item.

Unit

cxWebTV

TcxWebTreeItem = class(TObject)

Description

The TcxWebTreeView control allows you to display a hierarchical set of items.  Each item within the tree is represented by the TcxWebTreeItem object.  Tree view items can have a number of child items, which can also have children, etc.  The list of child items is stored within the Items property of the TcxWebTreeItem object.  The root item, which contains top-level items, can be accessed via the Items property of the TcxWebTreeView class.

Each tree view item can be associated with various types of data.  Items can display text strings and images.  These are represented by the Text and ImageIndex properties.  In addition, each item can contain an HTML link specified by the URL property.  This can be a hyperlink, javascript code, etc.  Finally, you can associate each tree view item with a particular object, the pointer to which is specified by the Data property.

The TcxWebTreeItem object also contains a number of properties and methods used to manage its child items.


TcxWebTreeItem Hierarchy
Hierarchy

TObject


Properties for TcxWebTreeItem
TcxWebTreeItem Properties

TcxWebTreeItem          Legend

In TcxWebTreeItem

Count

Data

Expanded

HasChildren

Hint

ImageIndex

Index

Items

Level

Name

Owner

Parent

Text

URL


Methods for TcxWebTreeItem
TcxWebTreeItem Methods

TcxWebTreeItem          Legend

In TcxWebTreeItem

AddChild

Collapse

Create

DeleteChildren

Destroy

Expand

IndexOf

InsertChild

ReadData

WriteData


TcxWebTreeItem.Count

TcxWebTreeItem          See Also

Returns the number of child items for a tree view item.

property Count: Integer;

Description

Each tree view item can have a number of child items.  The child items list is stored within the Items property of the TcxWebTreeItem object.  Use the Count property to determine the number of items in that list.  This property can be used in conjunction with the Items property to iterate through the child items of a tree view item.

Items are zero-based indexed within the child items list.  Thus Count is always one greater than the index of the last item.

ReadOnly Property


TcxWebTreeItem.Data

TcxWebTreeItem

Contains data associated with a tree view item.

property Data: Pointer;

Description

You can associate any data you need with a tree view item.  For instance, you may have a hierarchical structure of objects in your application corresponding to tree view items.  The best way to implement data processing is to associate these objects with the items of your tree view control.  This can be implemented by assigning a pointer to the desired object to the Data property of the corresponding tree view item.


TcxWebTreeItem.Expanded

TcxWebTreeItem          See Also

Specifies whether the tree view item is expanded.

property Expanded: Boolean;

Description

Each tree view item can have a number of child items.  You can control the visibility of child items by expanding or collapsing their parent item.  Once the parent item is expanded, the child items of the next level become visible.  When the parent item is collapsed the child items are hidden.

The Expanded property specifies whether the tree view item is expanded.  Set this property to True to make child items visible.  Setting this property to False hides them.

You can also expand/collapse tree view items via the Expand and Collapse methods of the TcxWebTreeItem object.  If you want to expand/collapse all items within a tree view control, you should use the FullExpand and FullCollapse methods of the corresponding TcxWebTreeView object.


TcxWebTreeItem.HasChildren

TcxWebTreeItem

Returns a value indicating whether a tree view item has child items.

property HasChildren: Boolean;

Description

Use the HasChildren property to determine whether a tree view item has child items.  This property returns True if the item has at least one child item.  Otherwise, it returns False.

You can access the child items’ list via the Items property.  Use the Count property to determine the number of items in that list.

ReadOnly Property


TcxWebTreeItem.Hint

TcxWebTreeItem          See Also

Specifies the hint text of a tree view item.

property Hint: string;

Description

Use the Hint property to specify the text string that appears when the mouse pointer hovers over a tree view item.


TcxWebTreeItem.ImageIndex

TcxWebTreeItem          See Also

Specifies the image displayed within a tree view item.

property ImageIndex: Integer;

Description

Each item can display an image before its text.  In order to use this feature, you should assign the TcxWebImageList component containing the desired list of images to the Images property of the TcxWebTreeView control.  The ImageIndex property specifies the index of the image that will be displayed within a tree view item.  Images are zero-based indexed within the TcxWebImageList component.

Use the ShowImages property of the TcxWebTreeView control to specify the visibility of images assigned to items.

You can also specify custom expanding/collapsing images for the parent tree view items.  They are set via the CollapsedImageIndex and ExpandedImageIndex properties of the TcxWebTreeView control.

The text displayed within the item is specified by the Text property.


TcxWebTreeItem.Index

TcxWebTreeItem          See Also

Returns the index of a tree view item within the parent’s child items collection.

property Index: Integer;

Description

Each tree view item has a parent item.  The parent item for top-level items is referred to as a "root item" which is represented by the Items property of the TcxWebTreeView object.  Thus each tree view item is contained within the child list of its parent item (the Items property of the corresponding TcxWebTreeItem object).  Use the Index property to retrieve the index of a tree view item within the parent’s child items’ collection.  Use the Parent property to retrieve the parent item of this tree view item.

ReadOnly Property


TcxWebTreeItem.Items

TcxWebTreeItem          See Also

Contains a list of child items.

property Items[Index:Integer]: TcxWebTreeItem;

Description

Use the Items property to access child items of a tree view item.  You can use this property to manipulate child items (add, delete, etc.) as well as to access the properties of an individual child item.  The number of items in the list is specified by the Count property.  The Items and Count properties can be used in conjunction to iterate through the child items list.

Items are zero-based indexed within the list.  Thus the Count property value is always one greater than the index of the last item.

ReadOnly Property


TcxWebTreeItem.Level

TcxWebTreeItem

Returns the index of the level to which tree view items belong.

property Level: Integer;

Description

Each item has a level index value assigned based on the hierarchical structure of the tree view.  Since the level index is zero-based, the top-level items have zero level indexes.  The level indexes of their child items are 1, etc.  Use the Level property to retrieve the level index of a tree view item.

ReadOnly Property


TcxWebTreeItem.Name

TcxWebTreeItem

Specifies the string used to label a tree view item.

property Name: string;

Description

Use the Name property to label a tree view item.  Though the tree view control labels its items with default names, you can assign a more appropriate name when needed.  This is useful if you want to access items by their names.  This can be done via the ItemByName method of the TcxWebTreeView control.

If the Text property value is an empty string, the tree view item displays the text specified by the Name property.


TcxWebTreeItem.Owner

TcxWebTreeItem          See Also

Returns the TcxWebTreeView object owning a tree view item.

property Owner: TcxWebTreeView;

Description

Use the Owner property to retrieve the TcxWebTreeView object, representing the tree view control to which an item belongs.

When creating tree view items at runtime, you should pass the item owner as a parameter to the Create method.

ReadOnly Property


TcxWebTreeItem.Parent

TcxWebTreeItem          See Also

Gets the parent of a tree view item.

property Parent: TcxWebTreeItem;

Description

Each tree view item has a parent item.  The parent item for the top-level items is referred to as a "root item", which is represented by the Items property of the TcxWebTreeView object.  Use the Parent property to retrieve the TcxWebTreeItem object, which represents the parent item of a tree view item.

To retrieve the item index within its parent item child list use the Index property. The Parent property returns nil for the root item of the tree view control.  The root item is accessed via the Items property of the TcxWebTreeView object.

ReadOnly Property


TcxWebTreeItem.Text

TcxWebTreeItem          See Also

Specifies the text displayed within a tree view item.

property Text: string;

Description

Use the Text property to specify the string displayed within a tree view item.  If this property contains an empty string, Name will be used instead.

You can also display images within tree view items.  Use the ImageIndex property for this purpose.


TcxWebTreeItem.URL

TcxWebTreeItem          See Also

Specifies the link invoked by a tree view item.

property URL: TcxURL;

Description

Use the URL property to specify the link invoked by clicking on a tree view item.  This property is represented by the TcxURL object.  This object allows you to specify the destination document and the window in which it is opened.


TcxWebTreeItem.AddChild

TcxWebTreeItem          See Also

Adds a child item to the child list of a tree view item.

function AddChild: TcxWebTreeItem;

Description

Use the AddChild method to add a child item to a tree view item.  The child items list is stored within the Items property of the TcxWebTreeItem object representing the item.  The Count property specifies the number of children owned by the tree view item.  Calling the AddChild method inserts a new item to the end of the child list and increments the Count property.  This method returns the TcxWebTreeItem object representing the added item.

Use the InsertChild method to insert a new child item to the specified location within the child items list.


TcxWebTreeItem.Collapse

TcxWebTreeItem          See Also

Collapses a tree view item.

procedure Collapse(ARecurse: Boolean);

Description

Each tree view item can have a number of child items.  You can control child item visibility by expanding or collapsing the parent item.  Once the parent item is expanded, child items of the next level become visible.  When the parent item is collapsed, child items are hidden.

Use the Collapse method to collapse a tree view item (make its children invisible).  The ARecurse parameter specifies whether to collapse all child items.

You can also use a number of other properties and methods to expand/collapse tree view items.  The Expanded property allows you to specify whether a tree view item is expanded.  The Expand method expands the tree view item.  You can also use the FullExpand and FullCollapse methods of the TcxWebTreeView object to expand/collapse all items within the tree view control.


TcxWebTreeItem.Create

TcxWebTreeItem          See Also

Creates a TcxWebTreeItem class instance.

constructor Create(AOwner: TcxWebTreeView);

Description

The Create method is used to create a new instance of the TcxWebTreeItem class.  It sets the Owner property to the value passed by the AOwner parameter and sets the ImageIndex property to -1.

Do not use the Create method to create new tree view items in your applications.  Use the AddChild or InsertChild method instead.


TcxWebTreeItem.DeleteChildren

TcxWebTreeItem          See Also

Clears the list of child items.

procedure DeleteChildren;

Description

Use the DeleteChildren method to remove all child items of a tree view item.  Each removed item deletes its own child items, etc.

You can add child items to your tree view item via the AddChild or InsertChild methods.


TcxWebTreeItem.Destroy

TcxWebTreeItem          See Also

Destroys the TcxWebTreeItem object.

destructor Destroy; override;

Description

The Destroy method is used to dispose of a tree view item and free any memory allocated by it.  Before calling the inherited Destroy it perform the following actions:

•	removes its child items via the DeleteChildren method call;

•	removes itself from the parent list;

•	if the parent list is empty, it is freed.


TcxWebTreeItem.Expand

TcxWebTreeItem          See Also

Expands a tree view item.

procedure Expand(ARecurse: Boolean);

Description

Each tree view item can have a number of child items.  You can control child items visibility via expanding or collapsing of the parent item.  Once the parent item is expanded, the child items of the next level become visible.  When the parent item is collapsed, the child items are hidden.

Use the Expand method to expand a tree view item (make its children visible).  The ARecurse parameter specifies whether to expand all child items.

You can also use a number of other properties and methods to expand/collapse tree view items.  The Expanded property allows you to specify whether a tree view item is expanded.  The Collapse method collapses the tree view item.  You can also use the FullExpand and FullCollapse methods of the TcxWebTreeView object to expand/collapse all items within the tree view control.


TcxWebTreeItem.IndexOf

TcxWebTreeItem          See Also

Returns the index of a specific child item.

function IndexOf(Value: TcxWebTreeItem): Integer;

Description

Use the IndexOf method to determine the index of a tree view item within the child items list.  Child items of the tree view item are stored within the Items collection and are zero-based indexed.  If the specified item is not found within the list, the IndexOf method returns –1.

You can also determine the index of a tree view item within its parent list via the Index property.


TcxWebTreeItem.InsertChild

TcxWebTreeItem          See Also

Inserts a child item to the specified position within the child items list.

function InsertChild(BeforeItem: TcxWebTreeItem): TcxWebTreeItem;

Description

Use the InsertChild method to insert a new tree view item to the child items list.  The list of child items is represented by the Items property.  The number of items in the list can be obtained via the Count property.  The InsertChild method inserts a new item to the list and increments the Count property value.  The BeforeItem parameter specifies the child item whose position will be occupied by the inserted item.  The InsertChild method returns the TcxWebTreeItem object representing the inserted item.

Use the AddChild method to add a child item to the end of the child item list.


TcxWebTreeItem.ReadData

TcxWebTreeItem          See Also

Reads tree view item properties from a stream.

procedure ReadData(Stream: TStream);

Description

The ReadData method is implemented to read the values of the tree view item’s properties from a stream.  The Stream parameter specifies the source stream.

This method is used by the ReadItems method of the TcxWebTreeView control.  It allows the tree view control to persist its items.


TcxWebTreeItem.WriteData

TcxWebTreeItem          See Also

Writes tree view item properties to a stream.

procedure WriteData(Stream: TStream);

Description

The WriteData method is implemented to write the values of the tree view item’s properties to a stream.  The Stream parameter specifies the destination stream.

This method is used by the WriteItems method of the TcxWebTreeView control.  This allows the tree view control to persist its items.


TcxWebTreeView
 TcxWebTreeView Object

Hierarchy          Properties          Methods          Events          See Also

Represents a tree view control.

Unit

cxWebTV

TcxWebTreeView = class(TcxWebControl)

Description

Use the TcxWebTreeView control to display a set of hierarchically arranged items within a page.  Each item (including the root item) is represented by the TcxWebTreeItem object.  The root item is invisible.  It is just the container for top-level items.  Since every item within a tree view control can have its own child items, you can create hierarchical structure of any complexity.  Each parent item can be expanded or collapsed to control the visibility of its children.

The TcxWebTreeView control provides an easy way to create and customize its structure and each individual item.  The Item Editor dialog is used for this purpose.  Right-click the tree view control and choose the Items Editor… item of the context menu to call this dialog.

The TcxWebTreeView control supports a set of custom events which you can handle straight on the client side.  These event types are specified by the TcxWebTreeViewEvent type.


TcxWebTreeView Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl


Properties for TcxWebTreeView
TcxWebTreeView Properties

TcxWebTreeView          Legend

In TcxWebTreeView

AutoSort

CollapsedImageIndex

ExpandedImageIndex

ForcePostBack

Height

Images

Indent

Items

ShowButtons

ShowImages

Width

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebTreeView
TcxWebTreeView Methods

TcxWebTreeView          Legend

In TcxWebTreeView

AddItem

AssignItems

CanCollapse

CanExpand

Clear

Click

Collapse

Create

DefineProperties

Destroy

DoClick

DoToggle

Expand

FullCollapse

FullExpand

ItemByName

DoSetValues

Notification

ReadItems

RegisterActions

RegisterEvents

RegisterRenderers

RegisterValues

RestoreState

ScriptsSubscription

ValidateItemName

WriteItems

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

SetState

ValidateContainer


Events for TcxWebTreeView
TcxWebTreeView Events

TcxWebTreeView          Legend

In TcxWebTreeView

OnClick

OnCollapsed

OnCollapsing

OnExpanded

OnExpanding

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebTreeView.AutoSort

TcxWebTreeView

Specifies whether the tree view items are automatically sorted by their values.

property AutoSort: Boolean;

Description

Set the AutoSort property to True to automatically sort the tree view items in ascending order by their values.  Sorting is applied to all tree view items, not just top level items.  Child items are also sorted within their parents.  If the AutoSort property is set to True, a newly created tree view item will be displayed within the appropriate place among the items of the same level.

If the AutoSort property is False, the tree view items are not sorted.  In this case, they are displayed in the order set during item creation.

The default value of the AutoSort property is False.


TcxWebTreeView.CollapsedImageIndex

TcxWebTreeView          See Also

Specifies the expanding image.

property CollapsedImageIndex: Integer;

Description

Each item within the tree view can have a number of child items.  Parent items can be expanded and collapsed to change the visibility of their child items.  This can be done by clicking the corresponding control images, which are ‘+’ and ‘-’ by default.  The ‘+’ button corresponds to collapsed items.  You can change the control image representing a collapsed item via the CollapsedImageIndex property.

The CollapsedImageIndex property value is the index of an image within the collection specified by the Images property.  If no TcxWebImageList object is assigned to the Images property or the CollapsedImageIndex property is –1, the default ‘+’ image will be displayed.

Use the ExpandedImageIndex property to specify the control image corresponding to expanded items.  Control button visibility is specified by the ShowButtons property.

The default value of the CollapsedImageIndex property is -1.


TcxWebTreeView.ExpandedImageIndex

TcxWebTreeView          See Also

Specifies the collapsing image.

property ExpandedImageIndex: Integer;

Description

Each item within a tree view can have a number of child items.  Parent items can be expanded and collapsed to change the visibility of their child items.  This can be done by clicking the corresponding control images, which are ‘+’ and ‘-’ by default.  The ‘-’ button corresponds to expanded items.  You can change the control image representing an expanded item via the ExpandedImageIndex property.

The ExpandedImageIndex property value is the index of an image within the collection specified by the Images property.  If no TcxWebImageList object is assigned to the Images property or the ExpandedImageIndex property is –1, the default ‘-‘ image will be displayed.

Use the CollapsedImageIndex property to specify the control image corresponding to expanded items.  Control button visibility is specified by the ShowButtons property.

The default value of the ExpandedImageIndex property is -1.


TcxWebTreeView.ForcePostBack

TcxWebTreeView

Specifies whether expanding or collapsing an item forces post back.

property ForcePostBack: Boolean;

Description

Set the ForcePostBack property to True to submit the form each time a tree view item is expanded or collapsed.  This refreshes the page module, thus you can update page elements, which depend on the state of the TcxWebTreeView control.

The following events such as: OnExpanding, OnCollapsing, OnExpanded and OnCollapsed also force post back when tree view items are expanded or collapsed.

Note: The ForcePostBack property is always True, if the client browser is Netscape Navigator 4.0.

The default value of the ForcePostBack property is False.


TcxWebTreeView.Height

TcxWebTreeView          See Also

Specifies the minimum possible height of a tree view control.

property Height: Integer;

Description

Use the Height property to specify the minimum height of a tree view control in pixels.  The height of the area occupied by the tree view can become more than specified by this property.  On the other hand, the tree view control occupies the area specified by the Height property even if it requires less space vertically.

The width of the TcxWebTreeView control is specified by its Width property.


TcxWebTreeView.Images

TcxWebTreeView          See Also

Specifies a set of images that can be displayed within items or as expanding or collapsing images.

property Images: TcxWebImageList;

Description

The tree view control allows you to change the images used to expand/collapse items.  Moreover, each tree view item can display an image next to text.  The source of images used within the tree view control is specifies by the Images property.  You should use the TcxWebImageList component to set this property value.  Once this component is assigned, you can specify collapsing/expanding images via the ExpandedImageIndex and CollapsedImageIndex properties respectively.  The image displayed within an item is specified by the ImageIndex property of the corresponding TcxWebTreeItem object.

Note that all the properties specifying images use the image indexes within the TcxWebImageList component for their values.


TcxWebTreeView.Indent

TcxWebTreeView

Specifies the horizontal indent child items have relative to their parent.

property Indent: Integer;

Description

Use the Indent property to specify the horizontal indent child items have relative to their parent.  This property value is set in pixels.  Note that this property also specifies the indent of top-level items relative to the left edge of the tree view control.

The default value of the Indent property is 20.


TcxWebTreeView.Items

TcxWebTreeView          See Also

Returns the root item of a tree view control.

property Items: TcxWebTreeItem;

Description

A tree view control represents a hierarchical structure of items.  It has a single root item, which can have a number of child items.  Each child item can have its own children, etc.  The Items property returns the TcxWebTreeItem object representing the root item of the tree view.  This can be used to access top-level items.

The root item is only used as storage for all items within the tree view.  It has no visual representation.

ReadOnly Property


TcxWebTreeView.ShowButtons

TcxWebTreeView          See Also

Specifies whether expanding and collapsing images are visible.

property ShowButtons: Boolean;

Description

Each tree view item can have a number of child items.  Parent items can be expanded and collapsed to change the visibility of their child items.  This can be done by clicking the corresponding control images, which are ‘+’ and ‘-’ by default.  The ShowButtons property specifies whether these images are visible.

If control images are invisible, tree view items can only be expanded or collapsed via code.  You can use the Expanded property and the Expand or Collapse method of the TcxWebTreeItem object for this purpose.  There is also the ability to expand or collapse all tree view items at once.  You should use the FullExpand or FullCollapse method of the TcxWebTreeView object to accomplish this.

The default value of the ShowButtons property is True.


TcxWebTreeView.ShowImages

TcxWebTreeView          See Also

Specifies whether images are displayed within tree view items.

property ShowImages: Boolean;

Description

Each tree view item can display an image next to its text.  The displayed image is specified by the ImageIndex property of the corresponding TcxWebTreeItem property.

The ShowImages property indicates whether specified images are displayed within tree view items.  Set this property to False to hide assigned images.  Otherwise, images are displayed before item text.

The default value of the ShowImages property is True.


TcxWebTreeView.Width

TcxWebTreeView          See Also

Specifies the minimum possible width of a tree view control.

property Width;

Description

Use the Width property to specify the minimum width of a tree view control in pixels.  The width of the area occupied by the tree view can be more than that specified by this property.  The tree view control occupies the area specified by the Width property even if it requires less space horizontally.

The height of the TcxWebTreeView control is specified by its Height property.


TcxWebTreeView.AddItem

TcxWebTreeView          See Also

Adds a top-level item.

function AddItem: TcxWebTreeItem;

Description

Use the AddItem method to add an item to the end of the top-level items collection.  The collection of the top-level items is represented by the child list of the root item.  The root item of the tree view can be accessed via the Items property of the TcxWebTreeView object.

Calling the AddItem does the following two things:

•	adds a TcxWebTreeItem object to the end of the Items collection of the root item;

•	increments the Count property of the TcxWebTreeItem object representing the root item.

The AddItem method returns the newly added TcxWebTreeItem object.


TcxWebTreeView.AssignItems

TcxWebTreeView

Assigns the items of one tree view control to another.

procedure AssignItems(Source: TcxWebTreeView);

Description

Use the AssignItems method to copy the items of the specified tree view control to another.  The source control is specified by the Source parameter.  The TcxWebTreeView object, whose AssignItems method is called, is the destination object.

When assigning, destination control items are removed in advance.


TcxWebTreeView.CanCollapse

TcxWebTreeView          See Also

Returns the value that identifies whether a specific item can be collapsed.

function CanCollapse(AItem: TcxWebTreeItem): Boolean; dynamic;

Description

This method is called when an item of the tree view control is about to be collapsed.  Its return value is used to determine whether it is allowable to collapse the item.  The item is specified by the AItem parameter. If the OnCollapsing event handler isn’t assigned, the CanCollapse method returns True.  Otherwise, it returns the AllowCollapse parameter value of the executed OnCollapsing event handler.

You can override this method in descendant classes to perform additional processing to determine whether the specified item can be collapsed.


TcxWebTreeView.CanExpand

TcxWebTreeView          See Also

Returns the value that identifies whether a specific item can be expanded.

function CanExpand(AItem: TcxWebTreeItem): Boolean; dynamic;

Description

This method is called when a tree view control item is about to be expanded.  Its return value is used to determine whether it is allowable to expand the item.  The item is specified by the AItem parameter. If the OnExpanding event handler isn’t assigned, the CanExpand method returns True.  Otherwise, it returns the AllowExpansion parameter value of the executed OnExpanding event handler.

You can override this method in descendant classes to perform additional processing to determine whether the specified item can be expanded.


TcxWebTreeView.Clear

TcxWebTreeView          See Also

Removes all items tree view control items.

procedure Clear;

Description

Use the Clear method to remove all tree view control items.  This method simply calls the DeleteChildren method of the TcxWebTreeItem object representing the root item of the tree view.  Since the DeleteChildren method is recursive, it deletes all children of the deleted item.  Thus the tree view control will have no items after the Clear method has been called.


TcxWebTreeView.Click

TcxWebTreeView          See Also

Runs the OnClick event handler if it is assigned.

procedure Click(AItem: TcxWebTreeItem); dynamic;

Description

The Click method is called by the DoClick method, which instantiates an item by its name received with the request.  If the instantiated TcxWebTreeItem object, transmitted as an AItem parameter, is not nil, the Click method executes the OnClick event handler, if assigned.

You can override this method in descendant classes to perform additional actions before or after running the OnClick event handler.


TcxWebTreeView.Collapse

TcxWebTreeView          See Also

Runs the OnCollapsed event handler, if assigned.

procedure Collapse(AItem: TcxWebTreeItem); dynamic;

Description

The Collapse method is called after a tree view item has been collapsed.  The AItem parameter specifies the collapsed item.  This method simply checks whether the OnCollapsed event handler is assigned and runs it, if so.

You can override this method in descendant classes to perform additional actions after a tree view item has been collapsed.


TcxWebTreeView.Create

TcxWebTreeView          See Also

Creates a TcxWebTreeView class instance.

constructor Create(AOwner: TComponent); override;

Description

Use the Create method to create a tree view control at runtime.  After calling the inherited constructor it initializes its root item and sets its property values to their default values.  The AOwner parameter specifies the page module to which the created TcxWebTreeView control will belong.

Remember to set the Parent property in a proper manner.


TcxWebTreeView.DefineProperties

TcxWebTreeView          See Also

Registers unpublished properties that should be persisted.

procedure DefineProperties(Filer: TFiler); override;

Description

As implemented in the TcxWebTreeView class, this method defines methods that are intended for reading and writing the Items property from/to a stream.  These methods are ReadItems and WriteItems respectively.  This is done to persist the unpublished Items property representing the root item containing all tree view items.

This method overrides the DefineProperties method of the TPersistent class.  You can override the DefineProperties method in descendant classes to persist your unpublished properties.


TcxWebTreeView.Destroy

TcxWebTreeView          See Also

Destroys the TcxWebTreeView control.

destructor Destroy; override;

Description

The Destroy method is used to dispose the tree view control and free any allocated memory.  Before calling the inherited destructor, it frees the root item with all its children.

Do not use the Destroy method in your applications.  Call the Free method instead.


TcxWebTreeView.DoClick

TcxWebTreeView          See Also

Runs the Click method with the appropriate parameter.

procedure DoClick(const Parameters: TcxActionParameters);

Description

The DoClick method is registered as a handler for the OnClick server side event (action).  The Parameters parameter specifies data required to handle this event.  The DoClick method instantiates the TcxWebTreeItem object representing the clicked item using data transmitted within its parameter.  Then it calls the Click method transmitting the instantiated object.

This method cannot be overridden in descendant classes.  You should override the Click method in order to perform additional actions before or after the OnClick event is handled.


TcxWebTreeView.DoToggle

TcxWebTreeView

Expands or collapses a tree view item.

procedure DoToggle(const Parameters: TcxActionParameters);

Description

The DoToggle method is used to expand or collapse a tree view item when a user clicks it.  The TcxWebTreeItem object is instantiated using the information transmitted within Parameters.  Once done, its Expand or Collapse method is called.


TcxWebTreeView.Expand

TcxWebTreeView          See Also

Runs the OnExpanded event handler, if assigned.

procedure Expand(AItem: TcxWebTreeItem); dynamic;

Description

The Expand method is called after a tree view item has been expanded.  The AItem parameter specifies the expanded item.  This method simply checks whether the OnExpanded event handler is assigned and runs it, if so.

You can override this method in descendant classes to perform additional actions after a tree view item has been expanded.


TcxWebTreeView.FullCollapse

TcxWebTreeView          See Also

Collapses all tree view control items.

procedure FullCollapse;

Description

Use the FullCollapse method to collapse all items within the TcxWebTreeView control.  Only the top-level items are visible after it has been performed.

Use the FullExpand to expand all items within the tree view control.  You can also expand/collapse particular items using the following properties and methods of the corresponding TcxWebTreeItem object:

•	The Expanded property allows you to control whether an item is expanded or collapsed by setting it to True or False respectively.

•	The Collapse method collapses an item.

•	The Expand method expands an item.


TcxWebTreeView.FullExpand

TcxWebTreeView          See Also

Expands all tree view control items.

procedure FullExpand;

Description

Use the FullExpand method to collapse all items within the TcxWebTreeView control.  All tree view items are visible after it has been performed.

Use the FullCollapse to expand all items within the tree view control.  You can also expand/collapse particular items using the following properties and methods of the corresponding TcxWebTreeItem object:

•	The Expanded property allows you to control whether an item is expanded or collapsed by setting it to True or False respectively.

•	The Collapse method collapses an item.

•	The Expand method expands an item.


TcxWebTreeView.ItemByName

TcxWebTreeView

Returns the object representing an item with a specified name.

function ItemByName(const AName: string): TcxWebTreeItem;

Description

Use the ItemByName method to retrieve the TcxWebTreeItem object, which represents a tree view item,  with the specified name.  Item name is specified by the AName parameter.  The parameter value is compared to the value of the tree view item’s Name property.

If the item with the specified name is not found, the ItemByName method returns nil.


TcxWebTreeView.DoSetValues

TcxWebTreeView          See Also

Updates the tree view state based on the changes made at the client side of the application.

procedure DoSetValues; override;

Description

A user can expand and collapse tree view items within his/her browser.  Once the form is submitted, it is necessary to update the layout of the tree view to generate a proper response.  This means it is necessary to update the properties of those items that were expanded or collapsed by a user.  The DoSetValues method extracts the information it needs from the request and calls the RestoreState method.  This method is used to update the state of tree view items according to the information transmitted within the request.

This method implements the DoSetValues method of the IcxWebValues interface.  You can override it in descendant classes to perform additional actions used to update your control.


TcxWebTreeView.Notification

TcxWebTreeView          See Also

Responds to notifications that components are being created or destroyed.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

The Notification method is utilized to perform actions necessary to update a component when other components are being added or removed.  The operation type is specified by the Operation parameter.  The component being inserted or deleted is specified by the AComponent parameter.

As implemented in the TcxWebTreeView class, this method responds to deleting the TcxWebImageList component, representing its Images property.  In such an instance, the Images property is set to nil.

This method overrides the Notification method of the TcxWebComponent class.  You can override it in descendant classes to properly respond to component operations.


TcxWebTreeView.ReadItems

TcxWebTreeView

Initializes items using their stream representation.

procedure ReadItems(Stream: TStream);

Description

The ReadItems method is used to instantiate tree view items using their stream representation.  The stream used for this purpose is specified by the Stream parameter.

The ReadItems method performs the following two things sequentially:

•	removes all tree view items;

•	calls the ReadData method of the root item, transmitting the stream as a parameter.

The ReadItems method is used to persist the Items property value, since it is not published.  It is also used when calling the AssignItems method.

The Items property is written to a stream by the WriteItems method.


TcxWebTreeView.RegisterActions

TcxWebTreeView          See Also

Registers server side event handlers.

procedure RegisterActions; override;

Description

The RegisterActions method registers two actions: one corresponds to the OnClick event and the other concerns expanding/collapsing an item.  The DoClick method is responsible for handling the click event.  The DoToggle method manages OnCollapsed, OnExpanded, OnCollapsing and OnExpanding event handling.

This method overrides the RegisterActions method of the TcxWebComponent class.  You can override the RegisterActions method in descendant classes to register additional actions.


TcxWebTreeView.RegisterEvents

TcxWebTreeView          See Also

Registers client side events required by a tree view to function properly.

procedure RegisterEvents; override;

Description

The RegisterEvents method registers the client side OnClick event in addition to those registered in the inherited method.  This event is used for expanding/collapsing items within the browser and during form submission, if the OnClick event handler is assigned.

This method implements the RegisterEvents method of the IcxWebEvents interface.  You can override it in descendant classes to register additional client side events.


TcxWebTreeView.RegisterRenderers

TcxWebTreeView          See Also

Registers the renderer classes that generate HTML code representing the tree view control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers three specific renderer classes used to render HTML code for a tree view control.  The browser types for which the registered renderers are designed are Internet Explorer, Netscape Navigator 4.0, and Netscape Navigator 6.0.  The renderer class designed for Internet Explorer is the default.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for your tree view control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxWebTreeView.RegisterValues

TcxWebTreeView          See Also

Registers the HTML elements, which contain data related to a component.

procedure RegisterValues; override;

Description

The RegisterValues method registers the hidden input containing information about expanded and collapsed items.  This allows the tree view control to update itself after a user has expanded and collapsed some items in his/her browser.  The DoSetValues method implements the update of control properties.

This method implements the RegisterValues method of the IcxWebValues interface.  You can override it in descendant classes to register your own HTML elements.


TcxWebTreeView.RestoreState

TcxWebTreeView

Updates the tree view with respect to the changes made by a user.

procedure RestoreState(const AState: string);

Description

A user can expand and collapse tree view items within his/her browser.  The information about expanded and collapsed items is written to a special hidden input registered by the RegisterValues method.  Once the request reaches the server side of the application, the DoSetValues method is called.  This method gets the hidden input value and calls the RestoreState method.  The RestoreState method in turn uses this value to update the control.  The AState parameter specifies the hidden input value.


TcxWebTreeView.ScriptsSubscription

TcxWebTreeView          See Also

Subscribes a tree view control to client side scripts required for its proper functioning.

procedure ScriptsSubscription; override;

Description

The ScriptsSubscription method subscribes a tree view control to the post back and style change scripts.  In addition, it calls the inherited ScriptsSubscription method.

This method implements the ScriptsSubscription method of the IcxWebScripts interface.  You can override this method in descendant classes to subscribe your control to additional scripts.


TcxWebTreeView.ValidateItemName

TcxWebTreeView

Raises an exception if the item with the specified name already exists.

procedure ValidateItemName(const Value: string);

Description

The ValidateItemName method is used to check whether the tree view control contains an item with a specified name.  The name is specified by the Value parameter.  If such an item exists, an exception is raised.


TcxWebTreeView.WriteItems

TcxWebTreeView

Writes information about items to a stream.

procedure WriteItems(Stream: TStream);

Description

The WriteItems method is used to create stream representation of tree view items.  The stream used for this purpose is specified by the Stream parameter.

The WriteItems method calls the WriteData method of the root item, transmitting the stream as a parameter. This method is used to persist the Items property value, since it is not published.  It is also used when calling the AssignItems method.

The Items property is read from a stream by the ReadItems method.


TcxWebTreeView.OnClick

TcxWebTreeView          See Also

Fires when a user clicks a tree view item.

type

  TcxWebTVItemEvent = procedure(Sender: TObject; Item: TcxWebTreeItem) of object;

property OnClick: TcxWebTVItemEvent;

Description

Write an OnClick event handler to perform specific actions when a user clicks a tree view item.  The clicked item is transmitted to it as an Item parameter.  The Sender parameter represents the tree view control, whose item was clicked.

The OnClick event is invoked by the Click method.  You can override the Click method in descendant classes to perform additional actions before or after the OnClick event handler is executed.


TcxWebTreeView.OnCollapsed

TcxWebTreeView          See Also

Fires after a tree view item has been collapsed.

type

  TcxWebTVItemEvent = procedure(Sender: TObject; Item: TcxWebTreeItem) of object;

property OnCollapsed: TcxWebTVItemEvent;

Description

Write an OnCollapsed event handler to perform specific actions each time a tree view item has been collapsed.  The collapsed item is transmitted to it as an Item parameter.  The Sender parameter represents the tree view control whose item was collapsed.

The OnCollpased event is invoked by the Collapse method.  You can override the Collapse method in descendant classes to perform additional actions before or after the OnCollapsed event handler is executed.


TcxWebTreeView.OnCollapsing

TcxWebTreeView          See Also

Fires before a tree view item is collapsed.

type

  TcxWebTVCollapsingEvent = procedure(Sender: TObject; Item: TcxWebTreeItem; var AllowCollapse: Boolean) of object;

property OnCollapsing: TcxWebTVCollapsingEvent;

Description

Write an OnCollapsing event handler to perform specific actions each time a tree view item is collapsed.  The collapsed item is transmitted to it as an Item parameter.  The Sender parameter represents the tree view control, whose item is about to be collapsed.  You can prohibit collapse of the item by setting the AllowCollapse parameter to False.  This parameter is True by default.

The OnCollpasing event is invoked by the CanCollapse method.  You can override the CanCollapse method in descendant classes to perform additional actions before or after the OnCollapsing event handler is executed.


TcxWebTreeView.OnExpanded

TcxWebTreeView          See Also

Fires after a tree view item has been expanded.

type

  TcxWebTVItemEvent = procedure(Sender: TObject; Item: TcxWebTreeItem) of object;

property OnCollapsed: TcxWebTVItemEvent;

Description

Write an OnExpanded event handler to perform specific actions each time a tree view item has been expanded.  The expanded item is transmitted to it as an Item parameter.  The Sender parameter represents the tree view control whose item was expanded.

The OnExpanded event is invoked by the Expand method.  You can override the Expand method in descendant classes to perform additional actions before or after the OnExpanded event handler is executed.


TcxWebTreeView.OnExpanding

TcxWebTreeView          See Also

Fires before a tree view item is expanded.

type

  TcxWebTVExpandingEvent = procedure(Sender: TObject; Item: TcxWebTreeItem; var AllowExpansion: Boolean) of object;

property OnExpanding: TcxWebTVExpandingEvent;

Description

Write an OnExpanding event handler to perform specific actions each time a tree view item is expanded.  The expanded item is transmitted to it as an Item parameter.  The Sender parameter represents the tree view control, whose item is about to be expanded.  You can prohibit expansion of the item by setting the AllowExpansion parameter to False.  This parameter is True by default.

The OnExpanding event is invoked by the CanExpand method.  You can override the CanExpand method in descendant classes to perform additional actions before or after the OnExpanding event handler is executed.


TcxWebTVCollapsingEvent
TcxWebTVCollapsingEvent type

Represents the OnCollapsing event type of the TcxWebTreeView control.

Unit

cxWebTV

TcxWebTVCollapsingEvent = procedure(Sender: TObject; Item: TcxWebTreeItem; var AllowCollapse: Boolean) of object;

Description

The Sender parameter specifies the tree view control that invoked the event.  The Item parameter identifies the tree view item to be collapsed.  The AllowCollapse parameter allows you to specify whether the item should be collapsed.


TcxWebTVExpandingEvent
TcxWebTVExpandingEvent type

Represents the OnExpanding event type of the TcxWebTreeView control.

Unit

cxWebTV

TcxWebTVExpandingEvent = procedure(Sender: TObject; Item: TcxWebTreeItem; var AllowExpansion: Boolean) of object;

Description

The Sender parameter specifies the tree view control that invoked the event.  The Item parameter identifies the tree view item to be expanded.  The AllowExpansion parameter allows you to specify whether the item should be expanded.


TcxWebTVItemEvent
TcxWebTVItemEvent type

Specifies the type of TcxWebTreeView events that doesn’t require any parameters except for the sender and tree view item.

Unit

cxWebTV

TcxWebTVItemEvent = procedure(Sender: TObject; Item: TcxWebTreeItem) of object;

Description

TcxWebTVItemEvent represents the type for the OnClick, OnCollapsed and OnExpanded events of the TcxWebTreeView control.  The Sender parameter specifies the tree view control that invoked the event.  The Item parameter specifies the item on which a specific action was performed.


cxWebGrids Unit Overview
cxWebGrids Unit

Classes

TcxCustomWebGrid

TcxWebCheckColumnHelper

TcxWebColumn

TcxWebColumnHelper

TcxWebGridImageIndexes

TcxWebHyperTextColumnHelper

TcxWebImageColumnHelper

TcxWebListColumnHelper

TcxWebTextColumnHelper

Other Types

TcxIndicatorType

TcxWebColumnViewType

TcxWebGridEvent

TcxWebGridMode

TcxWebGridSortMode


TcxWebGridEvent
TcxWebGridEvent type

Contains values specifying custom event types for the web grid.

Unit

cxWebGrids

TcxWebGridEvent = (geOnRowClick, geOnHeaderClick, geOnStartDragHeader, geOnEndDragHeader, geOnIndicatorClick, geOnExpandButtonClick);

Description

The TcxWebGridEvent type specifies the types of custom client-side events supported by a web grid control.  These values are used to set the EventType property of the grid control’s custom events, if any.  Custom events of a web control can be accessed via the CustomEvents property.

The following values are available for the TcxWebGridEvent type:

Value	Description
geOnRowClick	Fires when clicking a grid row.
geOnHeaderClick	Fires when clicking a column header.
geOnStartDragHeader	Fires when a column header dragging starts.
geOnEndDragHeader	Fires when dropping a column header after dragging.
geOnIndicatorClick	Fires when clicking an indicator button.
geOnExpandButtonClick	Fires when clicking an expanding button.


TcxIndicatorType
TcxIndicatorType type

Represents a grid’s indicator type.

Unit

cxWebGrids

TcxIndicatorType = (itCursor, itDataOp);

Description

The TcxIndicatorType is used to specify the type of indicator used by the grid control.  The values listed for this type are used to set the value of the IndicatorType property of the TcxWebDBGrid object.

The following values are available:

Value	Description
itCursor	When the grid control is in edit mode, the indicator bar contains buttons used to navigate through nodes and a button indicating the focused node.  In edit mode, it contains buttons used to post or cancel changes to the current record.
itDataOp	When the grid control is in edit mode, the indicator bar contains buttons used to insert and delete nodes.  In edit mode, it contains buttons used to post or cancel changes to the current record.


TcxWebColumnViewType
TcxWebColumnViewType type

Contains values representing available view types.

Unit

cxWebGrids

TcxWebColumnViewType = (cvtText, cvtHyperText, cvtImage, cvtList, cvtLookup, cvtCheck);

Description

The values listed in the TcxWebColumnViewType type are used to specify the manner in which a grid column displays its data.  These values are used to set the TcxWebColumn object’s ViewType property value.

The following values are available:

Value	Description
cvtText	Column data is displayed as plain text and edited by a standard text editor.
cvtHyperText	Column data is displayed as hypertext and edited by a standard text editor.
cvtImage	Column data is represented by images in both browse and edit modes.
cvtList	Column data is displayed as plain text and edited by a list editor.
cvtLookup	Column data is displayed as plain text and edited by a lookup editor.
cvtCheck	Column data is represented by check boxes in both browse and edit modes.
Note: There are two incompatible view types: cvtImage and cvtText.  You will get conversion error if you try to assign cvtText/cvtHyperText/cvtList/cvtCheck type to a column bound to an image field and vice versa.


TcxWebGridMode
TcxWebGridMode type

Contains values corresponding to possible modes for the grid control.

Unit

cxWebGrids

TcxWebGridMode = (mBrowse, mEdit);

Description

TcxWebGridMode values are used to determine whether the grid control is in browse or edit mode.  These values are returned by the Mode property of the TcxWebDBGrid control.

Value	Description
mBrowse	The grid simply displays data.
mEdit	The user is currently editing a record.


TcxWebGridSortMode
TcxWebGridSortMode type

Contains values corresponding to sort order of grid columns.

Unit

cxWebGrids

TcxWebGridSortMode = (smNone, smAscending, smDescending);

Description

TcxWebGridSortMode values are used to specify the sort order of grid column values.  These values are used to set the SortingOrder property of the TcxWebColumn class.

The following values are available:

Value	Explanation
smNone	Sort mode is not specified.  No sorting is performed.
smAscending	Records are sorted in ascending order.
smDescending	Records are sorted in descending order.


cxWebData Unit Overview
cxWebData Unit

Classes

TcxAbstractWebDataBinding

TcxBooleanFieldHelper

TcxCustomWebDataBinding

TcxCustomWebDataField

TcxCustomWebDataSource

TcxDataFieldHelper

TcxDateTimeFieldHelper

TcxFloatFieldHelper

TcxImageFieldHelper

TcxIntegerFieldHelper

TcxStdWebDataField

TcxStdWebDataFields

TcxStdWebDataSource

TcxStringFieldHelper

Interfaces

IcxWebUpdateDataSupport

IcxWebViewDataSupport

Other Types

TcxDataFieldHelperClass

TcxUpdateType

TcxWebDataSortOrder

TcxDataEvent

TcxWebDataSourceEvent


TcxWebDataSourceEvent
TcxWebDataSourceEvent type

Contains values specifying custom event types for web data sources.

Unit

cxWebData

TcxWebDataSourceEvent = (dseOnAfterSort, dseOnAfterGroup, dseOnAfterUngroup, dseOnAfterExpand, dseOnAfterMove, dseOnBeforeSort, dseOnBeforeGroup, dseOnBeforeUngroup, dseOnBeforeExpand, dseOnBeforeMove, dseOnBeforeDelete, dseOnBeforeInsert, dseOnBeforeStartEdit, dseOnBeforePostEdit, dseOnBeforeCancelEdit, dseOnBeforeRefresh);

Description

The TcxWebDataSourceEvent type specifies the types of custom client-side events supported by web data source components.  These values are used to set the EventType property of a  data source’s custom events.

The following values are available in the TcxWebDataSourceEvent type:

Value	Description
dseOnAfterSort	Fires after sorting is performed.
dseOnAfterGroup	Fires after grouping is performed.
dseOnAfterUngroup	Fires after ungrouping is performed.
dseOnAfterExpand	Fires after expanding is performed.
dseOnAfterMove	Fires after column moving is performed.
dseOnBeforeSort	Fires before sorting is performed.
dseOnBeforeGroup	Fires before grouping is performed.
dseOnBeforeUngroup	Fires before ungrouping is performed.
dseOnBeforeExpand	Fires before expanding is performed.
dseOnBeforeMove	Fires before column moving is performed.
dseOnBeforeDelete	Fires before a record is deleted.
dseOnBeforeInsert	Fires before a record is inserted.
dseOnBeforeStartEdit	Fires before editing starts.
dseOnBeforePostEdit	Fires before changes are posted.
dseOnBeforeCancelEdit	Fires before editing changes are cancelled.
dseOnBeforeRefresh	Fires before a refresh request is sent.


TcxAbstractWebDataBinding
TcxAbstractWebDataBinding Object

Hierarchy          Properties          Methods          See Also

Represents the base class for data binding objects.

Unit

cxWebData

TcxAbstractWebDataBinding = class(TPersistent);

Description

Data-aware controls are bound to data sources by means of data binding objects.  These objects provide interfaces between controls and data sources.  This means data binding objects store information about both the control and the associated data source.  The TcxAbstractWebDataBinding object provides both a Component and DataSource property for this purpose.

The descendants of the TcxAbstractWebDataBinding class should implement their abstract GetDataSource method.  Descendant classes can also provide additional properties and methods to specify a dataset field, to which a control is bound.


TcxAbstractWebDataBinding Hierarchy
Hierarchy

TPersistent


Properties for TcxAbstractWebDataBinding
TcxAbstractWebDataBinding Properties

TcxAbstractWebDataBinding          Legend

In TcxAbstractWebDataBinding

Component

DataSource


Methods for TcxAbstractWebDataBinding
TcxAbstractWebDataBinding Methods

TcxAbstractWebDataBinding          Legend

In TcxAbstractWebDataBinding

Assign

Create

GetDataSource


TcxAbstractWebDataBinding.Component

TcxAbstractWebDataBinding          See Also

Specifies the component, that uses a data-binding object to access dataset values.

property Component: TComponent;

Description

Components use TcxAbstractWebDataBinding descendants to access dataset values.  These objects serve as interfaces between the data source and component.  The Component property specifies the component.  It is initialized within the Create method.

The data source, to which a component is bound, is specified by the DataSource property.

ReadOnly Property


TcxAbstractWebDataBinding.DataSource

TcxAbstractWebDataBinding          See Also

Specifies the data source to which a component is bound.

property DataSource: TcxCustomWebDataSource;

Description

Components use TcxAbstractWebDataBinding descendants to access dataset values.  These objects serve as interfaces between the data source and component.  The data source is specified by the DataSource property.  The value of this property can be represented by any component, which is the descendant of the TcxCustomWebDataSource class.  The value of this property cannot be accessed, since the GetDataSource method is abstract.

The component that accesses the values of the data source, can be retrieved via the Component property.

ReadOnly Property


TcxAbstractWebDataBinding.Assign

TcxAbstractWebDataBinding

Assigns the contents of one data-binding object to another.

procedure Assign(Source: TPersistent); override;

Description

The Assign method assigns the contents of one data-binding object to another.  The Source parameter represents the source object.  The object, whose Assign method is called, is the destination object.  This method does nothing if the source object is of type TcxAbstractWebDataBinding, since its DataSource property cannot be accessed.


TcxAbstractWebDataBinding.Create

TcxAbstractWebDataBinding

Initializes the TcxAbstractWebDataBinding object.

constructor Create(AComponent: TComponent);

Description

This method is used to initialize the TcxAbstractWebDataBinding object.  After calling the inherited constructor, the Create method assigns the AComponent parameter value to the Component property.

Note: Once the TcxAbstractWebDataBinding class is instantiated, you cannot access the DataSource property, since the GetDataSource method is abstract.


TcxAbstractWebDataBinding.GetDataSource

TcxAbstractWebDataBinding          See Also

Designed to return the DataSource property value.

function GetDataSource: TcxCustomWebDataSource; virtual; abstract;

Description

The GetDataSource method is abstract and is designed to return the DataSource property value.  Descendants of the TcxAbstractWebDataBinding implement this method.


TcxBooleanFieldHelper
TcxBooleanFieldHelper Object

Hierarchy          Properties          Methods          See Also

Represents an object to which Boolean fields delegate their type-specific functionality.

Unit

cxWebData

TcxBooleanFieldHelper = class(TcxDataFieldHelper)

Description

Field-representing objects (TcxCustomWebDataField descendants) delegate this type-specific functionality to specially designed helper objects via their FieldHelper property.  These objects are the descendants of the TcxDataFieldHelper class.

The TcxBooleanFieldHelper class implements type specific functionality for Boolean fields.


TcxBooleanFieldHelper Hierarchy
Hierarchy

TObject

     |

TcxDataFieldHelper


Properties for TcxBooleanFieldHelper
TcxBooleanFieldHelper Properties

TcxBooleanFieldHelper          Legend

Derived from TcxDataFieldHelper

DataSource

Field

Index


Methods for TcxBooleanFieldHelper
TcxBooleanFieldHelper Methods

TcxBooleanFieldHelper          Legend

In TcxBooleanFieldHelper

GetFieldType

GetScriptData

Derived from TcxDataFieldHelper

Create


TcxBooleanFieldHelper.GetFieldType

TcxBooleanFieldHelper          See Also

Returns the associated field’s value type.

function GetFieldType: string; override;

Description

The GetFieldType method is designed to return the string representation of the field value data type.  It is used by TcxCustomWebDataField descendants to get the value of the FieldType property.  The TcxBooleanFieldHelper object is specifically designed to implement the type-specific functionality of Boolean fields.  Thus the GetFieldType method returns a ‘Boolean’ string.

The return value for this method is used in LoadAllRecords mode to render the proper JScript code.

This method overrides the GetFieldType method of the TcxDataFieldHelper class.


TcxBooleanFieldHelper.GetScriptData

TcxBooleanFieldHelper          See Also

Gets the JScript representation of the field value within the specified record.

function GetScriptData(ARecord: Integer): string; override;

Description

The GetScriptData method is designed to return the JScript representation of the field value within the specified record.  Record is specified by its index via the ARecord parameter.

The GetScriptData method is used by TcxCustomWebDataField descendants to get the value of the ScriptData property.  This method overrides the GetScriptData method of the TcxDataFieldHelper class.

This method’s return value is used to render JScript code properly.  It is used to initialize the variable storing the field value.


TcxCustomWebDataBinding
TcxCustomWebDataBinding Object

Hierarchy          Properties          Methods          See Also

Represents a custom data-binding class.

Unit

cxWebData

TcxCustomWebDataBinding = class(TcxAbstractWebDataBinding);

Description

Data-aware controls are bound to data sources by means of data binding objects.  These objects provide interfaces between controls and data sources.  The base class for all data-binding objects is the TcxAbstractWebDataBinding class.  It serves as the base for the TcxCustomWebDataBinding and TcxWebGridColumnDataBinding classes.  The TcxCustomWebDataBinding class, in turn, is specifically designed to implement the common source for the TcxWebDataBinding, TcxWebDataNavigatorBinding and TcxWebGridDataBinding classes.


TcxCustomWebDataBinding Hierarchy
Hierarchy

TPersistent

     |

TcxAbstractWebDataBinding


Properties for TcxCustomWebDataBinding
TcxCustomWebDataBinding Properties

TcxCustomWebDataBinding          Legend

In TcxCustomWebDataBinding

DataSource

Derived from TcxAbstractWebDataBinding

Component

DataSource


Methods for TcxCustomWebDataBinding
TcxCustomWebDataBinding Methods

TcxCustomWebDataBinding          Legend

In TcxCustomWebDataBinding

Assign

ChangedDataLayout

GetDataSource

GetFieldIndex

GetFirstVisibleRow

GetPageSize

WriteScripts

SetDataSource

UpdateData

Derived from TcxAbstractWebDataBinding

Create


TcxCustomWebDataBinding.DataSource

TcxCustomWebDataBinding          See Also

Specifies the data source to which a control is bound.

property DataSource: TcxCustomWebDataSource;

Description

Use the DataSource property to specify a data source to which a control is bound.  Since this property is of type TcxCustomWebDataSource, you can use any descendant of this class to set the value of the property.  There are three components that are descendants of the TcxCustomWebDataSource class.  These are the TcxStdWebDataSource, TcxWebDataSource and TcxWebDBDataSource components.

If the DataSource property is not set, the associated control will not display any values or will display its name.


TcxCustomWebDataBinding.Assign

TcxCustomWebDataBinding

Assigns the contents of one TcxCustomWebDataBinding (or its descendant) object to another.

procedure Assign(Source: TPersistent); override;

Description

Use the Assign method to copy the contents of one TcxCustomWebDataBinding (or its descendant) object to another.  The Source parameter specifies the source object.  The object whose Assign method is called is the destination.  This method assigns the value of the DataSource property of the source object to the destination object.


TcxCustomWebDataBinding.ChangedDataLayout

TcxCustomWebDataBinding

Responds to changes within the data source bound to a control.

procedure ChangedDataLayout; virtual;

Description

The ChangedDataLayout method is called when changes occur within the bound data source or the data source is changed.  It should respond to changes made in order to update the associated control.  As implemented in the TcxCustomWebDataBinding class, the ChangedDataLayout method does nothing.

Descendants of the TcxCustomWebDataBinding class override this method to respond to data source changes properly.

This method implements the ChangedDataLayout method of the IcxWebDataSourceSupport interface.


TcxCustomWebDataBinding.GetDataSource

TcxCustomWebDataBinding          See Also

Returns the value of the DataSource property.

function GetDataSource: TcxCustomWebDataSource; override;

Description

The GetDataSource method is used to get the value of the DataSource property.  This method can be overridden in derived classes to perform custom access to the DataSource property value.


TcxCustomWebDataBinding.GetFieldIndex

TcxCustomWebDataBinding          See Also

Designed to return the index of the dataset field to which a control is bound.

function GetFieldIndex: Integer; virtual;

Description

The GetFieldIndex method is designed to return the index of the field to which a control is bound.  This value is used to render a data-aware control.  The TcxCustomWebDataBinding class doesn’t provide any properties or methods to bind a control to a specific field of the associated dataset.  Thus the GetFieldIndex method returns –1.


TcxCustomWebDataBinding.GetFirstVisibleRow

TcxCustomWebDataBinding          See Also

Designed to return the index of the first row whose values are displayed by the associated control.

function GetFirstVisibleRow: Integer; virtual;

Description

Data-aware controls can display values of more than one row at a time (grid control).  The GetFirstVisibleRow method is designed to determine the index of the top row currently displayed by a control.  It is needed to render the code for data-aware controls properly.  As implemented in the TcxCustomWebDataBinding class, the GetFirstVisibleRow method returns -1.  Descendant classes override this method to return a proper value.

The GetFirstVisibleRow method is used in conjunction with the GetPageSize method.  These method return values are used to determine whether a post back is required when navigating through a dataset.  If the current record index is greater than the index of the first visible row plus the page size or less than the GetFirstVisibleRow return value, a post back is required.  This is not applicable when the data source is in Load All Records mode (since post backs are not required at all in such a case).


TcxCustomWebDataBinding.GetPageSize

TcxCustomWebDataBinding          See Also

Designed to return the number of records displayed by the associated control.

function GetPageSize: Integer; virtual;

Description

Data-aware controls can display values of more than one row at a time (grid control).  The GetPageSize method is used to determine the number of records displayed by the associated control. As implemented in the TcxCustomWebDataBinding class, the GetPageSize method returns -1.  Descendant classes override this method to return a proper value.

The GetPageSize method is used in conjunction with the GetFirstVisibleRow method.  These method return values are used to determine whether a post back is required when navigating through a dataset.  If the current record index is greater than the index of the first visible row plus the page size or less than the GetFirstVisibleRow return value, a post back is required.  This is not applicable when the data source is in Load All Records mode (since post backs are not required at all in such a case).


TcxCustomWebDataBinding.WriteScripts

TcxCustomWebDataBinding          See Also

Renders client side scripts required by data-aware components.

procedure WriteScripts(HTMLTextBuilder: TcxHTMLTextBuilder; UpdateFunction: string); virtual;

Description

The WriteScripts method is used to render client side (JScript) code required for data-aware control functionality.  The UpdateFunction parameter specifies the name of the JScript function that is called in order to update the associated data-aware control.  The need to call this function exists when the data source is changed.

JScript code is written to the internal buffer of the object, transmitted as a HTMLTextBuilder parameter.  The WriteText method of the TcxHTMLTextBuilder class is used for this purpose.

This method is used by data-aware control renderers to implement the WriteScripts method of the IcxCodeProvider interface.


TcxCustomWebDataBinding.SetDataSource

TcxCustomWebDataBinding          See Also

Sets the value of the DataSource property.

procedure SetDataSource(Value: TcxCustomWebDataSource); virtual;

Description

The SetDataSource method is used to set the value of the DataSource property.  This method removes the associated control from the client list of the previous data source and adds this control to the client list of a newly assigned data source.  Once complete, it calls the ChangedDataLayout method to update the associated control.

This method implements the SetDataSource method of the IcxWebDataSourceSupport interface.


TcxCustomWebDataBinding.UpdateData

TcxCustomWebDataBinding

Designed to update the data source with the value of a control bound to it.

procedure UpdateData; virtual;

Description

Once a user posts the changes made, the data source needs to be updated with the values of controls bound to it.  In such an instance, the data source scans all its client controls and calls the UpdateData method of the IcxWebDataSourceSupport interface supported by them.  Since data-aware controls delegate the implementation of this interface to their data-binding objects, the UpdateData method is called as a result.

As implemented in the TcxCustomWebDataBinding class, the UpdateData method does nothing.  Derived classes override this method to perform proper actions.

This method implements the UpdateData method of the IcxWebDataSourceSupport interface.


TcxCustomWebDataField
TcxCustomWebDataField Object

Hierarchy          Properties          Methods          See Also

Represents the base class for dataset field objects.

Unit

cxWebData

TcxCustomWebDataField = class(TCollectionItem)

Description

Each data source component provides access to dataset field values.  There are three data source components available, which differ in the type of dataset they connect to and the type of data access.  These are the TcxStdWebDataSource, TcxWebDataSource, TcxWebDBDataSource components.  Each data source stores a collection of objects representing fields in the bound dataset.  The following three classes represent fields in the data sources listed above: TcxStdWebDataField, TcxWebDataControllerField and TcxWebDBDataControllerField.  The TcxCustomWebDataField class is the ancestor of all the classes representing fields.  It declares some properties and method common for all field kinds.


TcxCustomWebDataField Hierarchy
Hierarchy

TCollectionItem


Properties for TcxCustomWebDataField
TcxCustomWebDataField Properties

TcxCustomWebDataField          Legend

In TcxCustomWebDataField

DataSource

DisplayLabel

FieldHelper

FieldType

Name

ScriptData


Methods for TcxCustomWebDataField
TcxCustomWebDataField Methods

TcxCustomWebDataField          Legend

In TcxCustomWebDataField

Create

Destroy

GetFieldHelper


TcxCustomWebDataField.DataSource

TcxCustomWebDataField          See Also

Returns the data source component to which the field belongs.

property DataSource: TcxCustomWebDataSource;

Description

Use the DataSource property to retrieve the data source component to which the field belongs.  This property is of type TcxCustomWebDataSource.  Thus the returned value can be any descendant of this class.  Available descendants are the TcxStdWebDataSource, TcxWebDataSource and TcxWebDBDataSource components.

ReadOnly Property


TcxCustomWebDataField.DisplayLabel

TcxCustomWebDataField          See Also

Specifies the caption string of the field.

property DisplayLabel: string;

Description

Use the DisplayLabel property to set or get a string that labels the field.  This string is used to identify a field within controls that display values of several fields at once.  The grid control uses the value of the DisplayLabel property to set the caption of the corresponding column.


TcxCustomWebDataField.FieldHelper

TcxCustomWebDataField          See Also

Represents the object to which type-specific functionality of the field is delegated.

property FieldHelper: TcxDataFieldHelper;

Description

Each field-representing objects delegates this part of its functionality to a specially designed helper object.  The FieldHelper property returns this object.

The FieldHelper property type can be any descendant of the TcxDataFieldHelper class.  There are a number of descendants specifically designed for different field types.  These classes are: TcxStringFieldHelper, TcxIntegerFieldHelper, TcxFloatFieldHelper, TcxDateTimeFieldHelper, TcxBooleanFieldHelper and TcxImageFieldHelper.  A specific descendant of the TcxDataFieldHelper object is assigned to the FieldHelper property via the GetFieldHelper method when this property is accessed.

ReadOnly Property


TcxCustomWebDataField.FieldType

TcxCustomWebDataField          See Also

Returns field type values.

property FieldType: string;

Description

The FieldType property returns the value types stored within the field.  The value of this property can be one of the following strings: ‘Unknown’, ‘String’, ‘Integer’, ‘Float’, ‘DateTime’, ‘Boolean’ or ‘Image’.

‘Unknown’ specifies that the dataset field type cannot be determined.

The return value for this property is used to render proper JScript code.  This allows you to determine the type of variables storing field values.

ReadOnly Property


TcxCustomWebDataField.Name

TcxCustomWebDataField

Specifies the name of the field.

property Name: string;

Description

Use the Name property to set or get the string specifying the name of the field.  In such an instance, field name is specified by the data source and is stored within the FieldName property.  In other words, the Name property can be used effectively only when working with unbound datasets (the TcxWebDataSource component).  Otherwise the Name property value coincides with the FieldName property value.


TcxCustomWebDataField.ScriptData

TcxCustomWebDataField          See Also

Returns the JScript representation of the field value within the specified record.

property ScriptData[ARecord: Integer]: string;

Description

The ScriptData property is used to get the JScript representation of the field value within the specified record.  The record is specified by its index via the ARecord parameter.  The value for this property is required to render scripts for a data source in a proper manner.

The value of the ScriptData property is returned by the GetScriptData method of the corresponding helper object.  The appropriate field helper depends on field type values and is obtained via the FieldHelper property.

ReadOnly Property


TcxCustomWebDataField.Create

TcxCustomWebDataField          See Also

Creates an instance of the TcxCustomWebDataField (or descendant) class.

constructor Create(Collection: TCollection); override;

Description

The Create method is used to initialize an instance of the TcxCustomWebDataField class or its descendant.  The Collection parameter specifies the fields collection to which the created field belongs.  TcxCustomWebDataField descendants have corresponding collection classes.  The TcxStdWebDataFields, TcxWebDataControllerFields and TcxWebDBDataControllerFields collections store items of type TcxStdWebDataField, TcxWebDataControllerField and TcxWebDBDataControllerField, respectively.

The Create method sets the Name property to ‘dcfField’ concatenated with the index of the created field within its collection.

Do not create fields directly.  Use the Add method of the corresponding collection instead.


TcxCustomWebDataField.Destroy

TcxCustomWebDataField          See Also

Destroys the TcxCustomWebDataField (or descendant) class.

destructor Destroy; override;

Description

The Destroy method disposes an instance of the TcxCustomWebDataField class or its descendant and frees any allocated memory.  Before calling the inherited destructor, it frees the FieldHelper property.

Do not destroy fields directly.  They are disposed of automatically when they are removed from their collection or when the corresponding data source is deleted.


TcxCustomWebDataField.GetFieldHelper

TcxCustomWebDataField          See Also

Returns the value of the FieldHelper property.

function GetFieldHelper: TcxDataFieldHelper;

Description

Each field-representing objects delegates this part of its functionality to a specially designed helper object.  The FieldHelper property returns this object.

The FieldHelper property type can be any descendant of the TcxDataFieldHelper class.  There are a number of descendants specifically designed for different field types.  These classes are: TcxStringFieldHelper, TcxIntegerFieldHelper, TcxFloatFieldHelper, TcxDateTimeFieldHelper, TcxBooleanFieldHelper and TcxImageFieldHelper.

If the FieldHelper property is already initialized the GetFieldHelper method simply returns its value.  Otherwise it initializes this property with a corresponding helper class.


TcxDataFieldHelper
TcxDataFieldHelper Object

Hierarchy          Properties          Methods

Represents the base class for objects implementing type-specific functionality for objects representing fields.

Unit

cxWebData

TcxDataFieldHelper = class(TObject)

Description

Field-representing objects (TcxCustomWebDataField descendants) delegate their type-specific functionality to specially designed helper objects via their FieldHelper property.  These objects are the descendants of the TcxDataFieldHelper class.

The following TcxDataFieldHelper descendants are available for different field data types:

•	the TcxBooleanFieldHelper class (Boolean fields);

•	the TcxIntegerFieldHelper class (Integer fields);

•	the TcxDateTimeFieldHelper class (date-time fields);

•	the TcxFloatFieldHelper class (floating point number fields);

•	the TcxImageFieldHelper class (image fields);

•	the TcxStringFieldHelper class (text fields).


TcxDataFieldHelper Hierarchy
Hierarchy

TObject


Properties for TcxDataFieldHelper
TcxDataFieldHelper Properties

TcxDataFieldHelper          Legend

In TcxDataFieldHelper

DataSource

Field

Index


Methods for TcxDataFieldHelper
TcxDataFieldHelper Methods

TcxDataFieldHelper          Legend

In TcxDataFieldHelper

Create

GetFieldType

GetScriptData


TcxDataFieldHelper.DataSource

TcxDataFieldHelper          See Also

Gets an object representing the data source component owning the field.

property DataSource: TcxCustomWebDataSource;

Description

Field helper objects implement type-specific functionality for field objects (TcxCustomWebDataField descendants).  Thus these objects need to access the field whose FieldHelper property they represent, and the associated data source.

The DataSource property is used to access the data source component to which the field belongs.  This property can return any descendant of the TcxCustomWebDataSource class.  There are three descendant components available: the TcxStdWebDataSource, TcxWebDataSource and TcxWebDBDataSource.

The field corresponding to the helper object is accessed via the Field property.

ReadOnly Property


TcxDataFieldHelper.Field

TcxDataFieldHelper          See Also

Gets an object representing the field delegating its type-specific functionality to the TcxDataFieldHelper object (or descendant).

property Field: TcxCustomWebDataField;

Description

Field helper objects implement type-specific functionality for field objects (TcxCustomWebDataField descendants).  Thus, these objects need to access the field whose FieldHelper property they represent, and the associated data source.

The Field property is used to access the field that delegates its type specific functionality to the TcxDataFieldHelper object (or descendant).  This property type is TcxCustomWebDataField.  Thus, any of the available field-representing objects can be returned.  These objects can be of type TcxStdWebDataField, TcxWebDataControllerField, TcxWebDBDataControllerField.  These classes represent fields within the TcxStdWebDataSource, TcxWebDataSource and TcxWebDBDataSource components respectively.

The data source component owning the field is accessed via the DataSource property.

ReadOnly Property


TcxDataFieldHelper.Index

TcxDataFieldHelper

Gets the index of the corresponding field within the dataset.

property Index: Integer;

Description

The Index property is used to determine the index of the associated field within its dataset.  Fields are zero-based indexed.  The value of this property is used to access field values via its dataset.

ReadOnly Property


TcxDataFieldHelper.Create

TcxDataFieldHelper

Creates an instance of the TcxDataFieldHelper class.

constructor Create(AField: TcxCustomWebDataField);

Description

The Create method is used to instantiate the TcxDataFieldHelper class.  The AField parameter specifies the field delegating its type-specific functionality to the TcxDataFieldHelper object (or its descendant).  In fact, all the descendants use this constructor.  The value of the parameter is assigned to the Field property.


TcxDataFieldHelper.GetFieldType

TcxDataFieldHelper          See Also

Returns the string representation of the field type.

function GetFieldType: string; virtual;

Description

The GetFieldType method is designed to return the string representation of the field value data type.  It is used by TcxCustomWebDataField descendants to get the value of the FieldType property.  As implemented in the TcxDataFieldHelper class, the GetFieldType method returns ‘Unknown’.  Descendant classes override this method in order to return a proper value.

The return value for this method is used in LoadAllRecords mode to render proper JScript code.


TcxDataFieldHelper.GetScriptData

TcxDataFieldHelper          See Also

Returns the string representation of the field value within a specified record.

function GetScriptData(ARecord: Integer): string; virtual;

Description

The GetScriptData method is designed to return the string representation of the field value within the specified record.  Record is specified by its index via the ARecord parameter.

The GetScriptData method is used by TcxCustomWebDataField descendants to get the value of the ScriptData property.  As implemented in the TcxDataFieldHelper class, this method returns ‘Unknown format’.  Descendant classes override the GetScriptData method to return a proper value.

This method’s return value is used to render JScript code properly.  It is used to initialize the variable storing the field value.


TcxDateTimeFieldHelper
TcxDateTimeFieldHelper Object

Hierarchy          Properties          Methods          See Also

Represents an object to which date-time fields delegate their type-specific functionality.

Unit

cxWebData

TcxDateTimeFieldHelper = class(TcxDataFieldHelper)

Description

Field-representing objects (TcxCustomWebDataField descendants) delegate their type-specific functionality to specially designed helper objects via their FieldHelper property.  These objects are the descendants of the TcxDataFieldHelper class.

The TcxDateTimeFieldHelper class implements the type specific functionality for date-time fields.


TcxDateTimeFieldHelper Hierarchy
Hierarchy

TObject

     |

TcxDataFieldHelper


Properties for TcxDateTimeFieldHelper
TcxDateTimeFieldHelper Properties

TcxDateTimeFieldHelper          Legend

Derived from TcxDataFieldHelper

DataSource

Field

Index


Methods for TcxDateTimeFieldHelper
TcxDateTimeFieldHelper Methods

TcxDateTimeFieldHelper          Legend

In TcxDateTimeFieldHelper

GetFieldType

GetScriptData

Derived from TcxDataFieldHelper

Create


TcxDateTimeFieldHelper.GetFieldType

TcxDateTimeFieldHelper          See Also

Returns the associated field type value.

function GetFieldType: string; override;

Description

The GetFieldType method is designed to return the string representation of the field value’s data type.  This is used by TcxCustomWebDataField descendants to get the value of the FieldType property.  The TcxDateTimeFieldHelper object is specifically designed to implement type-specific functionality of date-time fields.  Thus the GetFieldType method returns ‘DateTime’.

The return value for this method is used in LoadAllRecords mode to render proper JScript code.

This method overrides the GetFieldType method of the TcxDataFieldHelper class.


TcxDateTimeFieldHelper.GetScriptData

TcxDateTimeFieldHelper          See Also

Gets the JScript representation of the field value within a specified record.

function GetScriptData(ARecord: Integer): string; override;

Description

The GetScriptData method is designed to return the JScript representation of the field value within the specified record.  Record is specified by its index via the ARecord parameter.

The GetScriptData method is used by TcxCustomWebDataField descendants to get the value of the ScriptData property.  This method overrides the GetScriptData method of the TcxDataFieldHelper class.

This method’s return value is used to render JScript code properly.  It is used to initialize the variable storing the field value.


TcxFloatFieldHelper
TcxFloatFieldHelper Object

Hierarchy          Properties          Methods          See Also

Represents an object to which floating-point number fields delegate their type-specific functionality.

Unit

cxWebData

TcxFloatFieldHelper = class(TcxDataFieldHelper)

Description

Field-representing objects (TcxCustomWebDataField descendants) delegate their type-specific functionality to specially designed helper objects via their FieldHelper property.  These objects are the descendants of the TcxDataFieldHelper class.

The TcxFloatFieldHelper class implements the type specific functionality for floating-point number fields.


TcxFloatFieldHelper Hierarchy
Hierarchy

TObject

     |

TcxDataFieldHelper


Properties for TcxFloatFieldHelper
TcxFloatFieldHelper Properties

TcxFloatFieldHelper          Legend

Derived from TcxDataFieldHelper

DataSource

Field

Index


Methods for TcxFloatFieldHelper
TcxFloatFieldHelper Methods

TcxFloatFieldHelper          Legend

In TcxFloatFieldHelper

GetFieldType

GetScriptData

Derived from TcxDataFieldHelper

Create


TcxFloatFieldHelper.GetFieldType

TcxFloatFieldHelper          See Also

Returns the associated field type value.

function GetFieldType: string; override;

Description

The GetFieldType method is designed to return the string representation of the field value’s data type.  It is used by TcxCustomWebDataField descendants to get the value of the FieldType property.  The TcxFloatFieldHelper object is specifically designed to implement the type-specific functionality for floating-point number fields.  Thus the GetFieldType method returns ‘Float’.

The return value for this method is used in the LoadAllRecords mode to render the proper JScript code.

This method overrides the GetFieldType method of the TcxDataFieldHelper class.


TcxFloatFieldHelper.GetScriptData

TcxFloatFieldHelper          See Also

Gets the JScript representation of the field value within the specified record.

function GetScriptData(ARecord: Integer): string; override;

Description

The GetScriptData method is designed to return the JScript representation of the field value within the specified record.  Record is specified by its index via the ARecord parameter.

The GetScriptData method is used by TcxCustomWebDataField descendants to get the value of the ScriptData property.  This method overrides the GetScriptData method of the TcxDataFieldHelper class.

This method’s return value is used to render JScript code properly.


TcxImageFieldHelper
TcxImageFieldHelper Object

Hierarchy          Properties          Methods          See Also

Represents an object to which image fields delegate their type-specific functionality.

Unit

cxWebData

TcxImageFieldHelper = class(TcxDataFieldHelper)

Description

Field-representing objects (TcxCustomWebDataField descendants) delegate their type-specific functionality to specially designed helper objects via their FieldHelper property.  These objects are the descendants of the TcxDataFieldHelper class.

The TcxImageFieldHelper class implements type specific functionality for image fields.


TcxImageFieldHelper Hierarchy
Hierarchy

TObject

     |

TcxDataFieldHelper


Properties for TcxImageFieldHelper
TcxImageFieldHelper Properties

TcxImageFieldHelper          Legend

Derived from TcxDataFieldHelper

DataSource

Field

Index


Methods for TcxImageFieldHelper
TcxImageFieldHelper Methods

TcxImageFieldHelper          Legend

In TcxImageFieldHelper

GetFieldType

GetScriptData

Derived from TcxDataFieldHelper

Create


TcxImageFieldHelper.GetFieldType

TcxImageFieldHelper          See Also

Returns the associated field values type.

function GetFieldType: string; override;

Description

The GetFieldType method is designed to return the string representation of the field value’s data type.  It is used by TcxCustomWebDataField descendants to get the value of the FieldType property.  The TcxImageFieldHelper object is specifically designed to implement the type-specific functionality for image fields.  Thus the GetFieldType method returns ‘Image’.

The return value for this method is used in LoadAllRecords mode to render proper JScript code.

This method overrides the GetFieldType method of the TcxDataFieldHelper class.


TcxImageFieldHelper.GetScriptData

TcxImageFieldHelper          See Also

Gets the JScript representation of the field value within a specified record.

function GetScriptData(ARecord: Integer): string; override;

Description

The GetScriptData method is designed to return the JScript representation of the field value within the specified record.  Record is specified by its index via the ARecord parameter.

The GetScriptData method is used by TcxCustomWebDataField descendants to get the value of the ScriptData property.  This method overrides the GetScriptData method of the TcxDataFieldHelper class.

This method’s return value is used to render JScript code properly.  It is used to initialize the variable storing field value.


TcxIntegerFieldHelper
TcxIntegerFieldHelper Object

Hierarchy          Properties          Methods          See Also

Represents an object to which integer fields delegate their type-specific functionality.

Unit

cxWebData

TcxIntegerFieldHelper = class(TcxDataFieldHelper)

Description

Field-representing objects (TcxCustomWebDataField descendants) delegate their type-specific functionality to specially designed helper objects via their FieldHelper property.  These objects are the descendants of the TcxDataFieldHelper class.

The TcxIntegerFieldHelper class implements the type specific functionality for integer fields.


TcxIntegerFieldHelper Hierarchy
Hierarchy

TObject

     |

TcxDataFieldHelper


Properties for TcxIntegerFieldHelper
TcxIntegerFieldHelper Properties

TcxIntegerFieldHelper          Legend

Derived from TcxDataFieldHelper

DataSource

Field

Index


Methods for TcxIntegerFieldHelper
TcxIntegerFieldHelper Methods

TcxIntegerFieldHelper          Legend

In TcxIntegerFieldHelper

GetFieldType

GetScriptData

Derived from TcxDataFieldHelper

Create


TcxIntegerFieldHelper.GetFieldType

TcxIntegerFieldHelper          See Also

Returns the associated field value type.

function GetFieldType: string; override;

Description

The GetFieldType method is designed to return the string representation of the field value’s data type.  It is used by TcxCustomWebDataField descendants to get the value of the FieldType property.  The TcxIntegerFieldHelper object is specifically designed to implement type-specific functionality for integer fields.  Thus the GetFieldType method returns ‘Integer’.

The return value of this method is used in LoadAllRecords mode to render proper JScript code.

This method overrides the GetFieldType method of the TcxDataFieldHelper class.


TcxIntegerFieldHelper.GetScriptData

TcxIntegerFieldHelper          See Also

Gets the JScript representation of the field value within a specified record.

function GetScriptData(ARecord: Integer): string; override;

Description

The GetScriptData method is designed to return the JScript representation of the field value within the specified record.  Record is specified by its index via the ARecord parameter.

The GetScriptData method is used by TcxCustomWebDataField descendants to get the value of the ScriptData property.  This method overrides the GetScriptData method of the TcxDataFieldHelper class.

This method’s return value is used to render JScript code properly.


TcxStdWebDataField
TcxStdWebDataField Object

Hierarchy          Properties          Methods          See Also

Represents a field used by the TcxStdWebDataSource component.

Unit

cxWebData

TcxStdWebDataField = class(TcxCustomWebDataField)

Description

There are three components providing access to datasets.  These are the TcxStdWebDataSource, TcxWebDataSource and TcxWebDBDataSource components.  Each data source component stores its field collection.  Classes representing fields (TcxCustomWebDataField descendants) are different for each data source.  The TcxStdWebDataField class represents a field for the TcxStdWebDataSource component.

The field collection for the TcxStdWebDataSource component can be accessed via its Fields property.  It is represented by the TcxStdWebDataFields object.  Use its Items property to access an individual TcxStdWebDataField object within a collection.


TcxStdWebDataField Hierarchy
Hierarchy

TCollectionItem

     |

TcxCustomWebDataField


Properties for TcxStdWebDataField
TcxStdWebDataField Properties

TcxStdWebDataField          Legend

In TcxStdWebDataField

DataSet

FieldName

Derived from TcxCustomWebDataField

DataSource

DisplayLabel

FieldHelper

FieldType

Name

ScriptData


Methods for TcxStdWebDataField
TcxStdWebDataField Methods

TcxStdWebDataField          Legend

Derived from TcxCustomWebDataField

Create

Destroy

GetFieldHelper


TcxStdWebDataField.DataSet

TcxStdWebDataField          See Also

Gets the dataset component to which the owning data source is bound.

property DataSet: TDataSet;

Description

The TcxStdWebDataSource component should be bound to a dataset component in order to provide data.  Once this done, dataset fields are represented by the collection of TcxStdWebDataField objects.  The DataSet property provides access to the dataset component.  The generated value can be any TDataSet descendant object.

ReadOnly Property


TcxStdWebDataField.FieldName

TcxStdWebDataField          See Also

Specifies the name of the field.

property FieldName: string;

Description

The FieldName property stores the name of the dataset field.  It is set by the TcxStdWebDataSource component when it initializes its own field collection, represented by the Fields property.


TcxStdWebDataFields
TcxStdWebDataFields Object

Hierarchy          Properties          Methods          See Also

Represents the field collection of the TcxStdWebDataSource component.

Unit

cxWebData

TcxStdWebDataFields = class(TCollection)

Description

There are three components providing access to data.  These are the TcxStdWebDataSource, TcxWebDataSource and TcxWebDBDataSource components.  Each data source component stores its field collection.  Classes representing fields (TcxCustomWebDataField descendants) are different for each data source and their collections.  The TcxStdWebDataFields, TcxWebDataControllerFields and TcxWebDBDataControllerFields classes represent collections of fields within the components listed above.

Field collection for the TcxStdWebDataSource component can be accessed via its Fields property.  Use the Items property of the TcxStdWebDataFields class to access an individual TcxStdWebDataField object within a collection.


TcxStdWebDataFields Hierarchy
Hierarchy

TCollection


Properties for TcxStdWebDataFields
TcxStdWebDataFields Properties

TcxStdWebDataFields          Legend

In TcxStdWebDataFields

DataSource

Items


Methods for TcxStdWebDataFields
TcxStdWebDataFields Methods

TcxStdWebDataFields          Legend

In TcxStdWebDataFields

Add

Create

GetOwner


TcxStdWebDataFields.DataSource

TcxStdWebDataFields          See Also

Gets an object, which represents the data source component owning the field collection.

property DataSource: TcxStdWebDataSource;

Description

The DataSource property provides access to the TcxStdWebDataSource component, which owns the field collection.  The DataSet property of the obtained object returns the dataset component, to which the data source is bound.

ReadOnly Property


TcxStdWebDataFields.Items

TcxStdWebDataFields

Provides indexed access to individual fields within the collection.

property Items[Index:Integer]: TcxStdWebDataField;

Description

Use the Items property to access individual fields in the TcxStdWebDataFields collection.  The Index parameter specifies the index of the item within the collection.  Items are zero-based indexed.


TcxStdWebDataFields.Add

TcxStdWebDataFields

Adds a new item to the collection.

function Add: TcxStdWebDataField;

Description

The Add method is used to add a new item to the field collection.  This method is used by the TcxStdWebDataSource component when it creates a list of fields available within the bound dataset.


TcxStdWebDataFields.Create

TcxStdWebDataFields

Creates a new instance of the TcxStdWebDataFields class.

constructor Create(ADataSource: TcxCustomWebDataSource);

Description

The Create method is used to initialize a new TcxStdWebDataFields object.  The ADataSource parameter specifies the data source component owning the field collection.  After calling the inherited constructor, the create method initializes the DataSource property with the parameter value.

Do not create the TcxStdWebDataFields object in applications.  It is automatically created by the TcxStdWebDataSource component in order to initialize its Fields property.


TcxStdWebDataFields.GetOwner

TcxStdWebDataFields

Returns the object owning the field collection.

function GetOwner: TPersistent; override;

Description

The GetOwner method’s return value is used by the GetNamePath method.  Thus the GetOwner method overrides the base class method to return a proper owner.  It returns the DataSource property value.


TcxStringFieldHelper
TcxStringFieldHelper Object

Hierarchy          Properties          Methods          See Also

Represents an object to which text fields delegate their type-specific functionality.

Unit

cxWebData

TcxStringFieldHelper = class(TcxDataFieldHelper)

Description

Field-representing objects (TcxCustomWebDataField descendants) delegate their type-specific functionality to specially designed helper objects via their FieldHelper property.  These objects are the descendants of the TcxDataFieldHelper class.

The TcxStringFieldHelper class implements type specific functionality for text fields.


TcxStringFieldHelper Hierarchy
Hierarchy

TObject

     |

TcxDataFieldHelper


Properties for TcxStringFieldHelper
TcxStringFieldHelper Properties

TcxStringFieldHelper          Legend

Derived from TcxDataFieldHelper

DataSource

Field

Index


Methods for TcxStringFieldHelper
TcxStringFieldHelper Methods

TcxStringFieldHelper          Legend

In TcxStringFieldHelper

GetFieldType

GetScriptData

Derived from TcxDataFieldHelper

Create


TcxStringFieldHelper.GetFieldType

TcxStringFieldHelper          See Also

Returns the associated field value type.

function GetFieldType: string; override;

Description

The GetFieldType method is designed to return the string representation of the field value’s data type.  It is used by TcxCustomWebDataField descendants to get the value of the FieldType property.  The TcxStringFieldHelper object is specifically designed to implement type-specific functionality for text fields.  Thus, the GetFieldType method returns ‘String’.

The return value for this method is used in LoadAllRecords mode to render proper JScript code.

This method overrides the GetFieldType method of the TcxDataFieldHelper class.


TcxStringFieldHelper.GetScriptData

TcxStringFieldHelper          See Also

Gets the JScript representation of the field value within the specified record.

function GetScriptData(ARecord: Integer): string; override;

Description

The GetScriptData method is designed to return the JScript representation of the field value within the specified record.  Record is specified by its index via the ARecord parameter.

The GetScriptData method is used by TcxCustomWebDataField descendants to get the value of the ScriptData property.  This method overrides the GetScriptData method of the TcxDataFieldHelper class.

This method’s return value is used to render JScript code properly.  It is used to initialize the variable storing the field value.


IcxWebDataSourceSupport
IcxWebDataSourceSupport Interface

Hierarchy          Properties             Methods

Should be implemented by data-aware components to provide data exchange between the component and data source.

Unit

cxWebData

IcxWebDataSourceSupport = interface(IUnknown)

Description

The IcxWebDataSourceSupport interface should be implemented by data-aware components.  If the methods of this interface are implemented properly, the following data exchange features are available for the component:

•	the component updates its values when the dataset value changes;

•	the component updates the values of the associated dataset when its values change.

Data-aware controls delegate the implementation of the IcxWebDataSourceSupport interface to data-binding objects (TcxAbstractWebDataBinding descendants).  These objects stand for the DataBinding property of components and are used to associate a component to a data source.


IcxWebDataSourceSupport Hierarchy
Hierarchy

IUnknown


Properties for IcxWebDataSourceSupport
IcxWebDataSourceSupport Properties

IcxWebDataSourceSupport          Legend

In IcxWebDataSourceSupport

DataSource


Methods for IcxWebDataSourceSupport
IcxWebDataSourceSupport Methods

IcxWebDataSourceSupport          Legend

In IcxWebDataSourceSupport

ChangedDataLayout

GetDataSource

SetDataSource

UpdateData


IcxWebDataSourceSupport.DataSource

IcxWebDataSourceSupport          See Also

Designed to specify the data source component associated with the data-aware control.

property DataSource: TcxCustomWebDataSource;

Description

The DataSource property is designed to specify the data source component to which the data-aware component is bound.  There are three data source components available (TcxCustomWebDataSource descendants).   These are the TcxStdWebDataSource, TcxWebDataSource and TcxWebDBDataSource components.

The DataSource property value is assigned and returned via the SetDataSource and GetDataSource methods respectively.


IcxWebDataSourceSupport.ChangedDataLayout

IcxWebDataSourceSupport          See Also

Designed to respond to data changes occurring in the associated dataset.

procedure ChangedDataLayout;

Description

The ChangedDataLayout method is designed to update the data-aware control when the associated dataset value changes.  When implemented, it must reload the data it displays from the dataset it is bound to.

Data can be reloaded to a control via the SetData method of the IcxWebViewDataSupport interface (if supported).  On the other hand, some controls, which do not store their displayed values, read the updated data directly from the associated dataset.


IcxWebDataSourceSupport.GetDataSource

IcxWebDataSourceSupport          See Also

Designed to return the value of the DataSource property.

function GetDataSource: TcxCustomWebDataSource;

Description

The IcxWebDataSourceSupport interface declares the GetDataSource method as a ‘read’ of the DataSource property.  It must be implemented in order to return a proper value for this property.


IcxWebDataSourceSupport.SetDataSource

IcxWebDataSourceSupport          See Also

Designed to assign a value to the DataSource property.

procedure SetDataSource(Value: TcxCustomWebDataSource);

Description

The IcxWebDataSourceSupport interface declares the SetDataSource method as the ‘write’ of the DataSource property.  It should be implemented in order to assign values to this property in a proper manner.


IcxWebDataSourceSupport.UpdateData

IcxWebDataSourceSupport          See Also

Designed to respond to dataset changes in order to update the associated dataset.

procedure UpdateData;

Description

The UpdateData method is designed to update the associated dataset when the values of the data-aware control change.  When implemented, it should write its data to the dataset it is bound to.

Data can be written to the dataset using the GetData method of the IcxWebViewDataSupport interface (if supported).  The CanGetData method of the same interface determines whether data can be obtained from a control.


IcxWebUpdateDataSupport
IcxWebUpdateDataSupport Interface

Hierarchy          Methods

Should be implemented by data-aware controls to provide displayed data.

Unit

cxWebData

IcxWebUpdateDataSupport = interface(IUnknown)

Description

The IcxWebUpdateDataSupport interface should be implemented by data-aware components.  If the methods of this interface are implemented properly, the component has the following features:

•	it is possible to determine whether the component can provide proper data;

•	it is possible to obtain data the component displays.

IcxWebUpdateDataSupport interface methods are used to update the associated dataset with the values displayed by the component.  In other words. these methods are used to implement the UpdateData method of the IcxWebDataSourceSupport interface.


IcxWebUpdateDataSupport Hierarchy
Hierarchy

IUnknown


Methods for IcxWebUpdateDataSupport
IcxWebUpdateDataSupport Methods

IcxWebUpdateDataSupport          Legend

In IcxWebUpdateDataSupport

CanGetData

GetData


IcxWebUpdateDataSupport.CanGetData

IcxWebUpdateDataSupport          See Also

Designed to return a value indicating whether the data-aware component can provide the displayed values.

function CanGetData: Boolean;

Description

The CanGetData method is designed to determine whether the component can provide values it displays.  The return value for this method determines whether the GetData method should be called.  If the CanGetData method returns True, the data can be obtained (the GetData method is called), otherwise nothing happens.

Most common data-aware controls can always provide their values.  The exception is the grid control.  This control doesn’t transmit values it displays when not in edit mode.  Thus the CanGetData method implemented in the grid control returns True only if the grid is in edit mode.


IcxWebUpdateDataSupport.GetData

IcxWebUpdateDataSupport          See Also

Designed to return the data displayed by the data-aware component.

function GetData: Variant;

Description

The GetData method is designed to return the Variant representation of data displayed by the component.  When implemented, this method is used to update the associated dataset with the values of the component.  In other words, it helps to implement the UpdateData method of the IcxWebDataSourceSupport interface.

The GetData method is (and should be) called only if the CanGetData method’s return value is True.


IcxWebViewDataSupport
IcxWebViewDataSupport Interface

Hierarchy          Methods

Should be implemented by data-aware components in order to display dataset values.

Unit

cxWebData

IcxWebViewDataSupport = interface(IUnknown)

Description

The IcxWebViewDataSupport interface should be implemented by data-aware components, which store their displayed values, in order to display dataset values properly.  If the methods of this interface are correctly implemented, the component can get its data from the dataset.  In such an instance, it is also possible to determine the index of the top row, whose values are displayed by the component, and number of rows it can displays at a time.

The components that read data directly from the data source shouldn’t implement this interface.


IcxWebViewDataSupport Hierarchy
Hierarchy

IUnknown


Methods for IcxWebViewDataSupport
IcxWebViewDataSupport Methods

IcxWebViewDataSupport          Legend

In IcxWebViewDataSupport

SetData


IcxWebViewDataSupport.SetData

IcxWebViewDataSupport          See Also

Designed to assign data to the component.

procedure SetData(Value: Variant);

Description

The SetData method is designed to assign dataset data to the component.  The Value parameter specifies the Variant representation of the assigned data.  This method is implemented for standard data-aware controls.  The grid control does not implement it.  The class that represents a column within the grid control implements the SetData method.  In such an instance, the Value parameter specifies the value of the column within the currently edited record.

This method helps to implement the updating of the component’s values when dataset values change.  In other words, it is used to implement the ChangedDataLayout method of the IcxWebDataSourceSupport interface.


TcxDataFieldHelperClass
TcxDataFieldHelperClass type

Specifies the field helper type.

Unit

cxWebData

TcxDataFieldHelperClass = class of TcxDataFieldHelper;

Description

The TcxDataFieldHelperClass type is a class-reference of the TcxDataFieldHelper class.  It is used to identify the type of field helper (TcxDataFieldHelper descendant) for a field.  This is needed since field-representing classes (TcxCustomWebDataField descendants) delegate their type-specific functionality to the TcxDataFieldHelper descendants.


TcxUpdateType
TcxUpdateType type

Contains values specifying the manner in which the dataset is changed.

Unit

cxWebData

TcxUpdateType = (utLayout, utData);

Description

The TcxUpdateType type provides values specifying the manner in which the dataset is changed.  Its values are used to handle data notifications properly.

The following values are available for TcxUpdateType:

Value	Description
utLayout	The layout of dataset fields has changed.
utData	Field data has changed.


TcxWebDataSortOrder
TcxWebDataSortOrder type

Contains values used to specify the sort order of dataset field values.

Unit

cxWebData

TcxWebDataSortOrder = (wsoNone, wsoAscending, wsoDescending);

Description

The values for type TcxWebDataSortOrder are used to specify the sort order of dataset field values.  These values are used, for instance, to set the value of the SortingOrder property of TcxCustomWebDataControllerField descendants.

The following values are available for TcxWebDataSortOrder:

Value	Description
wsoNone	Field values are not sorted.
wsoAscending	Field values are sorted in ascending order.
wsoDescending	Field values are sorted in descending order.


TcxDataEvent
TcxDataEvent type

Represents event types invoked due to actions performed on a dataset.

Unit

cxWebData

TcxDataEvent = procedure (Sender: TObject; ARowIndex: Integer) of object;

Description

The TcxDataEvent type specifies event types that are invoked due to dataset record editing or scrolling and thus require row index as the parameter.  The row index corresponding to the modified dataset record is represented by the ARowIndex parameter.  The Sender parameter specifies the object that invoked the event.


cxWebDataCtrls Unit Overview
cxWebDataCtrls Unit

Classes

TcxWebDataBinding

TcxWebDataNavigatorBinding

TcxWebDBCheckBox

TcxWebDBColumn

TcxWebDBComboBox

TcxWebDBDataNavigator

TcxWebDBEdit

TcxWebDBGrid

TcxWebDBImage

TcxWebDBLabel

TcxWebDBListBox

TcxWebDBMemo

TcxWebDBRadioGroup

TcxWebGridColumnDataBinding

TcxWebGridDataBinding


TcxWebDataBinding
TcxWebDataBinding Object

Hierarchy          Properties          Methods

Used to associate a control with a data source.

Unit

cxWebDataCtrls

TcxWebDataBinding = class(TcxCustomWebDataBinding);

Description

Data binding objects are used to bind data-aware controls to a data source.  The TcxCustomWebDataBinding class implements the common functionality of such objects.  The TcxWebDataBinding class is its descendant and is specifically designed for binding controls to a single field within the associated dataset.

The TcxWebDataBinding class represents the type of DataBinding property for standard data-aware controls (e.g. TcxWebDBEdit, TcxWebDBMemo, TcxWebDBCheckBox, etc.).

If a control is bound to data via the TcxWebDataBinding object, there are two ways to navigate through the dataset.  The first is to use the properties and methods of the associated dataset.  The second is to use the TcxWebDBDataNavigator control bound to the same dataset.


TcxWebDataBinding Hierarchy
Hierarchy

TPersistent

     |

TcxAbstractWebDataBinding

     |

TcxCustomWebDataBinding


Properties for TcxWebDataBinding
TcxWebDataBinding Properties

TcxWebDataBinding          Legend

In TcxWebDataBinding

Field

FieldIndex

FieldName

Derived from TcxCustomWebDataBinding

DataSource

Derived from TcxAbstractWebDataBinding

Component


Methods for TcxWebDataBinding
TcxWebDataBinding Methods

TcxWebDataBinding          Legend

In TcxWebDataBinding

Assign

ChangedDataLayout

GetFieldIndex

GetFirstVisibleRow

GetPageSize

UpdateData

Derived from TcxCustomWebDataBinding

Assign

GetDataSource

SetDataSource

WriteScripts

Derived from TcxAbstractWebDataBinding

Create


TcxWebDataBinding.Field

TcxWebDataBinding          See Also

Gets the object representing the field whose values are displayed by a control.

property Field: TcxCustomWebDataField;

Description

Use the Field property to access the object representing the field to which a control is bound.  This allows you to obtain information describing the field and access its values. Use the FieldName property to specify the field to which a control is bound.

ReadOnly Property


TcxWebDataBinding.FieldIndex

TcxWebDataBinding          See Also

Returns the index of the field to which a control is bound.

property FieldIndex: Integer;

Description

The FieldIndex property is used to obtain the index of the data source field whose values are displayed by a control.  It returns the index of the field specified by the FieldName property.

The value of the FieldIndex property is returned by the GetFieldIndex method.

ReadOnly Property


TcxWebDataBinding.FieldName

TcxWebDataBinding          See Also

Specifies the field to which a control is bound.

property FieldName: string;

Description

Use the FieldName property to specify the name of the field whose values are displayed by a control.  The possible values for the FieldName property are the names of the fields contained within the data source associated with a control.  You should use the DataSource property to bind a control to a data source.

If the FieldName property is an empty string or specified incorrectly, the control using the TcxWebDataBinding object will behave as if it was not data-aware.


TcxWebDataBinding.Assign

TcxWebDataBinding          See Also

Assigns the contents of one object to another.

procedure Assign(Source: TPersistent); override;

Description

Use the Assign method to assign the contents of one TcxWebDataBinding object to another.  This method should be used instead of direct assignment.  The Source parameter specifies the source object.  The TcxWebDataBinding object whose Assign method is called is the destination object.


TcxWebDataBinding.ChangedDataLayout

TcxWebDataBinding          See Also

Responds to changes within the data source bound to a control.

procedure ChangedDataLayout; override;

Description

The ChangedDataLayout method is called when changes occur within the bound data source or the data source is changed.  It should respond to the changes made in order to update the associated control.  As implemented in the TcxWebDataBinding class, the ChangedDataLayout method assigns the value of the specified field within the current record to a bound control.  This is done via the SetData method of the IcxWebViewDataSupport interface implemented by data-aware controls.

The field whose value is assigned to a control, is specified by the FieldName property.  The dataset containing this field is set via the DataSource property.  If one of these properties are not set or set incorrectly, the control using the TcxWebDataBinding object will behave as if it was not data-aware (it displays its name).

This method implements the ChangedDataLayout method of the IcxWebDataSourceSupport interface.


TcxWebDataBinding.GetFieldIndex

TcxWebDataBinding          See Also

Gets the index of the field, specified by the FieldName property.

function GetFieldIndex: Integer; override;

Description

The TcxWebDataBinding object binds a control to a field, specified by the FieldName property.  The GetFieldIndex method returns the index of the field within the associated dataset.  If the field is specified incorrectly or not specified, it returns –1.

The GetFieldIndex method’s return value is used for rendering.  You can override it in descendant classes based upon your specific needs.


TcxWebDataBinding.GetFirstVisibleRow

TcxWebDataBinding          See Also

Returns the index of the first row whose value is displayed by the associated control.

function GetFirstVisibleRow: Integer; override;

Description

Data-aware controls can display values of more than one row at a time (grid control).  The GetFirstVisibleRow method is used to determine the index of the top row currently displayed by the control.  This is necessary to render data-aware control code properly.

The GetFirstVisibleRow method is used in conjunction with the GetPageSize method.  Their return values are used to determine whether a post back is required when navigating through a dataset.  If the current record index is greater than the index of the first visible row plus the page size, a post back is required.  This is not applicable when the data source is in Load All Records mode (since post backs are not required at all in such an instance).

The TcxWebDataBinding class is designed to provide an interface between data sources and controls displaying values for a single record at a time.  Thus the GetFirstVisibleRow method returns the associated data source component’s FocusedRowIndex property value.


TcxWebDataBinding.GetPageSize

TcxWebDataBinding          See Also

Returns the number of records displayed by the associated control at a time.

function GetPageSize: Integer; override;

Description

Data-aware controls can display values of more than one row at a time (grid control).  The GetPageSize method is used to determine the number of records displayed by the associated control. This is necessary to render the data-aware code properly.

The GetPageSize method is used in conjunction with the GetFirstVisibleRow method.  Their return values are used to determine whether a post back is required when navigating through a dataset.  If the current record index is greater than the index of the first visible row plus the page size, a post back is required.  This is not applicable when the data source is in Load All Records mode (since post backs are not required at all in such a case).

The TcxWebDataBinding class is designed to provide an interface between data sources and controls displaying values of a single record at a time.  Thus the GetPageSize method returns 1.


TcxWebDataBinding.UpdateData

TcxWebDataBinding          See Also

Updates the data source with the value of a control bound to it.

procedure UpdateData; override;

Description

Once a user posts the changes he/she has made, the data source needs to be updated with the values of controls bound to it.  In such an instance, the data source scans all its client controls and calls the UpdateData method of the IcxWebDataSourceSupport interface supported by them.  Since data-aware controls delegate the implementation of this interface to the TcxWebDataBinding object, its UpdateData method is called as a result.

The UpdateData method gets the value of the associated control and writes it to the corresponding field of the dataset.  You can override this method in descendant classes to perform additional actions when dataset changes are posted.

This method implements the UpdateData method of the IcxWebDataSourceSupport interface.


TcxWebDataNavigatorBinding
TcxWebDataNavigatorBinding Object

Hierarchy          Properties          Methods

Used to associate data navigator controls with a data source.

Unit

cxWebDataCtrls

TcxWebDataNavigatorBinding = class(TcxCustomWebDataBinding);

Description

Data binding objects are used to bind data-aware controls to a data source.  The TcxCustomWebDataBinding class implements the common functionality for such objects.  The TcxWebDataNavigatorBinding class is its descendant and is specifically designed for binding data navigator controls to a data source.

The TcxWebDataBinding class represents the DataBinding property type of the TcxWebDBDataNavigator class.  It can also be used to bind any TcxCustomWebDataBinding descendant with data.


TcxWebDataNavigatorBinding Hierarchy
Hierarchy

TPersistent

     |

TcxAbstractWebDataBinding

     |

TcxCustomWebDataBinding


Properties for TcxWebDataNavigatorBinding
TcxWebDataNavigatorBinding Properties

TcxWebDataNavigatorBinding          Legend

In TcxWebDataNavigatorBinding

DataNavigator

Derived from TcxCustomWebDataBinding

DataSource

Derived from TcxAbstractWebDataBinding

Component


Methods for TcxWebDataNavigatorBinding
TcxWebDataNavigatorBinding Methods

TcxWebDataNavigatorBinding          Legend

In TcxWebDataNavigatorBinding

GetPageSize

Derived from TcxCustomWebDataBinding

Assign

ChangedDataLayout

GetDataSource

GetFieldIndex

GetFirstVisibleRow

SetDataSource

UpdateData

WriteScripts

Derived from TcxAbstractWebDataBinding

Create


TcxWebDataNavigatorBinding.DataNavigator

TcxWebDataNavigatorBinding          See Also

Returns the data navigator control using the TcxWebDataNavigatorBinding object.

property DataNavigator: TcxCustomWebDataNavigator;

Description

The DataNavigator property simply performs a typecast of the Component property value to TcxCustomWebDataNavigator, when accessed.  This is done in order to gain direct access to common properties and methods of data navigator controls.

ReadOnly Property


TcxWebDataNavigatorBinding.GetPageSize

TcxWebDataNavigatorBinding          See Also

Used to calculate the size of the TcxWebDBDataNavigator control’s page.

function GetPageSize: Integer; override;

Description

The GetPageSize method is used to calculate size of the page of the TcxWebDBDataNavigator control, which is used by the client-side java scripts.


TcxWebDBCheckBox
 TcxWebDBCheckBox Object

Hierarchy          Properties          Methods          Events

Represents a data-aware check box control.

Unit

cxWebDataCtrls

TcxWebDBCheckBox = class(TcxCustomWebCheckBox, IcxWebDataSourceSupport, IcxWebUpdateDataSupport, IcxWebViewDataSupport)

Description

Use the TcxWebDBCheckBox control to display Boolean field values.  The TcxWebDBCheckBox control gives you incredible flexibility because you can bind the data-aware check box to any simple field type.  In such cases, you must use the CheckedValue and UncheckedValue properties to specify field values corresponding to the checked and unchecked states of the control.

The TcxWebDBCheckBox control is a descendant of the TcxCustomWebCheckBox class.  Thus it inherits all the basic functionality of the check box control.  The TcxWebDBCheckBox class introduces a number of properties and methods required by a data-aware control to function properly.  It declares the DataBinding property used to bind the control to a dataset field.


TcxWebDBCheckBox Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxWebFormControl

     |

TcxCustomWebCheckBox


Properties for TcxWebDBCheckBox
TcxWebDBCheckBox Properties

TcxWebDBCheckBox          Legend

In TcxWebDBCheckBox

CheckedValue

DataBinding

UncheckedValue

Derived from TcxCustomWebCheckBox

Checked

Width

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebDBCheckBox
TcxWebDBCheckBox Methods

TcxWebDBCheckBox          Legend

In TcxWebDBCheckBox

CanGetData

Destroy

GetData

GetDataBinding

RegisterRenderers

ScriptsSubscription

SetData

Derived from TcxCustomWebCheckBox

Create

DoClick

DoSetValues

GetMaxHeight

GetMinHeight

GetMinWidth

RegisterActions

RegisterEvents

RegisterValues

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

RegisterRenderers

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

SetState

ValidateContainer


Events for TcxWebDBCheckBox
TcxWebDBCheckBox Events

TcxWebDBCheckBox          Legend

Derived from TcxCustomWebCheckBox

OnClick

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebDBCheckBox.CheckedValue

TcxWebDBCheckBox          See Also

Specifies the value which corresponds to the checked state of the control.

property CheckedValue: string;

Description

You can bind the check box control to a Boolean field of an associated dataset or to a simple field type.  In such an instance, you should specify the value for the field that corresponds to the checked (unchecked) state of the control.  Use the CheckedValue property to set a value corresponding to the checked state.

Use the UncheckedValue property to specify the field value corresponding to the unchecked state of the control.  The table below lists the relationship between the CheckedValue and UncheckedValue properties, if the control is bound to none-Boolean field:

CheckedValue property	UncheckedValue property	Control’s behavior if the bound field is not Boolean
Empty	Empty	Control is always in an unchecked state.
Empty	Set	Control is unchecked only when the UncheckedValue property value coincides with the field value.
Set	Empty	Control is checked only when the CheckedValue property value coincides with the field value.
Set	Set	Control is checked only when the CheckedValue property value coincides with the field value.


TcxWebDBCheckBox.DataBinding

TcxWebDBCheckBox          See Also

Binds the check box control to a dataset field.

property DataBinding: TcxWebDataBinding;

Description

Use the DataBinding property to bind the check box to a dataset field. You should specify two properties for the TcxWebDataBinding class.  The DataSource property specifies the data source connected to the dataset containing the desired field.  You should use either the TcxStdWebDataSource, TcxWebDataSource or TcxWebDBDataSource component to set the value for this property.  The FieldName property of the TcxWebDataBinding object specifies the name of the field to which the check box control is bound.  If at least one of these properties is not set or set incorrectly, the check box control will always be in an unchecked state.


TcxWebDBCheckBox.UncheckedValue

TcxWebDBCheckBox          See Also

Specifies the value that corresponds to the unchecked state of the control.

property UncheckedValue: string;

Description

You can bind the check box control to Boolean dataset fields or to a simple field type.  In such an instance, you should specify the value of the field that corresponds to the checked (unchecked) state of the control.  Use the UncheckedValue property to set a value corresponding to the unchecked state.

Use the CheckedValue property to specify the field value corresponding to the unchecked state of the control.  The table below lists the relationship between the UncheckedValue and CheckedValue properties, if the control is bound to a none-Boolean field:

CheckedValue property	UncheckedValue property	Control’s behavior if the bound field is not Boolean
Empty	Empty	Control is always in an unchecked state.
Empty	Set	Control is unchecked only when the UncheckedValue property value coincides with the field value.
Set	Empty	Control is checked only when the CheckedValue property value coincides with the field value.
Set	Set	Control is checked only when the CheckedValue property value coincides with the field value.


TcxWebDBCheckBox.CanGetData

TcxWebDBCheckBox          See Also

Returns a value identifying whether the check edit control can return the data it displays.

function CanGetData: Boolean;

Description

This method implements the CanGetData method of the IcxWebUpdateDataSupport interface.  It is designed to determine whether the control has transmitted its data within the request.  Since the data-aware check box is represented by the INPUT tag, it always transmits its data within the request.  Thus the CanGetData method of the TcxWebDBCheckBox control simply returns True.

The CanGetData method’s return value is used to determine whether the GetData method should be called.


TcxWebDBCheckBox.Destroy

TcxWebDBCheckBox          See Also

Destroys the TcxWebDBCheckBox object.

destructor Destroy; override;

Description

The Destroy method is used to dispose of the TcxWebDBCheckBox control and free any allocated memory.  It frees the DataBinding property before calling the inherited Destroy method.

Do not use the Destroy method to delete the check edit control.  Use the Free method instead.


TcxWebDBCheckBox.GetData

TcxWebDBCheckBox          See Also

Gets data displayed by the check box control to update the associated data source.

function GetData: Variant;

Description

Each time values of data-aware controls are posted the associated data source, they should be updated.  The data source scans through all of its clients for this purpose and gets their data.  It calls the GetData method of the IcxWebUpdateDataSupport interface implemented by data-aware controls.  The GetData method of the TcxWebDBCheckBox control implements this method.

If the TcxWebDBCheckBox control is checked, the GetData method returns either True or the CheckedValue property value.  True is returned if the CheckedValue property is empty.

If the TcxWebDBCheckBox control is unchecked the GetData method returns either False or the UncheckedValue property value.  False is returned if the UncheckedValue property is empty.

The GetData method is called only if the CanGetData method returns True.


TcxWebDBCheckBox.GetDataBinding

TcxWebDBCheckBox          See Also

Returns the DataBinding property value.

function GetDataBinding: TcxWebDataBinding; virtual;

Description

The GetDataBinding method is used to return the value of the DataBinding property.  If this property value is nil, it initializes it with a newly created TcxWebDataBinding object.

You can override this method in descendant classes as your needs dictate.


TcxWebDBCheckBox.RegisterRenderers

TcxWebDBCheckBox          See Also

Registers renderer classes that generate HTML code representing the data-aware check box control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers a single class used to render the HTML code for the data-aware check box.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for a check box control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxWebDBCheckBox.ScriptsSubscription

TcxWebDBCheckBox          See Also

Subscribes the data-aware check box control to client side scripts required for proper functionality.

procedure ScriptsSubscription; override;

Description

The ScriptsSubscription method subscribes the data-aware check box control to a post back script.  In addition, it calls the inherited ScriptsSubscription method.

This method implements the ScriptsSubscription method of the IcxWebScripts interface.  You can override this method in descendant classes to subscribe your control to additional scripts.


TcxWebDBCheckBox.SetData

TcxWebDBCheckBox          See Also

Sets the properties of the control with respect to a value of the field it is bound to.

procedure SetData(Value: Variant);

Description

This method implements the SetData method of the IcxWebViewDataSupport interface.  It is designed to set the values of the database check box with respect to the value of the dataset field it is bound to.  The value of the field is transmitted as the Value parameter.  As implemented in the TcxWebDBCheckBox class, the SetData method does one of the following:

•	sets the Checked property to True, if the Value parameter is True or coincides with the CheckedValue property value;

•	sets the Checked property to False, if the Value parameter is False or coincides with the UncheckedValue property value.


TcxWebDBColumn
TcxWebDBColumn Object

Hierarchy          Properties          Methods          Events

Represents a column for the TcxWebDBGrid control.

Unit

cxWebDataCtrls

TcxWebDBColumn = class(TcxWebColumn, IcxWebUpdateDataSupport);

Description

The TcxWebDBColumn class is used by the TcxWebDBGrid control to display and edit the values of a dataset field.  Each column is bound to a field within the dataset, to which the grid control is bound.  This is performed via the DataBinding property, represented by the TcxWebGridColumnDataBinding object.

There are two ways to create and customize TcxWebDBGrid columns.  The first is to use the Columns Editor dialog.  Double-click the grid control in order to invoke it.  The Add and Add Default Columns buttons allow you to add columns to the grid.  If you use the Add Default Columns button, the columns are created for all the fields and are bound to them automatically.  The runtime equivalents of these buttons are the Add and CreateDefaultColumns methods of the TcxWebDBGrid class.


TcxWebDBColumn Hierarchy
Hierarchy

TComponent

     |

TcxWebColumn


Properties for TcxWebDBColumn
TcxWebDBColumn Properties

TcxWebDBColumn          Legend

In TcxWebDBColumn

DataBinding

WebGrid

Derived from TcxWebColumn

Alignment

CellTexts

CheckedValue

ColumnHelper

EditedValue

FieldIndex

GroupingIndex

Index

MinWidth

PopupMenu

PossibleValues

ReadOnly

SortingOrder

Styles

Title

VAlignment

ViewType

Visible

WebValuesHelper

Width


Methods for TcxWebDBColumn
TcxWebDBColumn Methods

TcxWebDBColumn          Legend

In TcxWebDBColumn

CanGetData

Create

Destroy

GetColumnHelper

GetData

GetDataBinding

GetFieldIndex

GetWebGrid

SetWebGrid

Derived from TcxWebColumn

Assign

CanSetValues

CreateColumnHelper

DesignerUpdate

DoSetValues

GetCellText

GetFieldIndex

GetGridColumnStyles

GetWebValuesHelper

RegisterValues

WriteCellHTML


Events for TcxWebDBColumn
TcxWebDBColumn Events

TcxWebDBColumn          Legend

Derived from TcxWebColumn

 OnGetHref

 OnGetText

 OnLoadImage


TcxWebDBColumn.DataBinding

TcxWebDBColumn          See Also

Binds the TcxWebDBColumn object to a dataset field.

property DataBinding: TcxWebGridColumnDataBinding;

Description

Use the DataBinding property to bind a grid column to a dataset field.  Since the grid control is bound to a dataset, this property is used to set the field name only.  This is done via the FieldName property of the TcxWebGridColumnDataBinding object.

If the field name is not specified or specified incorrectly, no data will be displayed within the column.

Columns can be created and bound to dataset fields automatically.  You should use the Add Default Columns button of the Columns Editor dialog or the CreateDefaultColumns method of the TcxWebDBGrid control for this purpose.


TcxWebDBColumn.WebGrid

TcxWebDBColumn          See Also

Specifies the grid control to which the column belongs.

property WebGrid: TcxWebDBGrid;

Description

Use the WebGrid property to get or set the TcxWebDBGrid object, representing the grid control to which the column belongs.  This property value is set automatically when adding a column via the Columns Editor dialog or via the Add and CreateDefaultColumns methods of the TcxWebDBGrid class.  You can also set the value of this property manually.  This removes the column from the grid it belonged to and adds it to that specified.


TcxWebDBColumn.CanGetData

TcxWebDBColumn          See Also

Returns a value, which indicates whether the column can provide data to update the data source.

function CanGetData: Boolean;

Description

The CanGetData method is used to determine whether the column can provide data to update the associated data source.  It implements the CanGetData method of the IcxWebUpdateDataSupport interface.

As implemented in the TcxWebDBColumn class, this method returns True if the following conditions are met:

•	The value of the EditedValue property is not Null;

•	The associated grid’s EditMode property value is True.

This is implemented in such a manner because column cell values are not transmitted within the request if the grid is not in edit mode.

This method’s returns value is used to determine whether the GetData method is called.


TcxWebDBColumn.Create

TcxWebDBColumn          See Also

Creates an instance of the TcxWebDBColumn class.

constructor Create(AOwner: TComponent); override;

Description

The Create method is used to initialize the TcxWebDBColumn object.  It simply calls the inherited Create method.

Do not use the Create method to initialize grid columns.  Use the Columns Editor dialog or the Add and CreateDefaultColumns methods of the TcxWebDBGrid class instead.


TcxWebDBColumn.Destroy

TcxWebDBColumn          See Also

Destroys the TcxWebDBColumn object.

destructor Destroy; override;

Description

The Destroy method is used to dispose of the TcxWebDBColumn object and free any allocated memory.  This method frees the DataBinding property before calling the inherited destructor.

Do not use the Destroy method in your applications.  Columns are disposed of automatically when the grid control is destroyed.


TcxWebDBColumn.GetColumnHelper

TcxWebDBColumn          See Also

Gets the object to which cell rendering functionality is delegated.

function GetColumnHelper: TcxWebColumnHelper; override;

Description

Column cells are rendered differently based upon column type.  Cell rendering functionality is delegated to a separate object, which is represented by the ColumnHelper property.  This property can be represented by any descendant of the TcxWebColumnHelper class.  The GetColumnHelper method is designed to return the proper TcxWebColumnHelper descendant with respect to column type.

You can override the GetColumnHelper method in descendant classes to control the manner in which column cells are rendered.  In other words, you can return your own specifically designed TcxWebColumnHelper descendant to provide custom cells rendering.


TcxWebDBColumn.GetData

TcxWebDBColumn          See Also

Returns data displayed by the column.

function GetData: Variant;

Description

The GetData method is used to get data displayed by the column in order to update the associated data source.  This method implements the GetData method of the IcxWebUpdateDataSupport interface.  As implemented by the TcxWebDBColumn class, this method returns the EditedValue property value.

This method is called only if the CanGetData method returned True.


TcxWebDBColumn.GetDataBinding

TcxWebDBColumn          See Also

Returns the DataBinding property value.

function GetDataBinding: TcxWebGridColumnDataBinding; virtual;

Description

The GetDataBinding method is used to return the DataBinding property value.  If the DataBinding property is nil, it is initialized with a newly created TcxWebGridColumnDataBinding object.

You can override this method in descendant classes to return the value of the DataBinding property as your needs dictate.


TcxWebDBColumn.GetFieldIndex

TcxWebDBColumn          See Also

Returns the value of the FieldIndex property.

function GetFieldIndex: Integer; override;

Description

The GetFieldIndex method is used to get the FieldIndex property value.  This value is the index of the field to which the column is bound.  As implemented in the TcxWebDBColumn class, the GetFieldIndex method returns the value of the data binding’s FieldIndex property.  The data binding of the TcxWebDBColumn object is represented by its DataBinding property (TcxWebGridColumnDataBinding object).


TcxWebDBColumn.GetWebGrid

TcxWebDBColumn          See Also

Gets the value of the WebGrid property.

function GetWebGrid: TcxWebDBGrid;

Description

The GetWebGrid method is used to get the value of the WebGrid property.  This method calls the inherited GetWebGrid method and converts the result to a TcxWebDBGrid type.

You can override this method in descendant classes to read the value of the WebGrid property in your own manner.


TcxWebDBColumn.SetWebGrid

TcxWebDBColumn          See Also

Sets the value of the WebGrid property.

procedure SetWebGrid(Value: TcxWebDBGrid);

Description

The SetWebGrid method is used to set the value of the WebGrid property.  This method calls the inherited SetWebGrid method of the TcxWebColumn class.

You can override this method in descendant classes to write the value of the WebGrid property in your own manner.


TcxWebDBComboBox
 TcxWebDBComboBox Object

Hierarchy          Properties          Methods          Events

Represents a data-aware combo box control.

Unit

cxWebDataCtrls

TcxWebDBComboBox = class(TcxCustomWebComboBox, IcxWebDataSourceSupport, IcxWebUpdateDataSupport, IcxWebViewDataSupport)

Description

Use the TcxWebDBComboBox control to allow users to select a dataset field value from a predefined set.  If a dataset field value doesn’t coincide with any combo box item, the ItemIndex property is set to –1 (none of the items are selected).

The TcxWebDBComboBox control is the descendant of the TcxCustomWebComboBox class.  It inherits all the basic functionality of the combo box control.  The TcxWebDBComboBox class introduces a number of properties and methods required by a data-aware control to function properly.  Among them, it declares the DataBinding property used to bind the control to a dataset field.


TcxWebDBComboBox Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxWebFormControl

     |

TcxCustomWebListBox

     |

TcxCustomWebComboBox


Properties for TcxWebDBComboBox
TcxWebDBComboBox Properties

TcxWebDBComboBox          Legend

In TcxWebDBComboBox

DataBinding

Derived from TcxCustomWebComboBox

Text

Derived from TcxCustomWebListBox

ItemHeight

ItemIndex

Items

MinSize

MultiSelect

SelCount

Size

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebDBComboBox
TcxWebDBComboBox Methods

TcxWebDBComboBox          Legend

In TcxWebDBComboBox

CanGetData

Destroy

GetData

GetDataBinding

RegisterRenderers

ScriptsSubscription

SetData

Derived from TcxCustomWebComboBox

CheckItemIndex

Create

DoSetValues

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetItemIndex

GetMaxHeight

GetMinSize

RegisterValues

Derived from TcxCustomWebListBox

CheckNewSize

Clear

DoChange

GetMinHeight

GetSize

RegisterActions

RegisterEvents

SetItemIndex

SetSize

StyleChanged

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

SetState

ValidateContainer


Events for TcxWebDBComboBox
TcxWebDBComboBox Events

TcxWebDBComboBox          Legend

Derived from TcxCustomWebListBox

OnChange

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebDBComboBox.DataBinding

TcxWebDBComboBox          See Also

Binds the data-aware combo box to a dataset field.

property DataBinding: TcxWebDataBinding;

Description

Use the DataBinding property to bind the combo box to a dataset field.  You should specify two properties for the TcxWebDataBinding object for this purpose.  The DataSource property specifies the data source connected to a dataset containing the desired field.  You should use either the TcxStdWebDataSource, TcxWebDataSource or TcxWebDBDataSource component to set the value for this property.  The FieldName property of the TcxWebDataBinding object specifies the name of the field to which the check box control is bound.  If at least one of these properties is not set or set incorrectly, the combo box control will behave as if it was not data-aware.


TcxWebDBComboBox.CanGetData

TcxWebDBComboBox          See Also

Returns a value identifying whether the check edit control can return data it displays.

function CanGetData: Boolean;

Description

This method implements the CanGetData method of the IcxWebUpdateDataSupport interface.  It is designed to determine whether the control has transmitted its data within the request.  Since a data-aware combo box is represented by the INPUT tag, it always transmits its data within the request.  Thus the CanGetData method of the TcxWebDBComboBox control simply returns True.

The CanGetData method’s return value is used to determine whether the GetData method should be called.


TcxWebDBComboBox.Destroy

TcxWebDBComboBox          See Also

Destroys the TcxWebDBComboBox object.

destructor Destroy; override;

Description

The Destroy method is used to dispose of the TcxWebDBComboBox control and free any allocated memory.  If frees the DataBinding property before calling the inherited Destroy method.

Do not use the Destroy method to delete the check edit control.  Use the Free method instead.


TcxWebDBComboBox.GetData

TcxWebDBComboBox          See Also

Gets data displayed by the combo box control to update the associated data source.

function GetData: Variant;

Description

Each time data-aware values are posted the associated data source, they should be updated.  The data source scans through all of its clients for this purpose and gets their data.  It calls the GetData method of the IcxWebUpdateDataSupport interface implemented by data-aware controls.  The GetData method of the TcxWebDBComboBox control implements this method.

If the ItemIndex property is –1 (no item is selected), the GetData method returns NULL.    Otherwise it returns the text of the currently selected item.

The GetData method is called only if the CanGetData method returns True.


TcxWebDBComboBox.GetDataBinding

TcxWebDBComboBox          See Also

Returns the DataBinding property value.

function GetDataBinding: TcxWebDataBinding; virtual;

Description

The GetDataBinding method is used to return the value of the DataBinding property.  If this property value is nil, it initializes it with a newly created TcxWebDataBinding object.

You can override this method in descendant classes as your needs dictate.


TcxWebDBComboBox.RegisterRenderers

TcxWebDBComboBox          See Also

Registers renderer classes that generate HTML code representing the data-aware combo box control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers a single class used to render the HTML code for the data-aware combo box.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for a combo box control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxWebDBComboBox.ScriptsSubscription

TcxWebDBComboBox          See Also

Subscribes the database check box control to client side scripts required for proper functionality.

procedure ScriptsSubscription; override;

Description

The ScriptsSubscription method subscribes the data-aware combo box control to a post back script.  In addition, it calls the inherited ScriptsSubscription method.

This method implements the ScriptsSubscription method of the IcxWebScripts interface.  You can override this method in descendant classes to subscribe your control to your own scripts.


TcxWebDBComboBox.SetData

TcxWebDBComboBox          See Also

Sets the values of the control with respect to the value of the field it is bound to.

procedure SetData(Value: Variant);

Description

This method implements the SetData method of the IcxWebViewDataSupport interface.  It is designed to set the values of the data-aware combo box with respect to the value of the dataset field it is bound to.  The value of the field is transmitted as a Value parameter.  As implemented in the TcxWebDBCheckBox class, the SetData method makes the item, coinciding with the Value parameter, selected.  If there is no item whose text coincides with the Value parameter, the ItemIndex property is set to –1 (none of the items is selected).


TcxWebDBDataNavigator
 TcxWebDBDataNavigator Object

Hierarchy          Properties          Methods          Events

Represents the data navigator control.

Unit

cxWebDataCtrls

TcxWebDBDataNavigator = class(TcxCustomWebDataNavigator, IcxWebDataSourceSupport)

Description

Use the TcxWebDBDataNavigator object to add a control managing navigation through an associated dataset to a page.  This control represents a set of buttons that allow an end user to change the position within the associated dataset, add, delete, edit records, etc.  The ancestor class implements the basic functionality of the TcxWebDBDataNavigator control.  This functionality includes visual aspects.  The TcxWebDBDataNavigator class introduces the DataBinding property that associates the control with a data source and implements the IcxWebDataSourceSupport interface.

The TcxWebDBDataNavigator control supports a set of custom events for client side processing.  These event types are specified by the TcxWebNavigatorEvent type.


TcxWebDBDataNavigator Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxCustomWebDataNavigator


Properties for TcxWebDBDataNavigator
TcxWebDBDataNavigator Properties

TcxWebDBDataNavigator          Legend

In TcxWebDBDataNavigator

DataBinding

Derived from TcxCustomWebDataNavigator

ButtonCount

Buttons

ButtonWidth

Height

Images

PageSize

ShowHint

Width

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebDBDataNavigator
TcxWebDBDataNavigator Methods

TcxWebDBDataNavigator          Legend

In TcxWebDBDataNavigator

Destroy

GetDataBinding

RegisterRenderers

Derived from TcxCustomWebDataNavigator

Create

DoSetValues

RegisterActions

RegisterValues

ScriptsSubscription

UpdateButtonWidth

UpdateWidth

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterEvents

SetState

ValidateContainer


Events for TcxWebDBDataNavigator
TcxWebDBDataNavigator Events

TcxWebDBDataNavigator          Legend

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebDBDataNavigator.DataBinding

TcxWebDBDataNavigator          See Also

Represents the associated data source.

property DataBinding: TcxWebDataNavigatorBinding;

Description

Use the DataBinding property to associate the data navigator control with a data source.  Once complete, the data navigator control manages navigation through the records of the assigned dataset.

The associated dataset is specified by the DataSource property of the TcxWebDataNavigatorBinding object, which represents the DataBinding property.  You should use the TcxStdWebDataSource, TcxWebDataSource or TcxWebDBDataSource component in order to set a value for this property.

This property implements the IcxWebDataSourceSupport interface.

ReadOnly Property


TcxWebDBDataNavigator.Destroy

TcxWebDBDataNavigator          See Also

Destroys the TcxWebDBDataNavigator object.

destructor Destroy; override;

Description

The Destroy method is used to dispose of the TcxWebDBDataNavigator object and free any allocated memory.  This method frees the DataBinding property before calling the inherited Destroy method.

Do not use the Destroy method to dispose of the TcxWebDBDataNavigator object.  Call the Free method instead.


TcxWebDBDataNavigator.GetDataBinding

TcxWebDBDataNavigator          See Also

Gets the object representing the associated data source.

function GetDataBinding: TcxWebDataNavigatorBinding; virtual;

Description

The GetDataBinding method returns the value of the DataBinding property, if assigned.  Otherwise it creates a new TcxWebDataNavigatorBinding object and returns it.

This method is a ‘read’ of the DataBinding property.  You can override it in descendant classes to implement a custom behavior for this property.


TcxWebDBDataNavigator.RegisterRenderers

TcxWebDBDataNavigator          See Also

Registers renderer classes that generate HTML code representing the data navigator control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers three specific renderer classes designed to render HTML code for the data navigator control.  The browser types for which the registered renderers are designed are Internet Explorer, Netscape Navigator 4.0 and Netscape Navigator 6.0.  The renderer class designed for Internet Explorer is the default.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for a data navigator control.

This method overrides the RegisterRenderers method of the TcxCustomWebDataNavigator class.


TcxWebDBEdit
 TcxWebDBEdit Object

Hierarchy          Properties          Methods          Events          See Also

Represents a data-aware edit control.

Unit

cxWebDataCtrls

TcxWebDBEdit = class(TcxCustomWebEdit, IcxWebDataSourceSupport, IcxWebUpdateDataSupport, IcxWebViewDataSupport)

Description

Use the TcxWebDBEdit control to enable users to edit a database field.  This control permits only a single line of text.  If your field contains lengthy data requiring multiple lines, consider using the TcxWebDBMemo control instead.

If the application does not require the data-aware capabilities of data-aware edit control, use the TcxWebEdit control instead.


TcxWebDBEdit Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxWebFormControl

     |

TcxCustomWebEdit


Properties for TcxWebDBEdit
TcxWebDBEdit Properties

TcxWebDBEdit          Legend

In TcxWebDBEdit

DataBinding

Derived from TcxCustomWebEdit

MaxLength

Password

ReadOnly

Size

Text

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebDBEdit
TcxWebDBEdit Methods

TcxWebDBEdit          Legend

In TcxWebDBEdit

CanGetData

Destroy

GetData

GetDataBinding

RegisterRenderers

ScriptsSubscription

SetData

Derived from TcxCustomWebEdit

CheckNewSize

Create

DoSetValues

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetMaxHeight

GetMinHeight

GetMinWidth

GetText

RegisterValues

SetText

StyleChanged

Derived from TcxWebFormControl

 	RegisterEvents

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

GetColor

GetDefaultColor

GetHorzBordersSize

GetMaxWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterActions

SetState

ValidateContainer


Events for TcxWebDBEdit
TcxWebDBEdit Events

TcxWebDBEdit          Legend

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebDBEdit.DataBinding

TcxWebDBEdit          See Also

Binds the edit control to a dataset field.

property DataBinding: TcxWebDataBinding;

Description

Use the DataBinding property to bind the edit control to a dataset field.  You should specify two properties for the TcxWebDataBinding class for this purpose.  The DataSource property specifies the data source connected to the dataset containing the desired field.  You should either use the TcxStdWebDataSource, TcxWebDataSource or TcxWebDBDataSource component to set the value for this property.  The FieldName property of the TcxWebDataBinding object specifies the name of the field to which the edit control is bound.

The control delegates the implementation of the IcxWebDataSourceSupport interface to the TcxWebDataBinding class via the DataBinding property.


TcxWebDBEdit.CanGetData

TcxWebDBEdit          See Also

Returns a value identifying whether the edit control can return the data it displays.

function CanGetData: Boolean;

Description

This method implements the CanGetData method of the IcxWebUpdateDataSupport interface.  It is designed to determine whether the control has transmitted its data within the request.  Since the data-aware edit is represented by the INPUT tag, it always transmits its data within the request.  Thus the CanGetData method of the TcxWebDBEdit control always returns True.

The CanGetData method’s return value is used to determine whether the GetData method should be called.


TcxWebDBEdit.Destroy

TcxWebDBEdit          See Also

Destroys the TcxWebDBEdit control.

destructor Destroy; override;

Description

The Destroy method is used to dispose of the TcxWebDBEdit control and free any allocated memory.  If frees the DataBinding property before calling the inherited destructor.

Do not use the Destroy method to delete the edit control.  Use the Free method instead.


TcxWebDBEdit.GetData

TcxWebDBEdit          See Also

Gets the data displayed by the edit control in order to update the associated data source.

function GetData: Variant;

Description

Each time values of data-aware controls are posted, the associated data source should be updated.  The data source scans through all of its clients for this purpose and gets their data.  It calls the GetData method of the IcxWebUpdateDataSupport interface implemented by data-aware controls.  The GetData method of the TcxWebDBEdit control implements this method.

The GetData method returns the Text property value. The GetData method is called only if the CanGetData method returns True.


TcxWebDBEdit.GetDataBinding

TcxWebDBEdit          See Also

Returns the DataBinding property value.

function GetDataBinding: TcxWebDataBinding; virtual;

Description

The GetDataBinding method is used to return the value of the DataBinding property.  If this property value is nil, the method initializes it with a newly created TcxWebDataBinding object.

You can override this method in descendant classes as your needs dictate.


TcxWebDBEdit.RegisterRenderers

TcxWebDBEdit          See Also

Registers renderer classes that generate HTML code representing the data-aware edit control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers two classes used to render the HTML code for the data-aware edit control.  These classes render HTML code representing the control in Internet Explorer and Netscape Navigator 4.0.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for an edit control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxWebDBEdit.ScriptsSubscription

TcxWebDBEdit          See Also

Subscribes the data-aware edit control to client side scripts required for proper functionality.

procedure ScriptsSubscription; override;

Description

The ScriptsSubscription method subscribes the data-aware edit control to a post back script.  In addition, it calls the inherited  ScriptsSubscription method.

This method implements the ScriptsSubscription method of the IcxWebScripts interface.  You can override this method in descendant classes to subscribe your control to additional scripts.


TcxWebDBEdit.SetData

TcxWebDBEdit          See Also

Sets the properties of the control with respect to a value of the field it is bound to.

procedure SetData(Value: Variant);

Description

This method implements the SetData method of the IcxWebViewDataSupport interface.  It is designed to update the properties of the database edit with respect to the value of the dataset field it is bound to.  The value of the field is transmitted as the Value parameter.  As implemented in the TcxWebDBEdit class, the SetData method updates the value of the Text property.


TcxWebDBGrid
 TcxWebDBGrid Object

Hierarchy          Properties          Methods          Events          See Also

Displays and manipulates records from a dataset in a tabular grid.

Unit

cxWebDataCtrls

TcxWebDBGrid = class(TcxCustomWebGrid, IcxWebDataSourceSupport)

Description

Place the TcxWebDBGrid control on a form to display and edit records from a database table or query.  Applications can use the data grid to insert, delete, or edit data in the database, or simply to display it.

At runtime, users can use the database navigator (TcxWebDBDataNavigator) to move through data in the grid, and to insert, delete, and edit the data.

The TcxWebDBGrid control implements generic behavior introduced in the TcxCustomWebGrid class.

The TcxWebDBGrid control supports a set of custom events for client side processing.  These event types are specified by the TcxWebGridEvent type.


TcxWebDBGrid Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxCustomWebGrid


Properties for TcxWebDBGrid
TcxWebDBGrid Properties

TcxWebDBGrid          Legend

In TcxWebDBGrid

Columns

DataBinding

DataSource

Derived from TcxCustomWebGrid

AllowExpanding

AllowGrouping

AllowSorting

AutoWidth

BorderColor

BorderWidth

ColumnCount

Columns

Designer

EditMode

FirstVisibleColumnIndex

FirstVisibleRow

FocusedRow

GroupNodesPopupMenu

GroupNodesStyles

GroupPanelHeight

GroupPanelPopupMenu

GroupPanelStyles

HeaderHeight

HeaderPopupMenu

HeaderStyles

ImageIndexes

Images

IndicatorPopupMenu

IndicatorStyles

IndicatorType

IndicatorWidth

KeepPageSize

LastVisibleColumnIndex

LastVisibleRowIndex

LockCount

Mode

PageSize

RecordCount

RowCount

RowHeight

SelectedColor

SelectedFontColor

ShowGrid

ShowGroupedColumns

ShowGroupPanel

ShowHeader

ShowIndicator

ShowStatusPanel

StatusPanelHeight

StatusPanelPopupMenu

StatusPanelStyles

StatusPanelText

VisibleColumnsCount

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebDBGrid
TcxWebDBGrid Methods

TcxWebDBGrid          Legend

In TcxWebDBGrid

Add

CanCreateDefaultColumns

ColumnByName

Create

CreateDefaultColumns

Destroy

GetAllowExpanding

GetAllowGrouping

GetAllowSorting

GetColumn

GetDataBinding

GetDataSource

GetFocusedRow

GetGroupingItemCount

GetGroupingItemIndex

GetItemGroupIndex

GetItemSortOrder

GetMode

GetRecordCount

GetRowCount

GetRowDisplayText

GetRowExpanded

GetRowLevel

GetRowRecord

GetRowValue

GetSortingItemCount

GetSortingItemIndex

RegisterRenderers

ScriptsSubscription

SetColumn

Derived from TcxCustomWebGrid

AdjustWebGridWidth

AssignItems

BeginUpdateLayout

ChangeColumnsLayout

Clear

Delete

DesignerModified

DoSetValues

EndUpdateLayout

GetColumnList

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetMode

GetShownGroupPanelHeight

GetShownHeaderHeight

GetShownIndicatorWidth

GetShownStatusPanelHeight

IndexOf

NeedCorrectHeight

RefreshHeight

RefreshPageSize

RegisterValues

SetBounds

StyleChanged

UniqueColumnName

UpdateColumnsLayout

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

Create

Destroy

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterActions

RegisterEvents

SetState

ValidateContainer


Events for TcxWebDBGrid
TcxWebDBGrid Events

TcxWebDBGrid          Legend

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebDBGrid.Columns

TcxWebDBGrid          See Also

Provides indexed access to grid columns.

property Columns[Index: Integer]: TcxWebDBColumn;

Description

Use the Columns property to obtain the TcxWebDBColumn object representing the specified column.  Column is specified by its index via the Index parameter.

Use the ColumnCount property to retrieve the number of column within the grids control.


TcxWebDBGrid.DataBinding

TcxWebDBGrid          See Also

Binds the grid control to a dataset.

property DataBinding: TcxWebGridDataBinding;

Description

Use the DataBinding property to bind the grid to a dataset.  You should specify the DataSource property of the TcxWebGridDataBinding object for this purpose.  You should use either the TcxStdWebDataSource, TcxWebDataSource or TcxWebDBDataSource component to set the value of this property.


TcxWebDBGrid.DataSource

TcxWebDBGrid          See Also

Returns the data source component to which the grid control is bound.

property DataSource: TcxCustomWebDataSource;

Description

The DataSource property provides direct access to the data source component providing the grid control with data.  The value of this property is read from the data binding object represented by the DataBinding property.  The TcxWebGridDataBinding object’s DataSource property value is read for this purpose.

ReadOnly Property


TcxWebDBGrid.Add

TcxWebDBGrid          See Also

Adds a new column to the grid control.

function Add: TcxWebColumn; override;

Description

The function creates and adds a new TcxWebColumn object to the grid’s internal collection of columns.  The Name property of the inserted column is set to a unique name returned by the UniqueColumnName method.  The UpdateColumnsLayout method is called to perform specific actions due to changes in column arrangement.


TcxWebDBGrid.CanCreateDefaultColumns

TcxWebDBGrid          See Also

Indicates whether the TcxWebDBGrid can create default columns.

function CanCreateDefaultColumns: Boolean; override;

Description

Checks whether the TcxWebDBGrid can create columns based on the information taken from the associated data source.

The CanCreateDefaultColumns method returns True if the grid is bound to a data source; otherwise the function returns False.


TcxWebDBGrid.ColumnByName

TcxWebDBGrid          See Also

Returns column by its name.

function ColumnByName(const AName: string): TcxWebDBColumn;

Description

Use the ColumnByName function to obtain access to a specified column.  The column is specified by its name via the AName parameter.


TcxWebDBGrid.Create

TcxWebDBGrid          See Also

Creates an instance of the TcxWebDBGrid class.

constructor Create(AOwner: TComponent); override;

Description

Use the Create method to create a new instance of the TcxWebDBGrid control at runtime.  The AOwner parameter specifies the owner component of the TcxWebDBGrid control (the page module).

Don’t forget to set the Parent property to a proper value when creating a control at runtime.  Otherwise it will not be displayed.


TcxWebDBGrid.CreateDefaultColumns

TcxWebDBGrid          See Also

Creates columns for all fields in the associated dataset.

procedure CreateDefaultColumns(ADeleteExsistColumns: Boolean); override;

Description

Use the CreateDefaultColumns method to add columns for all the fields of the associated dataset.  Added columns are automatically bound to dataset fields.

The ADeleteExsistColumns parameter specifies whether the grid should clear its columns collection before adding columns.  If the ADeleteExsistColumns is set to True, existing columns are deleted; otherwise they are preserved and the newly created columns will be added to the internal list of columns.

You can also use the Add method to add columns to the grid control.  In such an instance, you should bind them to dataset fields manually.


TcxWebDBGrid.Destroy

TcxWebDBGrid          See Also

Destroys the TcxWebDBGrid control.

destructor Destroy; override;

Description

The Destroy method is used to dispose of the TcxWebDBGrid control and free of all the resources allocated.  This method frees the DataBinding and DataSource properties before calling the inherited destructor.

Do not use the Destroy method to delete the grid control.  Use the Free method instead.


TcxWebDBGrid.GetAllowExpanding

TcxWebDBGrid          See Also

Returns the value of the AllowExpanding property.

function GetAllowExpanding: Boolean; override;

Description

The GetAllowExpanding method overrides the corresponding method of the base class in order to return a proper value for the AllowExpanding property.  It reads the AllowExpanding property of the associated data source component to perform the task.

The GetAllowExpanding method returns False if the grid control is not bound to a data source.


TcxWebDBGrid.GetAllowGrouping

TcxWebDBGrid          See Also

Returns the value of the AllowGrouping property.

function GetAllowGrouping: Boolean; override;

Description

The GetAllowGrouping method overrides the corresponding method of the base class in order to return a proper value for the AllowGrouping property.  It reads the AllowGrouping property of the associated data source component to perform the task.

The GetAllowGrouping method returns False if the grid control is not bound to a data source.


TcxWebDBGrid.GetAllowSorting

TcxWebDBGrid          See Also

Returns the value of the AllowSorting property.

function GetAllowSorting: Boolean; override;

Description

The GetAllowGrouping method overrides the corresponding method of the base class in order to return a proper value for the AllowSorting property.  It reads the AllowSorting property of the associated data source component to perform the task.

The GetAllowGrouping method returns False if the grid control is not bound to a data source.


TcxWebDBGrid.GetColumn

TcxWebDBGrid          See Also

Returns the value of the Columns property.

function GetColumn(Index: Integer): TcxWebDBColumn;

Description

The GetColumn method is used to obtain the value of the Columns property.  The Index parameter specifies the index of the column to be retrieved.  This method overrides the corresponding method of the base class to return a proper value type.


TcxWebDBGrid.GetDataBinding

TcxWebDBGrid          See Also

Returns the value of the DataBinding property.

function GetDataBinding: TcxWebGridDataBinding; virtual;

Description

The GetDataBinding method is used to return the value of the DataBinding property.  If this property value is nil, the method initializes it with a newly created TcxWebGridDataBinding object.

You can override this method in descendant classes as your needs dictate.


TcxWebDBGrid.GetDataSource

TcxWebDBGrid          See Also

Returns the value of the DataSource property.

function GetDataSource: TcxCustomWebDataSource;

Description

The DataSource property provides direct access to the data source component providing the grid control with data.  The value of this property is read from the data binding object represented by the DataBinding property.  The TcxWebGridDataBinding object’s DataSource property value is read for this purpose.

If no data source component is assigned to the grid control, the GetDataSource method returns nil.


TcxWebDBGrid.GetFocusedRow

TcxWebDBGrid          See Also

Returns the value of the FocusedRow property.

function GetFocusedRow: Integer; override;

Description

The GetFocusedRow method overrides the corresponding method of the base class in order to return a proper value for the FocusedRow property.  It reads the FocusedRow property of the associated data source component to perform the task.

The GetFocusedRow method returns 0 if the grid control is not bound to a data source.


TcxWebDBGrid.GetGroupingItemCount

TcxWebDBGrid          See Also

Returns the number of grouping columns.

function GetGroupingItemCount: Integer; override;

Description

The GetGroupingItemCount method overrides the corresponding method of the base class in order to return a proper number of grouped columns.  It calls the GetGroupingItemCount method of the associated data source component to perform the task.

The GetGroupingItemCount method returns 0 if the grid control is not bound to a data source.


TcxWebDBGrid.GetGroupingItemIndex

TcxWebDBGrid          See Also

Returns the index of a column specified by its position within a grouped fields list.

function GetGroupingItemIndex(Item: Integer): Integer; override;

Description

Once dataset data is grouped based upon the contents of a specific field, a new item within the grouping fields list is created.  This item contains a reference to the grouped field by which dataset values are grouped.  The order of items within a grouping fields list is specified by the grouping level.

The GetGroupingItemIndex method returns the index of a column specified by its position within a grouping fields list.  The Item parameter specifies the index of a column within the grouping fields list.

The GetGroupingItemIndex method overrides the corresponding method of the base class in order to return a proper value.  It calls the GetGroupingItemIndex method of the associated data source component to perform the task.

The GetGroupingItemIndex method returns -1 if the grid control is not bound to a data source.


TcxWebDBGrid.GetItemGroupIndex

TcxWebDBGrid          See Also

Returns the index of a column within an internal grouping fields list.

function GetItemGroupIndex(AColIndex: Integer): Integer; override;

Description

Once the dataset data is grouped based upon the contents of a specific field, a new item within a grouping fields list is created.  This item contains a reference to the mentioned grouping field by which values of the dataset are grouped.  The order of items within a grouping fields list is specified by the grouping level.

The GetItemGroupIndex method returns the index of a column within the grouping columns list.  The column is specified by its index within the grid’s columns collection via the AColIndex parameter.

The GetItemGroupIndex method overrides the corresponding method of the base class in order to return a proper value.  It calls the GetItemGroupIndex method of the associated data source component to perform the task.

The GetItemGroupIndex method returns 0 if the grid control is not bound to a data source or the specified column is not bound to a field.


TcxWebDBGrid.GetItemSortOrder

TcxWebDBGrid          See Also

Returns the sort order of the specified column.

TcxWebGridSortMode = (smNone, smAscending, smDescending);

function GetItemSortOrder(AColIndex: Integer): TcxWebGridSortMode; override;

Description

The GetItemSortOrder method returns the sort order of a specified column.  The column is specified by its index via the AColIndex parameter.

The GetItemSortOrder method overrides the corresponding method of the base class in order to return a proper value.  It calls the GetItemSortOrder method of the associated data source component to perform the task.

The GetItemSortOrder method returns smNone if the grid control is not bound to a data source or the specified column is not bound to a field.


TcxWebDBGrid.GetMode

TcxWebDBGrid          See Also

Returns the value of the Mode property.

function GetMode: TcxWebGridMode; override;

Description

The GetMode method overrides the corresponding method of the base class in order to return a proper value for the Mode property.  It checks the ActionName property value of the associated data source component to perform the task.

The GetMode method returns mBrowse if the grid control is not bound to a data source.


TcxWebDBGrid.GetRecordCount

TcxWebDBGrid          See Also

Returns the value of the RecordCount property.

function GetRecordCount: Integer; override;

Description

The GetRecordCount method overrides the corresponding method of the base class in order to return a proper value for the RecordCount property.  It reads the RecordCount property value of the associated data source component to perform the task.

The GetRecordCount method returns 0 if the grid control is not bound to a data source.


TcxWebDBGrid.GetRowCount

TcxWebDBGrid          See Also

Returns the value of the RowCount property.

function GetRowCount: Integer; override;

Description

The GetRowCount method overrides the corresponding method of the base class in order to return a proper value for the RowCount property.  It reads the RowCount property value of the associated data source component to perform the task.

The GetRowCount method returns 0 if the grid control is not bound to a data source.


TcxWebDBGrid.GetRowDisplayText

TcxWebDBGrid          See Also

Returns the text representation of the value displayed within the specified column and row.

function GetRowDisplayText(ARowIndex, AColIndex: Integer): string; override;

Description

Use the GetRowDisplayText method to obtain the text representation of the specified cell’s context.  The ARowIndex and the AColIndex parameters specify the row and column indexes of the cell.

The GetRowDisplayText method overrides the corresponding method of the base class in order to return a proper value.  It calls the GetRowDisplayText method of the associated data source component to perform the task.

The GetRowDisplayText method returns an empty string if the grid control is not bound to a data source or the specified column is not bound to a field.


TcxWebDBGrid.GetRowExpanded

TcxWebDBGrid

Returns a value indicating whether the specified row is expanded.

function GetRowExpanded(RowIndex: Integer): Boolean; override;

Description

Use the GetRowExpanded method to determine whether the specified row is expanded.  The row is specified by its index via the RowIndex parameter.  The GetRowExpanded method returns false for non-grouped rows.

The GetRowExpanded method overrides the corresponding method of the base class in order to return a proper value.  It calls the GetRowExpanded method of the associated data source component to perform the task.

The GetRowExpanded method returns False if the grid control is not bound to a data source.


TcxWebDBGrid.GetRowLevel

TcxWebDBGrid          See Also

Returns the group level of the specified row.

function GetRowLevel(RowIndex: Integer): Integer; override;

Description

Use the GetRowLevel method to determine grouping level of a specified row.  The row is specified by its index via the RowIndex parameter.

The GetRowLevel method overrides the corresponding method of the base class in order to return a proper value.  It calls the GetRowLevel method of the associated data source component to perform the task.

The GetRowLevel method returns 0 if the grid control is not bound to a data source.


TcxWebDBGrid.GetRowRecord

TcxWebDBGrid          See Also

Returns the dataset index of the row specified by its index within the grid control.

function GetRowRecord(RowIndex: Integer): Integer; override;

Description

Use the GetRowRecord method to determine the record index corresponding to the specified row. The row is specified by its index within the grid control via the RowIndex parameter.

The GetRowRecord method overrides the corresponding method of the base class in order to return a proper value.  It calls the GetRowRecord method of the associated data source component to perform the task.

The GetRowRecord method returns 0 if the grid control is not bound to a data source.


TcxWebDBGrid.GetRowValue

TcxWebDBGrid          See Also

Returns the value of the specified cell.

function GetRowValue(ARowIndex, AColIndex: Integer): Variant; override;

Description

Use the GetRowValue method to obtain the value of a specified grid cell.  The cell is specified by its row and column indexes via the ARowIndex and ACoIndex parameters respectively.

The GetRowValue method overrides the corresponding method of the base class in order to return a proper value.  It calls the GetRowValue method of the associated data source component to perform the task.

The GetRowValue method returns an empty string if the grid control is not bound to a data source.


TcxWebDBGrid.GetSortingItemCount

TcxWebDBGrid          See Also

Returns the number of columns against whose values data is sorted.

function GetSortingItemCount: Integer; override;

Description

Use the GetSortingItemCount function to determine the number of columns whose values are used to sort data within the grid control.

The GetSortingItemCount method overrides the corresponding method of the base class in order to return a proper value.  It calls the GetSortingItemCount method of the associated data source component to perform the task.

The GetSortingItemCount method returns 0 if the grid control is not bound to a data source.


TcxWebDBGrid.GetSortingItemIndex

TcxWebDBGrid          See Also

Returns the index of the column specified by its index within the sorted columns list.

function GetSortingItemIndex(Item: Integer): Integer; override;

Description

Use the GetSortingItemIndex method to obtain the index of the column specified by its index within the sorted columns list.  The index within the sorted columns list is specified by the Item parameter.

The GetSortingItemIndex method overrides the corresponding method of the base class in order to return a proper value.  It calls the GetSortingItemIndex method of the associated data source component to perform the task.

The GetSortingItemCount method returns 0 if the grid control is not bound to a data source.


TcxWebDBGrid.RegisterRenderers

TcxWebDBGrid          See Also

Registers renderer classes that generate HTML code representing the data-aware grid control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers two classes used to render the HTML code for the data-aware grid control.  These classes render HTML code representing the control in the Internet Explorer, Netscape Navigator 4.0 and Netscape Navigator 6.0 browsers.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for a grid control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxWebDBGrid.ScriptsSubscription

TcxWebDBGrid          See Also

Subscribes the data-aware grid control to client side scripts required for proper functionality.

procedure ScriptsSubscription; override;

Description

 The ScriptsSubscription method subscribes the data-aware grid control to a post back script.  In addition, it calls the inherited  ScriptsSubscription method.

This method implements the ScriptsSubscription method of the IcxWebScripts interface.  You can override this method in descendant classes to subscribe your control to additional scripts.


TcxWebDBGrid.SetColumn

TcxWebDBGrid          See Also

Sets the value of the Columns property.

procedure SetColumn(Index: Integer; Value: TcxWebDBColumn);

Description

The SetColumn method is used to assign the specified value to the Columns property.  The Index parameter specifies the index of the column to which the specified value should be assigned.  The assigned value is specified by the Value parameter.

This method overrides the corresponding method of the base class to assign proper value types.


TcxWebDBImage
 TcxWebDBImage Object

Hierarchy          Properties          Methods          Events          See Also

Represents a data-aware image control.

Unit

cxWebDataCtrls

TcxWebDBImage = class(TcxCustomWebImage, IcxWebDataSourceSupport, IcxWebViewDataSupport)

Description

Use the TcxWebDBImage control to display images from a dataset field on a web page.

If the application doesn’t require the data-aware capabilities of the data-aware image control, use the TcxWebImage control instead.


TcxWebDBImage Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxCustomWebImage


Properties for TcxWebDBImage
TcxWebDBImage Properties

TcxWebDBImage          Legend

In TcxWebDBImage

DataBinding

Derived from TcxCustomWebImage

AltText

DesignPicturePath

DisplayStyle

HorzSpace

PictureURL

VertSpace

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebDBImage
TcxWebDBImage Methods

TcxWebDBImage          Legend

In TcxWebDBImage

Destroy

GetDataBinding

RegisterRenderers

ScriptsSubscription

SetData

Derived from TcxCustomWebImage

Create

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

Create

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterActions

RegisterEvents

RegisterValues

SetState

ValidateContainer


Events for TcxWebDBImage
TcxWebDBImage Events

TcxWebDBImage          Legend

In TcxWebDBImage

 OnLoadImage

Derived from TcxWebComponent

 OnAfterRender

 OnBeforeRender


TcxWebDBImage.DataBinding

TcxWebDBImage          See Also

Binds the image control to a dataset field.

property DataBinding: TcxWebGridDataBinding;

Description

Use the DataBinding property to bind the image control to a field within a dataset.  You should specify two properties for the TcxWebDataBinding class for this purpose.  The DataSource property specifies the data source connected to a dataset containing the desired field.  You should use either the TcxStdWebDataSource, TcxWebDataSource or TcxWebDBDataSource component to set the value for this property.  The FieldName property of the TcxWebDataBinding object specifies the name of the field to which the image control is bound.


TcxWebDBImage.Destroy

TcxWebDBImage          See Also

Destroys the TcxWebDBImage control.

destructor Destroy; override;

Description

The Destroy method is used to dispose of the TcxWebDBImage control and free any allocated memory.  If frees the DataBinding property before calling the inherited destructor.

Do not use the Destroy method to delete the image control.  Use the Free method instead.


TcxWebDBImage.GetDataBinding

TcxWebDBImage          See Also

Returns the DataBinding property value.

function GetDataBinding: TcxWebDataBinding; virtual;

Description

The GetDataBinding method is used to return the value of the DataBinding property.  If this property value is nil, the method initializes it with a newly created TcxWebDataBinding object.

You can override this method in descendant classes as your needs dictate.


TcxWebDBImage.RegisterRenderers

TcxWebDBImage          See Also

Registers renderer classes that generate HTML code representing the data-aware image control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers a single class used to render the HTML code for the data-aware image control.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for an image control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxWebDBImage.ScriptsSubscription

TcxWebDBImage          See Also

Subscribes the data-aware image control to client side scripts required for proper functionality.

procedure ScriptsSubscription; override;

Description

The ScriptsSubscription method subscribes the data-aware image control to a post back script.  In addition, it calls the inherited ScriptsSubscription method.

This method implements the ScriptsSubscription method of the IcxWebScripts interface.  You can override this method in descendant classes to subscribe your control to additional scripts.


TcxWebDBImage.SetData

TcxWebDBImage          See Also

Sets the properties of the control with respect to a value of the field it is bound to.

procedure SetData(Value: Variant);

Description

This method implements the SetData method of the IcxWebViewDataSupport interface.  It is designed to update the properties of the database image control with respect to the value of the dataset field it is bound to.  The value of the field is transmitted as the Value parameter.  As implemented in the TcxWebDBImage class, the SetData method loads the picture into the cache and sets its URL to the PictureURL property.


TcxWebDBImage.OnLoadImage

TcxWebDBImage          See Also

Fires when determining the type of images displayed by the data-aware image editor.

type

  TcxLoadImageEvent = procedure(Sender: TObject; var GraphicClass: TGraphicClass) of object;

property OnLoadImage: TcxLoadImageEvent;

Description

Write an OnLoadImage event handler to specify the type of images displayed by the data-aware image editor.  This is only necessary if the editor displays pictures which are not bitmaps.

The Sender parameter specifies the event sender.  The class of TGraphic descendants must be assigned to the GraphicClass parameter.  For instance, if the editor must display JPEG images, you should assign the TJPEGImage class to this parameter.


TcxWebDBDateEdit
 TcxWebDBDateEdit Object

Hierarchy          Properties          Methods          Events         See Also

Represents a data-aware dropdown calendar control.

Unit

cxWebDataCtrls

TcxWebDBDateEdit = class(TcxCustomWebDateEdit, IcxWebDataSourceSupport, IcxWebUpdateDataSupport, IcxWebViewDataSupport)

Description

Use the TcxWebDBDateEdit control to place a data-aware dropdown calendar control onto a web page.  It provides the ability to edit date values by typing into the editor or via the dropdown calendar sheet.  The calendar sheet’s functionality is implemented by the TcxCustomWebCalendar class, which serves as an ancestor.

If you don’t need the data-aware functionality of the TcxWebDBDateEdit control, use the TcxWebDateEdit instead.

Both the TcxWebDBDateEdit and TcxWebDateEdit controls support a set of custom events for client side processing.  These event types are specified by the TcxWebDateEditEvent type.


TcxWebDBDateEdit Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxCustomWebCalendar

     |

TcxCustomWebDateEdit


Properties for TcxWebDBDateEdit
TcxWebDBDateEdit Properties

TcxWebDBDateEdit          Legend

In TcxWebDBDateEdit

DataBinding

Derived from TcxCustomWebDateEdit

ButtonImageIndex

ButtonStyles

ButtonWidth

EditorStyles

Derived from TcxCustomWebCalendar

CellPadding

CellSpacing

DayHeaderAlignment

DayHeaderStyle

DayNameFormat

DaysOfWeekNames

FirstDayOfWeek

ForcePostBack

Height

Images

MonthNames

MonthNameFormat

NextMonthImageIndex

NextMonthText

OtherMonthDayStyle

PrevMonthImageIndex

PrevMonthText

SelectedDate

SelectedStyle

ShowMonthPictures

ShowTodayLink

ShowYear

TitleStyle

TodayPanelStyle

Width

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebDBDateEdit
TcxWebDBDateEdit Methods

TcxWebDBDateEdit          Legend

In TcxWebDBDateEdit

 CanGetData

 Create

 Destroy

 GetData

 GetDataBinding

 RegisterRenderers

 SetData

Derived from TcxCustomWebDateEdit

 CalcTextHeight

 DoSetValues

 RegisterValues

 StyleChanged

Derived from TcxCustomWebCalendar

 DateToWebString

 RegisterActions

 ScriptsSubscription

 WebStringToDate

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterEvents

SetState

ValidateContainer


Events for TcxWebDBDateEdit
TcxWebDBDateEdit Events

TcxWebDBDateEdit          Legend

Derived from TcxCustomWebCalendar

OnNextMonthSelect

OnPrevMonthSelect

OnSelectDay

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebDBDateEdit.DataBinding

TcxWebDBDateEdit          See Also

Binds the date edit control to a dataset field.

property DataBinding: TcxWebDataBinding;

Description

Use the DataBinding property to bind a date editor to a dataset field.  You should specify two properties of the TcxWebDataBinding class for this purpose.  The DataSource property specifies the data source connected to the dataset containing the desired field.  You should use the TcxStdWebDataSource, TcxWebDataSource or the TcxWebDBDataSource component to set the value for this property.  The FieldName property of the TcxWebDataBinding object specifies the name of the field to which the label control is bound.

The TcxWebDBDateEdit control delegates the implementation of the IcxWebDataSourceSupport interface to the TcxWebDataBinding class via the DataBinding property.


TcxWebDBDateEdit.CanGetData

TcxWebDBDateEdit

Returns a value identifying whether the date edit control can return the data it displays.

function CanGetData: Boolean;

Description

This method implements the CanGetData method of the IcxWebUpdateDataSupport interface.  It determines whether the control has transmitted its data within the request.  Since the data-aware date editor always transmits its data within the request, the CanGetData method always returns True.

The CanGetData method’s return value is used to determine whether the GetData method should be called.


TcxWebDBDateEdit.Create

TcxWebDBDateEdit          See Also

Creates an instance of the TcxWebDBDateEdit class.

procedure Create(AOwner: TComponent); override;

Description

Use the Create method to create a data-aware dropdown calendar control at runtime.  The AOwner parameter specifies the owner of the newly created control (a page module).  This method initializes the DataBinding property after calling the inherited constructor.

Remember to specify the Parent property of the newly created control.


TcxWebDBDateEdit.Destroy

TcxWebDBDateEdit          See Also

Destroys the TcxWebDBDateEdit control.

procedure Destroy; override;

Description

The Destroy method disposes of the TcxWebDBDateEdit control and frees any allocated memory.  It frees the DataBinding property before calling the inherited destructor.

Do not use the Destroy method in applications.  Call the Free method instead.


TcxWebDBDateEdit.GetData

TcxWebDBDateEdit

Gets data, displayed by the date edit control, in order to update the associated data source.

function GetData: Variant;

Description

Each time values of data-aware controls are posted, the associated data source should be updated.  The data source scans all of its clients for this purpose and gets their data.  It calls the GetData method of the IcxWebUpdateDataSupport interface implemented by data-aware controls.  The GetData method of the TcxWebDBDateEdit control implements this method.

The GetData method returns the selected date, which is read from the SelectedDate property value.

The GetData method is called only if the CanGetData method returns True.


TcxWebDBDateEdit.GetDataBinding

TcxWebDBDateEdit

Returns the DataBinding property value.

function GetDataBinding: TcxWebDataBinding; virtual;

Description

The GetDataBinding method is used to return the DataBinding property value.  If this property value is nil, it initializes it with the newly created TcxWebDataBinding object.

You can override this method in descendant classes as required.


TcxWebDBDateEdit.RegisterRenderers

TcxWebDBDateEdit

Registers renderer classes that generate HTML code representing the data-aware date edit control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers two classes used to render the HTML code for the data-aware date editor.  These classes render HTML code representing the control in Internet Explorer and Netscape Navigator 4.0.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for a date edit control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxWebDBDateEdit.SetData

TcxWebDBDateEdit

Sets the control’s properties with respect to the field value to which it is bound.

procedure SetData(Value: Variant);

Description

This method implements the SetData method of the IcxWebViewDataSupport interface.  It is designed to update the properties of the database date editor with the value of the dataset field to which it is bound.  The field value is passed as the Value parameter.  As implemented in the TcxWebDBDateEdit class, the SetData method updates the SelectedDate property value.


TcxWebDBCalendar
 TcxWebDBCalendar Object

Hierarchy          Properties          Methods          Events

Represents a data-aware calendar control.

Unit

cxWebDataCtrls

TcxWebDBCalendar = class(TcxCustomWebCalendar, IcxWebDataSourceSupport, IcxWebUpdateDataSupport, IcxWebViewDataSupport)

Description

Use the TcxWebDBCalendar control to display and edit dataset field values with the help of a calendar control.  This control displays a monthly calendar and provides means of navigating through months and selecting individual dates.

The TcxWebDBCalendar control consists of three elements.  The top section is the header displaying the month name and the year.  The year is only displayed if the ShowYear property is set to True.  This header also contains buttons used to navigate between months.  The ShowMonthPictures property specifies whether these buttons are represented by images or text strings.

The middle section displays days of the week.  The styles of these two headers are specified by the TitleStyle and DayHeaderStyle properties.

The bottom section of the control is a calendar sheet displaying dates.  A date can be selected by clicking the appropriate date on the calendar sheet.  The selected date can be also obtained and set at runtime via the SelectedDate property.  Calendar style is controlled via the Styles, SelectedStyle and OtherMonthDayStyle properties.

The TcxWebDBCalendar control supports a set of custom events for client side processing.  These event types are specified by the TcxWebCalendarEvent type.

If you don’t need the data-aware capabilities of the TcxWebDBCalendar control, use the TcxWebCalendar instead.


TcxWebDBCalendar Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxCustomWebCalendar


Properties for TcxWebDBCalendar
TcxWebDBCalendar Properties

TcxWebDBCalendar          Legend

In TcxWebDBCalendar

DataBinding

Derived from TcxCustomWebCalendar

CellPadding

CellSpacing

DayHeaderAlignment

DayHeaderStyle

DayNameFormat

DaysOfWeekNames

FirstDayOfWeek

ForcePostBack

Height

Images

MonthNames

MonthNameFormat

NextMonthImageIndex

NextMonthText

OtherMonthDayStyle

PrevMonthImageIndex

PrevMonthText

SelectedDate

SelectedStyle

ShowMonthPictures

ShowTodayLink

ShowYear

TitleStyle

TodayPanelStyle

Width

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebDBCalendar
TcxWebDBCalendar Methods

TcxWebDBCalendar          Legend

In TcxWebDBCalendar

 CanGetData

 Create

 Destroy

 GetData

 GetDataBinding

 RegisterRenderers

 SetData

Derived from TcxCustomWebCalendar

 DateToWebString

 DoSetValues

 RegisterActions

 RegisterValues

 ScriptsSubscription

 WebStringToDate

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterEvents

SetState

ValidateContainer


Events for TcxWebDBCalendar
TcxWebDBCalendar Events

TcxWebDBCalendar          Legend

Derived from TcxCustomWebCalendar

OnNextMonthSelect

OnPrevMonthSelect

OnSelectDay

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebDBCalendar.DataBinding

TcxWebDBCalendar          See Also

Binds the calendar control to a dataset field.

property DataBinding: TcxWebDataBinding;

Description

Use the DataBinding property to bind a calendar to a dataset field.  You should specify the following two two properties of the TcxWebDataBinding class for this purpose.  The DataSource property specifies the data source connected to the dataset containing the desired field.  You should use either the TcxStdWebDataSource, TcxWebDataSource or TcxWebDBDataSource component to set the value for this property.  The FieldName property of the TcxWebDataBinding object specifies the name of the field to which the label control is bound.

The TcxWebDBCalendar control delegates the implementation of the IcxWebDataSourceSupport interface to the TcxWebDataBinding class using the DataBinding property.


TcxWebDBCalendar.CanGetData

TcxWebDBCalendar

Returns the value identifying whether the calendar control can return the data it displays.

function CanGetData: Boolean;

Description

This method implements the CanGetData method of the IcxWebUpdateDataSupport interface.  It determines whether the control has transmitted its data within the request.  As the data-aware calendar control always transmits its data within the request, the CanGetData method always returns True.

The CanGetData method’s return value is used to determine whether the GetData method should be called.


TcxWebDBCalendar.Create

TcxWebDBCalendar          See Also

Creates an instance of the TcxWebDBCalendar class.

procedure Create(AOwner: TComponent); override;

Description

Use the Create method to create a data-aware calendar control at runtime.  The AOwner parameter specifies the owner of the newly created control (a page module).  This method initializes the DataBinding property after calling the inherited constructor.

Remember to specify the Parent property of the newly created control.


TcxWebDBCalendar.Destroy

TcxWebDBCalendar          See Also

Destroys the TcxWebDBCalendar control.

procedure Destroy; override;

Description

The Destroy method disposes of the TcxWebDBCalendar control and frees any allocated memory.  It frees the DataBinding property before calling the inherited destructor.

Do not use the Destroy method in applications.  Call the Free method instead.


TcxWebDBCalendar.GetData

TcxWebDBCalendar

Gets data, displayed by the calendar control, in order to update the associated data source.

function GetData: Variant;

Description

Each time values of data-aware controls are posted, the associated data source should be updated.  The data source scans all its clients for this purpose and to get their data.  It calls the GetData method of the IcxWebUpdateDataSupport interface implemented by data-aware controls.  The GetData method of the TcxWebDBCalendar control implements this method.

The GetData method returns the selected date.  The SelectedDate property value is read for this purpose.

The GetData method is called only if the CanGetData method returns True.


TcxWebDBCalendar.GetDataBinding

TcxWebDBCalendar

Returns the DataBinding property value.

function GetDataBinding: TcxWebDataBinding; virtual;

Description

The GetDataBinding method is used to return the DataBinding property value.  If this property value is nil, it initializes it with the newly created TcxWebDataBinding object.

You can override this method in descendant classes as your needs dictate.


TcxWebDBCalendar.RegisterRenderers

TcxWebDBCalendar

Registers the renderer classes that generate the HTML code representing the data-aware calendar control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers two classes used to render the HTML code for the data-aware calendar.  These classes render HTML code representing the control in Internet Explorer and Netscape Navigator 4.0.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for your calendar control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxWebDBCalendar.SetData

TcxWebDBCalendar

Sets the control’s properties with respect to the field value to which it is bound.

procedure SetData(Value: Variant);

Description

This method implements the SetData method of the IcxWebViewDataSupport interface.  It updates the properties of the database calendar with the dataset field value to which it is bound.  The field value is transmitted as the Value parameter.  As implemented in the TcxWebDBCalendar class, the SetData method updates the SelectedDate property value.


TcxCustomWebGrid
TcxCustomWebGrid Object

Hierarchy          Properties          Methods          Events          See Also

Represents a base class for web grids.

Unit

cxWebGrids

TcxCustomWebGrid = class(TcxWebControl)

Description

The TcxCustomWebGrid class contains basic web grid functionality.  It serves as the ancestor of the TcxWebDBGrid class.


TcxCustomWebGrid Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl


Properties for TcxCustomWebGrid
TcxCustomWebGrid Properties

TcxCustomWebGrid          Legend

In TcxCustomWebGrid

AllowExpanding

AllowGrouping

AllowSorting

AutoWidth

BorderColor

BorderWidth

ColumnCount

Columns

Designer

EditMode

FirstVisibleColumnIndex

FirstVisibleRow

FocusedRow

GroupNodesPopupMenu

GroupNodesStyles

GroupPanelHeight

GroupPanelPopupMenu

GroupPanelStyles

HeaderHeight

HeaderPopupMenu

HeaderStyles

ImageIndexes

Images

IndicatorPopupMenu

IndicatorStyles

IndicatorType

IndicatorWidth

KeepPageSize

LastVisibleColumnIndex

LastVisibleRowIndex

LockCount

Mode

PageSize

ReadOnly

RecordCount

RowCount

RowHeight

SelectedColor

SelectedFontColor

ShowGrid

ShowGroupedColumns

ShowGroupPanel

ShowHeader

ShowIndicator

ShowStatusPanel

StatusPanelHeight

StatusPanelPopupMenu

StatusPanelStyles

StatusPanelText

VisibleColumnsCount

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxCustomWebGrid
TcxCustomWebGrid Methods

TcxCustomWebGrid          Legend

In TcxCustomWebGrid

Add

AdjustWebGridWidth

AssignItems

BeginUpdateLayout

CanCreateDefaultColumns

ChangeColumnsLayout

Clear

ColumnByName

Create

CreateDefaultColumns

Delete

DesignerColumnUpdate

DesignerModified

Destroy

DoSetValues

EndUpdateLayout

GetAllowExpanding

GetAllowGrouping

GetAllowSorting

GetColumn

GetColumnList

GetFocusedRow

GetGroupingItemCount

GetGroupingItemIndex

GetItemGroupIndex

GetItemSortOrder

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetMode

GetRecordCount

GetRowCount

GetRowDisplayText

GetRowExpanded

GetRowLevel

GetRowRecord

GetRowValue

GetShownGroupPanelHeight

GetShownHeaderHeight

GetShownIndicatorWidth

GetShownStatusPanelHeight

GetSortingItemCount

GetSortingItemIndex

IndexOf

NeedCorrectHeight

RefreshHeight

RefreshPageSize

RegisterRenderers

RegisterValues

ScriptsSubscription

SetBounds

SetColumn

StyleChanged

UniqueColumnName

UpdateColumnsLayout

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterActions

RegisterEvents

SetState

ValidateContainer


Events for TcxCustomWebGrid
TcxCustomWebGrid Events

TcxCustomWebGrid          Legend

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxCustomWebGrid.AllowExpanding

TcxCustomWebGrid          See Also

Gets a value indicating whether a user can expand grouped nodes.

property AllowExpanding: Boolean;

Description

Data aware web controls that are used to display data from several dataset rows (e.g. TcxWebDBGrid control) are designed to support the display of grouped dataset data.  When the data is grouped based upon the contents of a column (or columns), its data can be represented in a tree-like manner, where an additional grouped row is created for each grouped field value, and all the records that share the same values are displayed as child rows.

Use the AllowExpanding property to determine whether grouped nodes can be expanded.  As implemented in the TcxCustomWebGrid class, this property simply returns False.  The descendant TcxWebDBGrid control reads the AllowExpanding property of the associated data source component in order to return this property value.

You should use the AllowExpanding property of the associated data source component to specify whether grouped nodes can be expanded.

ReadOnly Property


TcxCustomWebGrid.AllowGrouping

TcxCustomWebGrid          See Also

Gets a value indicating whether grouping can be applied to the web grid.

property AllowGrouping: Boolean;

Description

Data displayed by the grid control can be grouped against values of one or more columns.  This can be done by an end user by dragging a column header to the group panel.  You can use the Group method of the associated data source for the same purpose.

Use the AllowGrouping property to determine whether grouping can be applied to data displayed by the grid.  As implemented in the TcxCustomWebGrid class, this property simply returns False.  The descendant TcxWebDBGrid control reads the AllowGrouping property of the associated data source component in order to return this property value.

You should use the AllowGrouping property of the associated data source component to specify whether grouping can be implemented.

ReadOnly Property


TcxCustomWebGrid.AllowSorting

TcxCustomWebGrid          See Also

Gets a value indicating whether sorting can be applied to data displayed by the grid.

property AllowSorting: Boolean;

Description

Data displayed by the grid control can be sorted against values of one or more columns.  This can be done by an end user by clicking the corresponding column headers.  You can use the Sort method of the associated data source for the same purpose.

Use the AllowSorting property to determine whether sorting can be applied to data displayed by the grid control.  As implemented in the TcxCustomWebGrid class, this property simply returns False.  The descendant TcxWebDBGrid control reads the AllowSorting property of the associated data source component in order to return this property value.

You should use the AllowSorting property of the associated data source component to specify whether sorting can be implemented

ReadOnly Property


TcxCustomWebGrid.AutoWidth

TcxCustomWebGrid          See Also

Specifies whether the grid control changes its width when a column is being resized.

property AutoWidth: Boolean;

Description

If the AutoWidth property value is True the grid control doesn’t change its width when a column is being resized.  In other words enlarging the width of a column results in decreasing the width of other columns and vice versa.

If the AutoWidth property is set to False, column resizing doesn’t affect the width of other columns.  In such an instance, the width of the grid control changes when resizing a column.

The default value of the AutoWidth property is True.


TcxCustomWebGrid.BorderColor

TcxCustomWebGrid          See Also

Specifies border color for a grid control.

property BorderColor: TcxWebColor;

Description

Use the BorderColor property to specify the color of the grid control’s borders.  The width of the borders is specified by the BorderWidth property.


TcxCustomWebGrid.BorderWidth

TcxCustomWebGrid          See Also

Specifies the grid control’s borders width.

property BorderWidth: Integer;

Description

Use the BorderWidth property to specify the width of the grid control’s borders.  The color of the borders is specified by the BorderColor property.


TcxCustomWebGrid.ColumnCount

TcxCustomWebGrid          See Also

Returns the number of columns in the grid control.

property ColumnCount: Integer;

Description

Use the ColumnCount property to determine the number of columns in the grid control.  Indexed access to objects representing columns is provided by the Columns property. In instances when the grid control contains no columns, the ColumnCount property returns 0.

ReadOnly Property


TcxCustomWebGrid.Columns

TcxCustomWebGrid          See Also

Provides indexed column access in the grid control.

property Columns[Index: Integer]: TcxWebColumn;

Description

Use the Columns property to obtain an object representing the specified column of the grid control.  The column is specified by its index via the Index parameter.  Note that columns are zero-based indexed.  The total number of columns within the grid control can be obtained via the ColumnCount property.

Note that the descendant TcxWebDBGrid control overrides this property, since its columns are represented by TcxWebDBColumn objects.


TcxCustomWebGrid.Designer

TcxCustomWebGrid          See Also

Provides access to the bound designer.

property Designer: TAbstractcxCustomWebGridDesigner;

Description

The Designer property is used to obtain access to the bound designer.

ReadOnly Property


TcxCustomWebGrid.EditMode

TcxCustomWebGrid          See Also

Determines whether the grid is in edit mode.

property EditMode: Boolean;

Description

Use the EditMode property to detect whether a user is currently editing data within the grid control.  This property returns True when a user edits a record.

You can also determine the current state of the grid control via the Mode property.

ReadOnly Property


TcxCustomWebGrid.FirstVisibleColumnIndex

TcxCustomWebGrid          See Also

Returns index of the first column visible within the grid control.

property FirstVisibleColumnIndex: Integer;

Description

Use the FirstVisibleColumnIndex property to obtain the index of the first visible column.  In instances where no visible columns exist, the property returns –1.

Use the Visible property of the TcxWebDBColumn object to control the visibility of the corresponding column.

ReadOnly Property


TcxCustomWebGrid.FirstVisibleRow

TcxCustomWebGrid          See Also

Specifies the index of the first visible row of the grid control.

property FirstVisibleRow: Integer;

Description

Use the FirstVisibleRow property to specify the index of the first visible row of the grid.  Read this property value to determine the position to which the grid is scrolled vertically.  Assign a value to this property to scroll the grid to a specified position.


TcxCustomWebGrid.FocusedRow

TcxCustomWebGrid          See Also

Returns the index of the focused row.

property FocusedRow: Integer;

Description

Returns the index of the currently focused row within the grid control.  You can also use the FocusedRowIndex property of the associated data source component to specify the index of the focused row.

As implemented in the TcxCustomWebGrid class, the FocusedRowIndex property returns 0.  The descendant TcxWebDBGrid class overrides it to return a proper value.

ReadOnly Property


TcxCustomWebGrid.GroupNodesPopupMenu

TcxCustomWebGrid          See Also

Specifies the popup menu associated with grouped nodes.

property GroupNodesPopupMenu: TcxWebPopupMenu;

Description

Use the GroupNodesPopupMenu property to assign a popup menu to grouped nodes.  You should use the TcxWebPopupMenu component to set the value for this property.


TcxCustomWebGrid.GroupNodesStyles

TcxCustomWebGrid          See Also

Specifies grouped node style.

property GroupNodesStyles: TcxWebStyles;

Description

Use the GroupNodesStyles property specify the default and hover styles of grouped nodes.  The Default and Hover properties of the TcxWebStyles object should be set for this purpose.  Use the TcxWebStyleController component to create and customize individual styles used to set these property values.


TcxCustomWebGrid.GroupPanelHeight

TcxCustomWebGrid          See Also

Specifies the height of the grouping panel.

property GroupPanelHeight: Integer;

Description

Use the GroupPanelHeight property to specify the height of the grouping panel.

The default value of the GroupPanelHeight property is 40.


TcxCustomWebGrid.GroupPanelPopupMenu

TcxCustomWebGrid          See Also

Specifies the popup menu associated with the group panel.

property GroupPanelPopupMenu: TcxWebPopupMenu;

Description

Use the GroupPanelPopupMenu property to assign a popup menu to the group panel.  You should use the TcxWebPopupMenu component to set a value for this property.


TcxCustomWebGrid.GroupPanelStyles

TcxCustomWebGrid          See Also

Specifies the grid’s group panel style.

property GroupPanelStyles: TcxWebStyles;

Description

Use the GroupPanelStyles property specify the default and hover styles of the group panel.  The Default and Hover properties of the TcxWebStyles object should be set for this purpose.  Use the TcxWebStyleController component to create and customize individual styles used to set these property values.

Use the ShowGroupPanel property to control the visibility of the grid’s group panel.


TcxCustomWebGrid.HeaderHeight

TcxCustomWebGrid          See Also

Specifies the height of the grid’s column headers.

property HeaderHeight: Integer;

Description

Use the HeaderHeight property to specify the height of column headers.

The default value for the HeaderHeight property is 30.


TcxCustomWebGrid.HeaderPopupMenu

TcxCustomWebGrid          See Also

Specifies the popup menu associated with column headers.

property HeaderPopupMenu: TcxWebPopupMenu;

Description

Use the HeaderPopupMenu property to assign a popup menu to column headers.  You should use the TcxWebPopupMenu component to set the value for this property.


TcxCustomWebGrid.HeaderStyles

TcxCustomWebGrid          See Also

Specifies column header style.

property HeaderStyles: TcxWebStyles;

Description

Use the HeaderStyles property to specify the default and hover styles of column headers.  The Default and Hover properties of the TcxWebStyles object should be set for this purpose.  Use the TcxWebStyleController component to create and customize individual styles used to set these property values.

Use the ShowHeader property to control the visibility of column headers.


TcxCustomWebGrid.ImageIndexes

TcxCustomWebGrid          See Also

Specifies custom images displayed within grid control buttons.

property ImageIndexes: TcxWebGridImageIndexes;

Description

Use the ImageIndexes property to assign custom images to the grid control’s buttons.  The property is represented by the TcxWebGridImageIndexes object.  This object provides a number of properties specifying images for available button types.

Images assigned to button types are specified by their indexes within the associated image list.  The source image list is specified by the Images property.


TcxCustomWebGrid.Images

TcxCustomWebGrid          See Also

Specifies the source of custom images displayed within the grid control.

property Images: TcxWebImageList;

Description

Use the Images property to specify the source of custom images displayed within the grid control.  You should use the TcxWebImageList component to set the value for this property.  Images supplied by the Images property are assigned to different grid buttons via the ImageIndexes property.


TcxCustomWebGrid.IndicatorPopupMenu

TcxCustomWebGrid          See Also

Specifies the popup menu associated with the indicator bar.

property IndicatorPopupMenu: TcxWebPopupMenu;

Description

Use the IndicatorPopupMenu property to assign a popup menu to the indicator bar.  You should use the TcxWebPopupMenu component to set this property value.


TcxCustomWebGrid.IndicatorStyles

TcxCustomWebGrid          See Also

Specifies a grid’s indicator bar style.

property IndicatorStyles: TcxWebStyles;

Description

Indicator bar is the leftmost element of the grid control.  It contains buttons which allow an end user to navigate through rows or perform data operations.  The purpose of the indicator bar is specified by the IndicatorType property.

Use the IndicatorStyles property to specify the default and hover styles of the indicator bar.  The Default and Hover properties of the TcxWebStyles object should be set for this purpose.  Use the TcxWebStyleController component to create and customize individual styles used to set these property values.

Use the ShowIndicator property to control the visibility of the indicator bar.


TcxCustomWebGrid.IndicatorType

TcxCustomWebGrid          See Also

Specifies the type of grid indicator bar.

TcxIndicatorType = (itCursor, itDataOp);

property IndicatorType: TcxIndicatorType;

Description

Indicator bar is the leftmost element of the grid control.  It contains buttons that allow an end user to navigate through rows or perform data operations.  The purpose of the indicator bar is specified by the IndicatorType property.

The following values are available for the IndicatorType property:

Value	Description
itCursor	The indicator bar allows an end user to navigate through the rows displayed by the grid control.  Data operations can be performed using the TcxWebDBDataNavigator control bound to the same dataset.
ItDataOp	An end user can directly delete or insert data in the grid with the help of the indicator bar.

The default value of the IndicatorType property is itDataOp.


TcxCustomWebGrid.IndicatorWidth

TcxCustomWebGrid          See Also

Specifies the width of the indicator bar.

property IndicatorWidth: Integer;

Description

Use the IndicatorWidth property to control width of the grid control’s indicator bar.

The default value for the IndicatorWidth property is 18.


TcxCustomWebGrid.KeepPageSize

TcxCustomWebGrid          See Also

Indicates whether page size should be preserved in the instances when the number of rows is less than the size of the page.

property KeepPageSize: Boolean;

Description

Use the KeepPageSize property to define whether the page size should be kept unchanged when the number of rows displayed in the grid control is less than the size of the page.

Set the property to True to preserve page size; set it to False to adjust the page size to the number of rows in the grid control.

See the PageSize property explanation for more details.


TcxCustomWebGrid.LastVisibleColumnIndex

TcxCustomWebGrid          See Also

Returns the index of the last visible column.

property LastVisibleColumnIndex: Integer;

Description

Use the LastVisibleColumnIndex property to obtain the index of the last visible column.  In instances where no visible columns exist, the property returns –1.

Use the Visible property of the TcxWebDBColumn object to control the visibility of the corresponding column.

ReadOnly Property


TcxCustomWebGrid.LastVisibleRowIndex

TcxCustomWebGrid          See Also

Returns the index of the last visible row displayed by the grid control.

property LastVisibleRowIndex: Integer;

Description

Use the LastVisibleRowIndex property to obtain the index of the last row currently visible within the grid.  The value of the property is calculated using the values of the FirstVisibleRow and PageSize properties.

ReadOnly Property


TcxCustomWebGrid.LockCount

TcxCustomWebGrid          See Also

Returns the value of the internal update counter.

property LockCount: Integer;

Description

The LockCount property is used to determine whether the grid control should respond to property value changes.  The grid control responds to changes only if this property value is zero.  Each BeginUpdateLayout method call increments this property by one.  Each EndUpdateLayout method call decrements it.  Thus all the changes performed after the BeginUpdateLayout method call take effect only when the EndUpdateLayout method is called.


TcxCustomWebGrid.Mode

TcxCustomWebGrid          See Also

Returns a value indicating whether the grid is in editing or browsing mode.

TcxWebGridMode = (mBrowse, mEdit);

property Mode: TcxWebGridMode;

Description

Use the Mode property to determine whether a user is browsing data or editing it.  The following values can be returned by the Mode property:

Value	Description
mBrowse	Indicates that a user is simply browsing data displayed by the grid control.
mEdit	Indicates that a user is editing data in the grid control.

ReadOnly Property


TcxCustomWebGrid.PageSize

TcxCustomWebGrid          See Also

Specifies the number of records displayed by the grid simultaneously.

property PageSize: Integer;

Description

Use the PageSize property to specify the number of rows displayed by the grid control simultaneously.


TcxCustomWebGrid.ReadOnly

TcxCustomWebGrid

Specifies whether users can edit data displayed by a grid control.

property ReadOnly: Boolean;

Description

Use the ReadOnly property to specify whether users are allowed to edit data displayed by a grid control.  If this property value is True, users can edit grid data.  Otherwise, the grid control doesn’t allow users to edit data which it displays.

Note that this property can only prohibit data editing via the grid control.  The data it displays can be edited via other controls or via code.

You can also use the ReadOnly property of the TcxWebDBColumn object to make a specific grid column editable or read-only.  Use the Columns property of the grid control to access a specific column.


TcxCustomWebGrid.RecordCount

TcxCustomWebGrid          See Also

Returns the number of records in the associated data source.

property RecordCount: Integer;

Description

Use the RecordCount property to obtain the number of records the associated data source component provides for the grid control.  As implemented in the TcxCustomWebGrid class, the RecordCount property returns 0.  The descendant TcxWebDBGrid class overrides it to return a proper value.

ReadOnly Property


TcxCustomWebGrid.RowCount

TcxCustomWebGrid          See Also

Returns the number of non-hidden rows within a collapsed groups.

property RowCount: Integer;

Description

The grid control provides a means for the display of data grouped against the values of one or more columns.  When data is grouped, certain rows can be hidden within collapsed groups and additional grouped rows may appear on screen.  Use the RowCount property to obtain the number of non-hidden rows within collapsed groups taking into account thost that are grouped.

As implemented in the TcxCustomWebGrid class, the RowCount property returns 0.  The descendant TcxWebDBGrid class overrides it to return a proper value.

ReadOnly Property


TcxCustomWebGrid.RowHeight

TcxCustomWebGrid          See Also

Controls the grid control’s rows height.

property RowHeight: Integer;

Description

Use the RowHeight property to get or set the height of the grid control’s rows.

Note that the RowHeight property's maximum value is limited by the height of the grid control’s client area.  The minimum value depends on whether the grid indicator is visible or not, which is specified by the ShowIndicator property:

•	If the indicator is visible (the ShowIndicator property is True), the RowHeight property value cannot be less than 26 pixels.  This limitation is to ensure that the bitmaps are properly displayed within the indicator (the height of bitmaps is defined by the cxWebGridBitmapHeight constant and equals 24 pixels).

•	If the indicator is not visible (the ShowIndicator property is False), the RowHeight minimum value equals 9.

The default value of the RowHeight property is 26.


TcxCustomWebGrid.SelectedColor

TcxCustomWebGrid          See Also

Specifies the background color of the focused row.

property SelectedColor: TcxWebColor;

Description

Use the SelectedColor property to get or set the color used for a selected row displayed within the grid control.  The font color of the focused row is specified by the SelectedFontColor property.

The default value of the SelectedColor property is clWebHighlight.


TcxCustomWebGrid.SelectedFontColor

TcxCustomWebGrid          See Also

Specifies the font color of the focused row.

property SelectedFontColor: TcxWebColor;

Description

Use the SelectedFontColor property to specify the font color used to display the focused row’s values.  The background color of the focused row is specified by the SelectedColor property.

The default value of the SelectedFontColor property is clWebCaptionText.


TcxCustomWebGrid.ShowGrid

TcxCustomWebGrid          See Also

Specifies whether grid lines are displayed.

property ShowGrid: Boolean;

Description

Use the ShowGrid property to determine whether grid lines are displayed.  Set the property to True to display vertical and horizontal lines delimiting cells from one another.  Set the property to False to remove these lines.

The default value of the ShowGrid property is True.


TcxCustomWebGrid.ShowGroupedColumns

TcxCustomWebGrid          See Also

Controls whether grouped columns are hidden.

property ShowGroupedColumns: Boolean;

Description

Use the ShowGroupedColumns property to get or set a value indicating whether grouped columns are hidden.

Set the property to False to hide a column when the grid control’s data is grouped by its values.  Set the property to True to preserve the visible grouped columns.

The default value of the ShowGrid property is True.


TcxCustomWebGrid.ShowGroupPanel

TcxCustomWebGrid          See Also

Specifies whether the group panel is visible.

property ShowGroupPanel: Boolean;

Description

Use the ShowGroupPanel property to get or set a value indicating whether the group panel is displayed.  Set the property to False to hide the group panel.

The default value of the ShowGroupPanel property is True.


TcxCustomWebGrid.ShowHeader

TcxCustomWebGrid          See Also

Specifies whether column headers are visible.

property ShowHeader: Boolean;

Description

Use the ShowHeader property to get or set a value indicating whether column headers are displayed.  Set the property to False to hide column headers.

The default value of the ShowHeader property is true.


TcxCustomWebGrid.ShowIndicator

TcxCustomWebGrid          See Also

Specifies whether the indicator bar is visible.

property ShowIndicator: Boolean;

Description

Indicator bar is the leftmost element of the grid control.  It contains buttons that allow an end user to navigate through rows or perform data operations.  The purpose of the indicator bar is specified by the IndicatorType property.

Use the ShowIndicator property to get or set a value which controls whether the indicator bar is displayed.  Set the property to False to hide it.

The default value of the ShowIndicator property is true.


TcxCustomWebGrid.ShowStatusPanel

TcxCustomWebGrid          See Also

Specifies whether the status panel is shown.

property ShowStatusPanel: Boolean;

Description

Use the ShowStatusPanel property to get or set a value which controls whether the status panel is displayed.  Set the property to False to hide the status panel.

The default value of the ShowStatusPanel property is true.


TcxCustomWebGrid.StatusPanelHeight

TcxCustomWebGrid          See Also

Specifies the height of the status panel.

property StatusPanelHeight: Integer;

Description

Use the StatusPanelHeight property to specify the height of the status panel.

The default value of the StatusPanelHeight property is 20.


TcxCustomWebGrid.StatusPanelPopupMenu

TcxCustomWebGrid          See Also

Specifies the popup menu associated with the status panel.

property StatusPanelPopupMenu: TcxWebPopupMenu;

Description

Use the StatusPanelPopupMenu property to assign a popup menu to the status panel.  You should use the TcxWebPopupMenu component to set the value for this property.


TcxCustomWebGrid.StatusPanelStyles

TcxCustomWebGrid          See Also

Specifies the style of a grid control’s status panel.

property StatusPanelStyles: TcxWebStyles;

Description

Use the StatusPanelStyles property specify the default and hover styles of the grid’s status panel.  The Default and Hover properties of the TcxWebStyles object should be set for this purpose.  Use the TcxWebStyleController component to create and customize individual styles used to set these property values.

Use the ShowStatusPanel property to control the visibility of the indicator bar.


TcxCustomWebGrid.StatusPanelText

TcxCustomWebGrid          See Also

Returns status panel text.

property StatusPanelText: string;

Description

Read the StatusPanelText property value to get the text displayed within the grid control’s status panel.

ReadOnly Property


TcxCustomWebGrid.VisibleColumnsCount

TcxCustomWebGrid          See Also

Returns the number of visible columns.

property VisibleColumnsCount: Integer;

Description

Read the VisibleColumnsCount property value to obtain the number of currently visible columns.

Use the Visible property of the TcxWebDBColumn object to control the visibility of the corresponding column.

ReadOnly Property


TcxCustomWebGrid.Add

TcxCustomWebGrid          See Also

Adds a new column to the grid control.

function Add: TcxWebColumn; virtual;

Description

The Add method creates and adds a new TcxWebColumn object to the grid’s internal collection of columns.  The Name property of the inserted column is set to a unique name returned by the UniqueColumnName method.  The UpdateColumnsLayout method is called to perform specific actions due to changes in column arrangement.


TcxCustomWebGrid.AdjustWebGridWidth

TcxCustomWebGrid          See Also

Adjusts the width of the grid control.

procedure AdjustWebGridWidth;

Description

The AdjustWebGridWidth method is called in response to column layout changes.  It recalculates the width of the grid control in order to accommodate all visible columns.


TcxCustomWebGrid.AssignItems

TcxCustomWebGrid          See Also

Assigns columns of one grid control to another.

procedure AssignItems (ASource: TcxCustomWebGrid);

Description

Use the AssignItems method to assign columns of one grid control to another.  The ASource parameter specifies the source control.  The caller is the destination control

All columns of the destination control are deleted before assignment.


TcxCustomWebGrid.BeginUpdateLayout

TcxCustomWebGrid          See Also

Forces the grid control not to respond to changes until the EndUpdateLayout method is called.

procedure BeginUpdateLayout;

Description

The grid control responds to changes only if the LockCount property value is zero.  Each BeginUpdateLayout method call increments this property by one.  Each EndUpdateLayout method call decrements it.  Thus all the changes performed after the BeginUpdateLayout method call take effect only when the EndUpdateLayout method is called.


TcxCustomWebGrid.CanCreateDefaultColumns

TcxCustomWebGrid          See Also

Indicates whether the grid control can create columns for all the fields of a bound data source.

function CanCreateDefaultColumns: Boolean; virtual;

Description

Checks whether the grid control can create columns based on the information taken from the associated data source.  Default columns are created by the CreateDefaultColumns method.

As implemented in the TcxCustomWebGrid class, the CanCreateDefaultColumns returns False.  It is overridden in the descendant TcxWebDBGrid controls to return a proper value.


TcxCustomWebGrid.ChangeColumnsLayout

TcxCustomWebGrid          See Also

Responds to changes in column layout.

procedure ChangeColumnsLayout(Index: Integer);

Description

The ChangeColumnsLayout method is used to adjust widths of the grid control and its columns when the column layout changes. In general the Index parameter specifies the index of the column that should not be resized.

If the Index parameter equals–1, the entire grid control is being resized and therefore the width of all the columns should be recalculated.


TcxCustomWebGrid.Clear

TcxCustomWebGrid          See Also

Deletes all grid control columns.

procedure Clear;

Description

Use the Clear method to delete all grid control columns.


TcxCustomWebGrid.ColumnByName

TcxCustomWebGrid          See Also

Returns the object representing the column specified by its name.

function ColumnByName(const AName: string): TcxWebColumn; virtual;

Description

Use the ColumnByName method to obtain the object representing the specified column.  The column is specified by its name via the AName parameter.


TcxCustomWebGrid.Create

TcxCustomWebGrid          See Also

Creates an instance of the TcxCustomWebGrid class.

constructor Create(AOwner: TComponent); override;

Description

The Create method is used to create a new instance of the TcxCustomWebGrid class and sets properties to their default values.  The AOwner parameter specifies the owner of the grid (the page module).

Do not create instances of the TcxCustomWebGrid class in applications.  Instantiate the descendant TcxWebDBGrid control instead.


TcxCustomWebGrid.CreateDefaultColumns

TcxCustomWebGrid          See Also

Creates columns corresponding to all fields in an associated data source.

procedure CreateDefaultColumns(ADeleteExsistColumns: Boolean); virtual;

Description

Use the CreateDefaultColumns method to add columns for all fields of the associated dataset.  Added columns are automatically bound to dataset fields.

The ADeleteExsistColumns parameter specifies whether the grid should clear its columns collection before adding columns.  If the ADeleteExsistColumns is set to True, existing columns are deleted; otherwise they are preserved and the newly created columns will be added to the internal list of columns.

You can also use the Add method to add columns to the grid control.  In such an instance, you should bind them to dataset fields manually.

As implemented in the TcxCustomWebGrid class, the CreateDefaultColumns performs nothing.  It is overridden in the descendant TcxWebDBGrid control to perform desired actions.


TcxCustomWebGrid.Delete

TcxCustomWebGrid          See Also

Deletes the specified grid control’s column.

procedure Delete(AIndex: Integer);

Description

Use the Delete method to delete the specified grid control column.  The column is specified by its index via the AIndex parameter.

After the column has been deleted, the method calls the UpdateColumnsLayout method to recalculate widths of the rest columns.


TcxCustomWebGrid.DesignerModified

TcxCustomWebGrid          See Also

Notifies the designer of the implemented changes.

procedure DesignerModified;

Description

The DesignerModified method is used to notify the designer that certain changes occurred to the grid control.


TcxCustomWebGrid.DesignerColumnUpdate

TcxCustomWebGrid          See Also

Notifies the designer of changes to a specific column.

procedure DesignerColumnUpdate(AColumn: TcxWebColumn);

Description

The DesignerColumnUpdate method is called when changes are applied to a column.  The column is specified by the object representing it via the AColumn parameter.


TcxCustomWebGrid.Destroy

TcxCustomWebGrid          See Also

Destroys the TcxCustomWebGrid object.

destructor Destroy; override;

Description

The Destroy method is used to dispose of the TcxCustomWebGrid object and free any allocated memory.


TcxCustomWebGrid.EndUpdateLayout

TcxCustomWebGrid          See Also

Forces the grid control to respond to changes made after the BeginUpdateLayout method call.

procedure EndUpdateLayout;

Description

The grid control responds to changes only if the LockCount property value is zero.  Each BeginUpdateLayout method call increments this property by one.  Each EndUpdateLayout method call decrements it.  Thus all the changes performed after the BeginUpdateLayout method call take effect only when the EndUpdateLayout method is called.


TcxCustomWebGrid.GetAllowExpanding

TcxCustomWebGrid          See Also

Returns the value of the AllowExpanding property.

function GetAllowExpanding: Boolean; virtual;

Description

The GetAllowExpanding method is used to return the value of the AllowExpanding property.  As implemented in the TcxCustomWebGrid class it returns False.

This method is overridden in the descendant TcxWebDBGrid class to return a proper value.


TcxCustomWebGrid.GetAllowGrouping

TcxCustomWebGrid          See Also

Returns the value of the AllowGrouping property.

function GetAllowGrouping: Boolean; virtual;

Description

The GetAllowGrouping method is used to return the value of the AllowGrouping property.  As implemented in the TcxCustomWebGrid class, it returns False.

This method is overridden in the descendant TcxWebDBGrid class to return a proper value.


TcxCustomWebGrid.GetAllowSorting

TcxCustomWebGrid          See Also

Returns the value of the AllowSorting property.

function GetAllowSorting: Boolean; virtual;

Description

The GetAllowSorting method is used to return the value of the AllowSorting property.  As implemented in the TcxCustomWebGrid class, it returns False.

This method is overridden in the descendant TcxWebDBGrid class to return a proper value.


TcxCustomWebGrid.GetColumn

TcxCustomWebGrid          See Also

Returns the value of the Columns property.

function GetColumn(Index: Integer): TcxWebColumn; virtual;

Description

The GetColumn method is used to obtain the object representing the specified column.  The column is specified by its index via the Index parameter.

The descendant TcxWebDBGrid class overrides this method to return a proper value.


TcxCustomWebGrid.GetColumnList

TcxCustomWebGrid          See Also

Returns a list of grid control columns.

procedure GetColumnList(const AList: TList);

Description

Use the GetColumnList method to obtain a list of all grid control columns.  The AList parameter specifies the list to which objects representing columns are added.  Thus you should transmit an empty list to this method to obtain the correct list of grid control columns.


TcxCustomWebGrid.GetFocusedRow

TcxCustomWebGrid          See Also

Returns the value of the FocusedRow property.

function GetFocusedRow: Integer; virtual;

Description

The GetFocusedRow method is used to return the value of the FocusedRow property.  As implemented in the TcxCustomWebGrid class, it returns 0.

This method is overridden in the descendant TcxWebDBGrid class to return a proper value.


TcxCustomWebGrid.GetGroupingItemCount

TcxCustomWebGrid          See Also

Returns the number of group columns.

function GetGroupingItemCount: Integer; virtual;

Description

The GetFocusedRow method is used to return the number of group columns.  As implemented in the TcxCustomWebGrid class it returns 0.

This method is overridden in the descendant TcxWebDBGrid class to return a proper value.


TcxCustomWebGrid.GetGroupingItemIndex

TcxCustomWebGrid          See Also

Returns the index of a column specified by its position within a group fields list.

function GetGroupingItemIndex(Item: Integer): Integer; virtual;

Description

Once the dataset data is grouped based upon the contents of a specific field, a new item within the grouping fields list is created.  This item contains a reference to the grouping field against which dataset values are grouped.  The order of items within the grouping fields list is specified by the grouping level.

The GetGroupingItemIndex method returns the index of a column specified by its position within a grouping fields list.  The Item parameter specifies the index of a column within the grouping fields list.

As implemented in the TcxCustomWebGrid class, the GetGroupingItemIndex method returns -1.  This method is overridden in the descendant TcxWebDBGrid class to return a proper value.


TcxCustomWebGrid.GetItemGroupIndex

TcxCustomWebGrid          See Also

Returns the index of a column within an internal grouping fields list.

function GetItemGroupIndex(AColIndex: Integer): Integer; virtual;

Description

Once the dataset data is grouped based upon the contents of a specific field, a new item within the grouping fields list is created.  This item contains a reference to the grouping field against which dataset values are grouped.  The order of items within a grouping fields list is specified by the grouping level.

The GetItemGroupIndex method returns the index of a column within the grouping columns list.  The column is specified by its index within the grid’s columns collection via the AColIndex parameter.

As implemented in the TcxCustomWebGrid class the GetGroupingItemIndex method returns 0.  This method is overridden in the descendant TcxWebDBGrid class to return a proper value.


TcxCustomWebGrid.GetItemSortOrder

TcxCustomWebGrid          See Also

Returns the sort order of a specified column.

TcxWebGridSortMode = (smNone, smAscending, smDescending);

function GetItemSortOrder(AColIndex: Integer): TcxWebGridSortMode; virtual;

Description

The GetItemSortOrder method returns the sort order of a specified column.  The column is specified by its index via the AColIndex parameter.

As implemented in the TcxCustomWebGrid class, the GetGroupingItemIndex method returns smNone.  This method is overridden in the descendant TcxWebDBGrid class to return a proper value.


TcxCustomWebGrid.GetMaxHeight

TcxCustomWebGrid          See Also

Returns the maximum height of the grid control.

function GetMaxHeight: Integer; override;

Description

The GetMaxHeight method is used to implement the maximum height constraint for the grid control.  It returns the integral height of the grid control taking into consideration the visibility of the group panel, column headers, status bar and the number of displayed nodes.


TcxCustomWebGrid.GetMaxWidth

TcxCustomWebGrid          See Also

Returns the maximum width of the grid control.

function GetMaxWidth: Integer; override;

Description

The GetMaxWidth method is used to implement the maximum width constraint for the grid control.  It returns the integral width of the grid control taking into consideration the visibility of the indicator bar and column layout.


TcxCustomWebGrid.GetMinHeight

TcxCustomWebGrid          See Also

Returns the minimum height of the grid control.

function GetMinHeight: Integer; override;

Description

The GetMinHeight method is used to implement the minimum height constraint for the grid control.  It returns the integral height of the grid control taking into consideration the visibility of the group panel, column headers, status bar and the number of displayed nodes.


TcxCustomWebGrid.GetMinWidth

TcxCustomWebGrid          See Also

Returns the maximum width of the grid control.

function GetMinWidth: Integer; override;

Description

The GetMinWidth method is used to implement the minimum width constraint for the grid control.  It returns the integral width of the grid control taking into consideration the visibility of the indicator bar and column layout.


TcxCustomWebGrid.GetMode

TcxCustomWebGrid          See Also

Returns the Mode property value.

TcxWebGridMode = (mBrowse, mEdit);

function GetMode: TcxWebGridMode; virtual;

Description

The GetMode method is used to return the value of the Mode property.  As implemented in the TcxCustomWebGrid class, it returns mBrowse.

This method is overridden in the descendant TcxWebDBGrid class to return a proper value.


TcxCustomWebGrid.GetRecordCount

TcxCustomWebGrid          See Also

Returns the RecordCount property value.

function GetRecordCount: Integer; virtual;

Description

The GetRecordCount method is used to return the value of the RecordCount property.  As implemented in the TcxCustomWebGrid class, it returns 0.

This method is overridden in the descendant TcxWebDBGrid class to return a proper value.


TcxCustomWebGrid.GetRowCount

TcxCustomWebGrid          See Also

Returns the RowCount property value.

function GetRowCount: Integer; virtual;

Description

The GetRowCount method is used to return the value of the RowCount property.  As implemented in the TcxCustomWebGrid class, it returns 0.

This method is overridden in the descendant TcxWebDBGrid class to return a proper value.


TcxCustomWebGrid.GetRowDisplayText

TcxCustomWebGrid          See Also

Returns the text representation of the specified cell’s content.

function GetRowDisplayText(ARowIndex, AColIndex: Integer): string; virtual;

Description

The GetRowDisplayText method is used to return the text representation of the specified cell’s content.  The cell is specified by its row and column indexes via the ARowIndex and AColIndex parameters respectively.   As implemented in the TcxCustomWebGrid class, it returns an empty string.

This method is overridden in the descendant TcxWebDBGrid class to return a proper value.


TcxCustomWebGrid.GetRowExpanded

TcxCustomWebGrid          See Also

Returns a value indicating whether the specified row is expanded.

function GetRowExpanded(RowIndex: Integer): Boolean; virtual;

Description

The GetRowExpanded method is used to determine whether the specified row is expanded.  The row is specified by its index via the RowIndex parameter.  As implemented in the TcxCustomWebGrid class it returns False.

This method is overridden in the descendant TcxWebDBGrid class to return a proper value.


TcxCustomWebGrid.GetRowLevel

TcxCustomWebGrid          See Also

Returns the grouping level of the specified row.

function GetRowLevel(RowIndex: Integer): Integer; virtual;

Description

The GetRowLevel method is used to determine grouping level of the specified row.  The row is specified by its index via the RowIndex parameter.  As implemented in the TcxCustomWebGrid class, it returns 0.

This method is overridden in the descendant TcxWebDBGrid class to return a proper value.


TcxCustomWebGrid.GetRowRecord

TcxCustomWebGrid        See Also

Returns the dataset index of the row specified by its index within the grid control.

function GetRowRecord(RowIndex: Integer): Integer; virtual;

Description

The GetRowRecord method is used to determine the record index corresponding to the specified row.  The row is specified by its index within the grid control via the RowIndex parameter.  As implemented in the TcxCustomWebGrid class it returns 0.

This method is overridden in the descendant TcxWebDBGrid class to return a proper value.


TcxCustomWebGrid.GetRowValue

TcxCustomWebGrid          See Also

Returns the value of the specified cell.

function GetRowValue(ARowIndex, AColIndex: Integer): Variant; virtual;

Description

The GetRowValue method is used to obtain the value of the specified grid cell.  The cell is specified by its row and column indexes via the ARowIndex and ACoIndex parameters respectively.  As implemented in the TcxCustomWebGrid class, it returns varNull.

This method is overridden in the descendant TcxWebDBGrid class to return a proper value.


TcxCustomWebGrid.GetShownGroupPanelHeight

TcxCustomWebGrid          See Also

Returns the height of the area occupied by the group panel.

function GetShownGroupPanelHeight: Integer; virtual;

Description

The GetShownGroupPanelHeight method is used to determine the height of the area occupied by the grid control’s group panel.  The return value of this method depends on the visibility of the group panel.  If it is visible, the GetShownGroupPanelHeight method returns the GroupPanelHeight property value.  Otherwise it returns 0.

The visibility of the grid’s group panel is specified by the ShowGroupPanel property.


TcxCustomWebGrid.GetShownHeaderHeight

TcxCustomWebGrid          See Also

Returns the height of the area occupied by column headers.

function GetShownHeaderHeight: Integer; virtual;

Description

The GetShownHeaderHeight method is used to determine the height of the area occupied by the grid control’s column headers.  The return value for this method depends upon the visibility of column headers.  If they are visible, the GetShownHeaderHeight method returns the HeaderHeight property value.  Otherwise it returns 0.

The visibility of the grid’s column headers is specified by the ShowHeader property.


TcxCustomWebGrid.GetShownIndicatorWidth

TcxCustomWebGrid          See Also

Returns the width of the area occupied by the indicator bar.

function GetShownIndicatorWidth: Integer; virtual;

Description

The GetShownIndicatorWidth method is used to determine the width of the area occupied by the grid control’s indicator bar.  The return value for this method depends upon the visibility of the indicator bar.  If it is visible, the GetShownIndicatorWidth method returns the IndicatorWidth property value.  Otherwise it returns 0.

The visibility of the grid’s indicator bar is specified by the ShowIndicator property.


TcxCustomWebGrid.GetShownStatusPanelHeight

TcxCustomWebGrid          See Also

Returns the height of the area occupied by the status panel.

function GetShownStatusPanelHeight: Integer; virtual;

Description

The GetShownStatusPanelHeight method is used to determine the height of the area occupied by the grid control’s status panel.  The return value for this method depends upon the visibility of the status panel.  If it is visible, the GetShownStatusPanelHeight method returns the StatusPanelHeight property value.  Otherwise it returns 0.

The visibility of the grid’s column headers is specified by the ShowStatusPanel property.


TcxCustomWebGrid.GetSortingItemCount

TcxCustomWebGrid          See Also

Returns the number of columns against whose values grid control data is sorted.

function GetSortingItemCount: Integer; virtual;

Description

Use the GetSortingItemCount function to determine the number of columns whose values are used to sort data within the grid control.  As implemented in the TcxCustomWebGrid class it returns 0.

This method is overridden in the descendant TcxWebDBGrid class to return a proper value.


TcxCustomWebGrid.GetSortingItemIndex

TcxCustomWebGrid          See Also

Returns index of the column - specified by its index - within the sorted columns list.

function GetSortingItemIndex(Item: Integer): Integer; virtual;

Description

Use the GetSortingItemIndex method to obtain the index of the column - specified by its index - within the sorted columns list.  The index within the sorted columns list is specified by the Item parameter.  As implemented in the TcxCustomWebGrid class, it returns -1.

This method is overridden in the descendant TcxWebDBGrid class to return a proper value.


TcxCustomWebGrid.IndexOf

TcxCustomWebGrid          See Also

Returns the index of the specified grid control’s column.

function IndexOf(AItem: TcxWebColumn): Integer;

Description

Use the IndexOf method to obtain the index of the specified column within the grid control’s columns collection.  The column is specified by the object representing it via the AItem parameter.

Indexed access to a column is provided by the Columns property.  The total number of grid control columns can be obtained via the ColumnCount property.


TcxCustomWebGrid.DoSetValues

TcxCustomWebGrid          See Also

Updates the data-aware grid control with respect to changes made by an end user.

procedure InternalSetValue; override;

Description

The request contains information indicating the scroll position of the grid control, its column arrangement and mode.  This information is used to update the grid control with respect to changes made on the client browser.  This is performed by the DoSetValues method.

This method implements the IcxWebValues interface’s DoSetValues method.


TcxCustomWebGrid.NeedCorrectHeight

TcxCustomWebGrid          See Also

Returns a value indicating whether the height of the grid control should be adjusted to accommodate an integer number of rows.

function NeedCorrectHeight: Boolean; virtual;

Description

The return value of the NeedCorrectHeight method indicates whether the grid control’s height should be adjusted.

The function calculates height needed to display the number of rows without any unused extra space and divides it by the height of a single row.  If the result of the calculations is not 0, the function returns True, which means that there either exists unused space or extra space is needed to display all the rows.

The function returns False if rows perfectly fit within the provided space.


TcxCustomWebGrid.RefreshHeight

TcxCustomWebGrid          See Also

Recalculates the grid control’s height.

procedure RefreshHeight; virtual;

Description

The RefreshHeight method is used to respond to notifications that the grid control’s height should be adjusted.  It recalculates the height of the grid control taking into consideration its grouping panel, column headers, status panel height and the number of rows displayed.


TcxCustomWebGrid.RefreshPageSize

TcxCustomWebGrid          See Also

Recalculates size of the grid control’s page.

procedure RefreshPageSize; virtual;

Description

The RefreshPageSize method is used to respond to notifications that the page size of the grid control should be adjusted.  The page size determines the numbers of rows displayed by the grid control simultaneously.

This method is called, for instance, when the height of the grid control changes.  It recalculates the PageSize property value.  If the grid control needs to adjust its height, (the NeedCorrectHeight method returns True) the RefreshHeight method is called.


TcxCustomWebGrid.RegisterRenderers

TcxCustomWebGrid          See Also

Registers renderer classes that generate HTML code representing the data-aware grid control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers two classes used to render the HTML code for the data-aware grid control.  These classes render HTML code representing the control in Internet Explorer, Netscape Navigator 4.0 and Netscape Navigator 6.0.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for a grid control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxCustomWebGrid.RegisterValues

TcxCustomWebGrid          See Also

Registers the HTML elements that contain component related data.

procedure RegisterValues; override;

Description

The RegisterValues method registers HTML elements that contains information indicating the scroll position of the grid control, its columns arrangement and mode.  This information is used to update the grid control with respect to changes made at the client browser.  This is performed by the DoSetValues method.


TcxCustomWebGrid.ScriptsSubscription

TcxCustomWebGrid          See Also

Subscribes the data-aware grid control to client side scripts required for proper functionality.

procedure ScriptsSubscription; override;

Description

Subscribes the grid control to the script required for hover style implementation.  The subscription takes place only if the hover style is applied to one of the control’s constituent parts.


TcxCustomWebGrid.SetBounds

TcxCustomWebGrid          See Also

Sets the bounding rectangle of a control, expressed in the coordinate system of the parent control.

procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;

Description

Adjusts the size of the grid control in response to the assignment of new dimensions.  The width of the control is recalculated with respect to the current column layout.  The height of the grid is adjusted with respect to the grid control’s page size.


TcxCustomWebGrid.SetColumn

TcxCustomWebGrid          See Also

Sets the value of the Columns property.

procedure SetColumn(Index: Integer; Value: TcxWebColumn); virtual;

Description

The SetColumn method is used to assign the specified value to the Columns property.  The Index parameter specifies the index of the column, to which the specified value should be assigned.  The assigned value is specified by the Value parameter.

The descendant TcxWebDBGrid class overrides the SetColumn method in order to assign proper object types.


TcxCustomWebGrid.StyleChanged

TcxCustomWebGrid          See Also

Performs specific operations in response to style changes.

procedure StyleChanged(Style: TcxWebStyleItem); override;

Description

The StyleChanged method is used to respond to changes in styles applied to the grid control.


TcxCustomWebGrid.UniqueColumnName

TcxCustomWebGrid          See Also

Returns a unique name for a specific web column.

function UniqueColumnName(Column: TcxWebColumn): string;

Description

The UniqueColumnName method is used by the Add method of the TcxCustomWebGrid class to generate a unique name for the inserted column.

The generated name consists of the grid control’s name, the word ‘Column’, and a unique number.


TcxCustomWebGrid.UpdateColumnsLayout

TcxCustomWebGrid          See Also

Adjusts layout of the grid control’s columns.

procedure UpdateColumnsLayout;

Description

The UpdateColumnsLayout is used to adjust column layout by calling either the AdjustWebGridWidth or the ChangeColumnsLayout method, which depends on whether the AutoWidth property of the TcxCustomWebGrid control is set to True.

This method responds to changes in column layout of the grid control.


TcxWebGridImageIndexes
TcxWebGridImageIndexes Object

Hierarchy          Properties          Methods          See Also

Specifies custom images displayed within the grid control.

Unit

cxWebGrids

TcxWebGridImageIndexes = class(TPersistent)

Description

The TcxWebGridImageIndexes class serves as the grid control’s ImageIndexes property type.  It provides a means to display custom images within the grid control.  Properties of this class correspond to images displayed within the grid control.  The Images property of the grid control contains a list of custom images.  Set the properties of the TcxWebGridImageIndexes object to indexes of custom images to display them in corresponding positions.


TcxWebGridImageIndexes Hierarchy
Hierarchy

TPersistent


Properties for TcxWebGridImageIndexes
TcxWebGridImageIndexes Properties

TcxWebGridImageIndexes          Legend

In TcxWebGridImageIndexes

Cancel

Collapse

Cursor

Delete

Expand

Insert

Node

Post


Methods for TcxWebGridImageIndexes
TcxWebGridImageIndexes Methods

TcxWebGridImageIndexes          Legend

In TcxWebGridImageIndexes

Create


TcxWebGridImageIndexes.Cancel

TcxWebGridImageIndexes          See Also

Specifies the image displayed within buttons which cancel applied data changes.

property Cancel: Integer;

Description

Use the Cancel property to specify the image displayed within buttons that cancel applied data changes.  These buttons are displayed within the indicator bar when the grid control is in edit mode.

The image is specified by its index within the source list.  Image source is specified by the grid control’s Images property.  If the Cancel property is –1, a default image is displayed.

The default value of the Cancel property is -1.


TcxWebGridImageIndexes.Collapse

TcxWebGridImageIndexes          See Also

Specifies the image displayed within buttons used to collapse grouped rows.

property Collapse: Integer;

Description

Use the Collapse property to specify the image displayed within buttons that collapse grouped rows.  These buttons are displayed to the left of expanded grouped rows.

The image is specified by its index within the source list.  Image source is specified by the grid control’s Images property.  If the Collapse property is –1, a default image is displayed.

The default value of the Collapse property is -1.


TcxWebGridImageIndexes.Cursor

TcxWebGridImageIndexes          See Also

Specifies the image identifying the focused row.

property Cursor: Integer;

Description

Use the Cursor property to specify the image displayed within the indicator bar for the focused node.  The grid control’s IndicatorType property should be set to itCursor.

The image is specified by its index within the source list.  Image source is specified by the grid control’s Images property.  If the Cursor property is –1, a default image is displayed.

The default value of the Cursor property is -1.


TcxWebGridImageIndexes.Delete

TcxWebGridImageIndexes          See Also

Specifies the image displayed within buttons that are used to delete nodes.

property Delete: Integer;

Description

Use the Delete property to specify the image displayed within buttons that are used to delete nodes.  These buttons are displayed within the indicator bar when the grid control is in browsing mode.  The grid control’s IndicatorType property should be set to itDataOp.

The image is specified by its index within the source list.  Image source is specified by the grid control’s Images property.  If the Delete property is –1, a default image is displayed.

The default value of the Delete property is -1.


TcxWebGridImageIndexes.Expand

TcxWebGridImageIndexes          See Also

Specifies the image displayed within buttons used to expand grouped rows.

property Expand: Integer;

Description

Use the Expand property to specify the image displayed within buttons that expand grouped rows.  These buttons are displayed to the left of collapsed grouped rows.

The image is specified by its index within the source list.  Image source is specified by the grid control’s Images property.  If the Expand property is –1, a default image is displayed.

The default value of the Expand property is -1.


TcxWebGridImageIndexes.Insert

TcxWebGridImageIndexes          See Also

Specifies the image displayed within buttons that are used to insert nodes.

property Insert: Integer;

Description

Use the Insert property to specify the image displayed within buttons that are used to insert nodes.  These buttons are displayed within the indicator bar when the grid control is in browse mode.  The grid control’s IndicatorType property should be set to itDataOp.

The image is specified by its index within the source list.  Image source is specified by the grid control’s Images property.  If the Insert property is –1, a default image is displayed.

The default value of the Insert property is -1.


TcxWebGridImageIndexes.Node

TcxWebGridImageIndexes          See Also

Specifies the image identifying unfocused rows.

property Node: Integer;

Description

Use the Node property to specify the image displayed within the indicator bar for unfocused nodes.  The grid control’s IndicatorType property should be set to itCursor.

The image is specified by its index within the source list.  Image source is specified by the grid control’s Images property.  If the Node property is –1, a default image is displayed.

The default value of the Node property is -1.


TcxWebGridImageIndexes.Post

TcxWebGridImageIndexes          See Also

Specifies the image displayed within buttons that post applied data changes.

property Post: Integer;

Description

Use the Post property to specify the image displayed within buttons that post applied data changes.  These buttons are displayed within the indicator bar when the grid control is in edit mode.

The image is specified by its index within the source list.  Image source is specified by the grid control’s Images property.  If the Post property is –1, a default image is displayed.

The default value of the Post property is -1.


TcxWebGridImageIndexes.Create

TcxWebGridImageIndexes

Creates an instance of the TcxWebGridImageIndexes class.

constructor Create; virtual;

Description

The Create method is used to instantiate the TcxWebGridImageIndexes class.  It sets all properties to their default values.

Do not create instances of the TcxWebGridImageIndexes class in applications.  It is instantiated automatically to initialize the ImageIndexes property of the TcxWebDBGrid control.


TcxCustomWebDataSource
TcxCustomWebDataSource Object

Hierarchy          Properties          Methods          Events          See Also

Represents the base class for data source components that provide an interface between a dataset component and data-aware web controls on a web page.

Unit

cxWebData

TcxCustomWebDataSource = class(TcxWebComponent, IcxCodeProvider, IcxWebActions, IcxWebValues)

Description

The TcxCustomWebDataSource class represents a base class from which all the components providing a link between data controls and a dataset are derived.  The TcxCustomWebDataSource class is the common ancestor for the TcxStdWebDataSource, TcxExtWebDataSource, TcxWebDataSource, and TcxWebDBDataSource classes.

The TcxCustomWebDataSource class supports the IcxCodeProvider, IcxWebActions, and IcxWebValues interfaces.  Thus it is designed to provide the functionality of HTML and Java script code rendering, handling specific server-side events, and manipulating values of a web data source component.

Use the TcxCustomWebDataSource descendants to provide a conduit between a dataset and data-aware controls on a web page that enable display, navigation, and editing of the data underlying the dataset.

All datasets must be associated with a data source component if their data is to be displayed and manipulated in data-aware controls.  Similarly, each data-aware control needs to be associated with a data source component in order for the control to receive and manipulate data.


TcxCustomWebDataSource Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent


Properties for TcxCustomWebDataSource
TcxCustomWebDataSource Properties

TcxCustomWebDataSource          Legend

In TcxCustomWebDataSource

ActionName

AllowEditing

AllowExpanding

AllowGrouping

AllowSorting

ClientCount

Clients

DisplayTexts

Fields

FocusedRowIndex

FullName

KeyFieldName

LoadAllRecords

RecordCount

RowCount

Values

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxCustomWebDataSource
TcxCustomWebDataSource Methods

TcxCustomWebDataSource          Legend

In TcxCustomWebDataSource

CancelEdit

CanEdit

CanSetValues

ChangedData

ClearGrouping

ClearSorting

Create

DataNotification

DefineProperties

DeleteRecord

Destroy

DoSetValues

EditRecord

Expand

FieldByName

FullCollapse

FullExpand

GetAllowEditing

GetAllowExpanding

GetAllowGrouping

GetAllowSorting

GetDisplayText

GetFields

GetFocusedRowIndex

GetGroupingItemCount

GetGroupingItemIndex

GetItemGroupIndex

GetItemHelperClass

GetItemSortOrder

GetRecordCount

GetRowCount

GetRowDisplayText

GetRowExpanded

GetRowLevel

GetRowRecord

GetRowValue

GetSortingItemCount

GetSortingItemIndex

GetValue

GetWebActionsHelper

GetWebRenderHelper

GetWebValuesHelper

Group

InsertRecord

Loaded

NeedUpdateFields

PostEdit

ReadActionName

ReadFocusedRowIndex

Refresh

RegisterActions

RegisterClient

RegisterRenderers

RegisterValues

SetEditValue

SetFields

SetFocusedRowIndex

SetRecordCount

SetValue

Sort

UnGroup

UnRegisterClient

UpdateDataLayout

UpdateDefaultFields

UpdateValue

WebCancelEdit

WebDelete

WebInsert

WebMoveBy

WebMoveTo

WebPostEdit

WebRefresh

WebStartEdit

WriteActionName

WriteFocusedRowIndex

Derived from TcxWebComponent

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterActions

RegisterEvents

RegisterRenderers

RegisterValues

ScriptsSubscription

SetState

StyleChanged

ValidateContainer


Events for TcxCustomWebDataSource
TcxCustomWebDataSource Events

TcxCustomWebDataSource          Legend

In TcxCustomWebDataSource

OnAfterPost

OnBeforePost

OnCancelEdit

OnDeleted

OnDeleting

OnInserted

OnInserting

OnScrolled

OnScrolling

OnSetEditValue

OnSetInsertValue

OnStartEdit

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxCustomWebDataSource.ActionName

TcxCustomWebDataSource          See Also

Specifies the action name applied to an associated dataset.

property ActionName: string;

Description

The ActionName property is used to specify the name of the last action applied to the associated dataset by the server/client side of an application in response to client side manipulations.  The value of the ActionName property (along with the value of the FocusedRowIndex property) is registered by corresponding values of the helper object (type  TcxWebValuesHelper).  This means that resulting HTML code representing the main form will contain a hidden input which will store the ActionName property value.

The ActionName property is initialized by the Create method and receives the value of the scxUndefinedAction constant equal to ‘UNDEFINED’.


TcxCustomWebDataSource.AllowEditing

TcxCustomWebDataSource          See Also

Specifies whether the associated dataset can be edited by a user (or application).

property AllowEditing: Boolean;

Description

Use the AllowEditing property to control a user’s (or application) ability to edit a dataset associated with the data source.

If the AllowEditing property is True, a user (or application) is allowed to edit the underlying dataset by modifying the data displayed by data aware controls. If the AllowEditing property is False, all changes made by a user (or application) will not be written to the associated dataset.


TcxCustomWebDataSource.AllowExpanding

TcxCustomWebDataSource          See Also

Specifies whether grouped nodes of associated data-aware web control can be expanded/collapsed.

property AllowExpanding: Boolean;

Description

The AllowExpanding property is designed to specify whether grouped nodes (if any) of the data aware web control that access the dataset via the data source component can be expanded/collapsed.

The TcxCustomWebDataSource class declares the AllowExpanding property as a read only public property which contains a value of False.  The derived TcxExtWebDataSource class redeclares it in a published section and adds a ‘write’ specifier for it.

ReadOnly Property


TcxCustomWebDataSource.AllowGrouping

TcxCustomWebDataSource          See Also

Specifies whether records of the associated dataset can be grouped.

property AllowGrouping: Boolean;

Description

The AllowGrouping property is designed to specify whether records of the associated dataset can be grouped by data aware web controls that access the dataset via the data source component.

The TcxCustomWebDataSource class declares the AllowGrouping property as a read only public property that contains a value of False.  The derived TcxExtWebDataSource class redeclares it in a published section and adds a ‘write’ specifier for it.

ReadOnly Property


TcxCustomWebDataSource.AllowSorting

TcxCustomWebDataSource          See Also

Specifies whether records of the associated dataset can be sorted.

property AllowSorting: Boolean;

Description

The AllowSorting property is designed to indicate whether records of the associated dataset can be sorted by data aware web controls that access the dataset via the data source component.

The TcxCustomWebDataSource class declares the AllowSorting property as a read only public property which contains a value of False.  The derived TcxExtWebDataSource class redeclares it in a published section and adds a ‘write’ specifier for it.

ReadOnly Property


TcxCustomWebDataSource.ClientCount

TcxCustomWebDataSource          See Also

Returns the number of components that make use of the data source component.

property ClientCount: Integer;

Description

The ClientCount property is used to determine the number of components which refer to a given data source component.  All controls referred to by data source component have access to the same dataset and thus able to display and manipulate the same data.

Use the Clients property if you want to gain access to a specific component referring the data source.

ReadOnly Property


TcxCustomWebDataSource.Clients

TcxCustomWebDataSource          See Also

Lists the components that make use of the data source component.

property Clients[Index:Integer]: TComponent;

Description

The Clients property is used to gain access to a specific component that refers to a given data source component.  The Index parameter specifies the position of a specific component in the list of components referred to by the data source.  The number of components in the list can be determined via the ClientCount property.  Components are zero-based indexed within the collection.  Thus the ClientCount property value is always one greater than the index of the last component.

The Clients property keeps a list of all components that use the data source as a conduit to access a dataset.  So these components have access to the same dataset.

ReadOnly Property


TcxCustomWebDataSource.DisplayTexts

TcxCustomWebDataSource          See Also

Represents a field’s value as it should be displayed in data aware web controls.

property DisplayTexts[RecordIndex,ItemIndex:Integer]: string;

Description

The DisplayTexts property represents an array property designed to contain the string representation of a specific field’s value for display in data aware web controls.  The DisplayTexts property is used to obtain the value of a specific field in a specific record.

The RecordIndex parameter specifies the index of a dataset record.  This record contains a specific field whose value is obtained. The ItemIndex parameter represents the index of a field in the dataset record specified by the RecordIndex parameter.

As implemented in the TcxCustomWebDataSource class, the value of the DisplayTexts property is always equal to an empty string.  Descendant classes override this property in order to return proper values.

ReadOnly Property


TcxCustomWebDataSource.Fields

TcxCustomWebDataSource          See Also

Represents a collection of fields that correspond to the fields of the associated dataset.

property Fields: TCollection;

Description

A data source component implements the Fields property to provide access to its own field collection.  This collection contains items corresponding to the fields of the associated dataset.  If a dataset component uses default fields, the order of fields in the Fields property corresponds directly to the order of fields in the table (or tables) underlying a dataset.  If a dataset uses persistent fields, the order of field components in the Fields collection corresponds to the ordering of fields specified in the Fields Editor of a dataset component at design time.  So the Fields property is used to gain access to a specific object, which is designed to represent a collection of fields in the dataset associated with the data source component.

The TcxCustomWebDataSource class declares the Fields property as a public property of the TCollection type.  Descendant classes override the Fields property to return a proper value type.  These types are the TcxStdWebDataFields, TcxWebDataControllerFields and TcxWebDBDataControllerFields for the TcxStdWebDataSource, TcxWebDataSource and TcxWebDBDataSource components respectively.


TcxCustomWebDataSource.FocusedRowIndex

TcxCustomWebDataSource          See Also

Specifies the focused row index.

property FocusedRowIndex: Integer;

Description

The FocusedRowIndex property is designed to specify the index of the active record within the associated dataset.  The value of the FocusedRowIndex property (along with the value of the ActionName property) is registered by corresponding helper object values (TcxWebValuesHelper type).  This means that the resulting HTML code representing the main form will contain a hidden input that will store the FocusedRowIndex property value.

As implemented in the TcxCustomWebDataSource class, the value of the FocusedRowIndex property is always -1.  Descendant classes override this property in order to return a proper value.


TcxCustomWebDataSource.FullName

TcxCustomWebDataSource

Contains the full name of the data source component including its owning module name.

property FullName: string;

Description

The FullName property represents the data source component name, which is constructed of two parts.  The first is the name of the data source owner (the name of a web component/control which make use of the data source component).  The second is the individual data source name specified by its Name property.

The FullName property is used to differentiate data sources owned by different components/controls by their names.

ReadOnly Property


TcxCustomWebDataSource.KeyFieldName

TcxCustomWebDataSource

Specifies the name of the key field.

property KeyFieldName: string;

Description

Use the KeyFieldName property to set the name of a dataset field containing unique values.  Data source components require unique values of a specific field in order to identify records.

Make certain to set the KeyFieldName property to avoid data operation errors.  In particular, if the chosen field doesn’t contain unique values, you may find problems in synchronizing data.


TcxCustomWebDataSource.LoadAllRecords

TcxCustomWebDataSource

Specifies whether all dataset record values should be sent to the client.

property LoadAllRecords: Boolean;

Description

Use the LoadAllRecords property to specify whether all records of the underlying dataset associated with the data source component should be sent to the client.

Setting the LoadAllRecords property to True forces the data source renderer to render values of all dataset records when generating the HTML code representing the data source component within the web page.  In this mode, all data is sent to the client via the response.  This allows the control to perform grouping and/or sorting at the client side without sending a request message.


TcxCustomWebDataSource.RecordCount

TcxCustomWebDataSource          See Also

Indicates the total number of records within the associated dataset.

property RecordCount: Integer;

Description

The RecordCount property is designed to return the total number of associated dataset records.

As implemented in the TcxCustomWebDataSource class, the value of the RecordCount property is always 0.  Descendant classes override this property in order to return a proper value.

ReadOnly Property


TcxCustomWebDataSource.RowCount

TcxCustomWebDataSource          See Also

Returns the number of rows (including grouped rows) with respect to the current dataset state.

property RowCount: Integer;

Description

The RowCount property is designed to return the total number of rows (including grouped rows) that represent the associated dataset in its current state.  This property value should equal the RecordCount property value when the associated dataset is ungrouped.

As implemented in the TcxCustomWebDataSource class, the value of the RowCount property is always 0.  Descendant classes override this property in order to return a proper value.

ReadOnly Property


TcxCustomWebDataSource.Values

TcxCustomWebDataSource          See Also

Provides access to the value of a specific field in a specific record of the associated dataset.

property Values[RecordIndex,ItemIndex:Integer]: Variant;

Description

The Values property is designed to specify the value for a specific field in the dataset associated with the data source component.  The RecordIndex parameter is the index of a record that contains a field to read from or write to.  The ItemIndex parameter is the index of a field to read from or write to.

The Values property accepts and returns a Variant, so it can handle and convert any field type.

As implemented in the TcxCustomWebDataSource class, the value of the Values property is always varEmpty (the variant is Unassigned).  Descendant classes override this property in order to return proper values.


TcxCustomWebDataSource.WebActionsHelper

TcxCustomWebDataSource          See Also

Returns an object implementing the functionality of the data source component during server side event handling.

property WebActionsHelper: TcxWebActionsHelper;

Description

The TcxCustomWebDataSource class delegates server side event handling to the TcxWebActionsHelper object.  This object is retrieved via the WebActionsHelper property, which implements the IcxWebActions interface.

The TcxWebActionsHelper object manages registration and execution of event handlers.  In order to register event handlers for a component, you should override the RegisterActions method of the TcxCustomWebDataSource class.  This method should call the RegisterAction method of the TcxWebActionsHelper object (WebActionsHelper property) for each event, which can be handled by your data source component.  The name of the event and the corresponding handler are transmitted to this method as parameters.  We recommended that you register an event with an empty string name.  This allows EWF to avoid errors when the request contains an empty __ACTIONNAME hidden input value and non-empty __TARGETNAME.

ReadOnly Property


TcxCustomWebDataSource.WebRenderHelper

TcxCustomWebDataSource          See Also

Returns an object implementing the functionality for HTML code rendering.

property WebRenderHelper: TcxWebRenderHelper;

Description

The TcxCustomWebDataSource class delegates its HTML rendering functionality to the TcxWebRenderHelper object.  This object is retrieved via the WebRenderHelper property, which implements the IcxCodeProvider interface.

Each component can be rendered in a number of ways depending upon client browser type.  In order to implement this, each component has a number of renderer classes each used to render the code for a particular browser.  These classes are registered within the RegisterRenderers method of the TcxCustomWebDataSource class.  Descendant data source classes override this method to register renderer classes as their needs dictate.  This method should call the RegisterRenderer method of the TcxWebRenderHelper class for each renderer class.

The TcxWebRenderHelper class contains a number of methods, which render specific component code for a component.  Each of these methods is implemented similarly.  First, the renderer class, corresponding to the specified browser type, is instantiated.  Then the corresponding method of the renderer class is called in order to render the desired code.

ReadOnly Property


TcxCustomWebDataSource.WebValuesHelper

TcxCustomWebDataSource          See Also

Returns an object implementing the functionality of the component regarding value maintenance.

property WebValuesHelper: TcxWebValuesHelper;

Description

The TcxCustomWebDataSource class delegates this functionality to the TcxWebValuesHelper object.  This object is retrieved via the WebValuesHelper property, which implements the IcxWebValues interface.

Since application users can modify the values displayed within EWF components, EWF technology implements a technique to update the values of a component’s properties so as not to lose those values changes.  Each data source component overrides the RegisterValues method of the TcxCustomWebDataSource class.  This method should call the RegisterValue method of the TcxWebValuesHelper class (WebValuesHelper property) for each HTML element comprising the component, whose values must be maintained.  Once the request arrives to the server script, the registered values are retrieved from it and the component’s properties are adjusted.

ReadOnly Property


TcxCustomWebDataSource.CancelEdit

TcxCustomWebDataSource          See Also

Cancels record editing for the associated dataset.

procedure CancelEdit; virtual;

Description

The CancelEdit method is designed to end the editing of an associated dataset record, discarding any changes made by a user at the client side.

As implemented in the TcxCustomWebDataSource class, the CancelEdit method performs nothing.  Applications do not call the CancelEdit method of the TcxCustomWebDataSource class.  Instead, an overridden CancelEdit method of descendant classes is called.  Descendant classes (such as the TcxStdWebDataSource, or TcxExtWebDataSource, or TcxWebDBDataSource class) override the CancelEdit method to perform specific operations when a user cancels changes made to a dataset record.

Basically, the CancelEdit method should set the ActionName property to ‘CANCELEDIT’, specified by the scxCancelEditAction constant and then invoke the OnCancelEdit event (if its handler is assigned).


TcxCustomWebDataSource.CanEdit

TcxCustomWebDataSource          See Also

Returns a value that indicates whether the associated dataset can be edited.

function CanEdit: Boolean; virtual;

Description

The CanEdit method is used to control the ability of a user (or application) to edit data provided by the data source component.

As implemented in the TcxCustomWebDataSource class, the CanEdit method simply returns the value of the AllowEditing property.  Descendant classes (such as the TcxStdWebDataSource and TcxWebDBDataSource classes) override this method to perform additional checks - whether a dataset component is assigned for their DataSet property and whether this dataset can be modified.


TcxCustomWebDataSource.CanSetValues

TcxCustomWebDataSource          See Also

Returns a value determining whether the data source component’s properties can be updated with the values received from the client.

function CanSetValues: Boolean; virtual;

Description

This method implements the CanSetValues method of the IcxWebValues interface.  It is used to determine whether the changes performed by a user can be (or should be) applied to the component.  For instance, if the CanSetValues method of a component returns False, the values of the component’s properties aren’t updated.  This method is used to avoid data changes when a component does not need to save changes for specific reasons or to avoid extra processing if a user cannot change data.

The CanSetValues method of the TcxCustomWebDataSource class simply returns True.  Thus, you may not override it in descendant classes (if you design you own data source component), since the values will be updated in all instances.  On the other hand, you should override this method if you want to set updated values only when certain conditions are met.


TcxCustomWebDataSource.ChangedData

TcxCustomWebDataSource          See Also

Modifies the record data for the associated dataset.

procedure ChangedData(AClientName: string); virtual;

Description

Since the data source component provides a link between data controls and their dataset, it mediates all of the communication that occurs between the two.  The ChangedData method posts changes made by data controls that make use of the data source component to the associated dataset.

In order to use the data source component as a link to a dataset (and then view, edit, and modify the underlying dataset data) each data aware web control should support the IcxWebDataSourceSupport interface.  Data aware web controls delegate implementation of the IcxWebDataSourceSupport interface to their DataBinding property which in most cases is of type TcxWebDataBinding (except for the TcxWebDBGrid control whose DataBinding property is of type TcxWebGridDataBinding and the TcxWebDBDataNavigator control whose DataBinding property is of type TcxWebDataNavigatorBinding).

Thus, the ChangedData method sequentially calls the UpdateData method of an IcxWebDataSourceSupport interface supported by a data control for each member of the Clients list for the data source component.  The UpdateData method ordinarily results in calling the UpdateValue method of the data source component that writes changed data into a record of the corresponding dataset.

The ChangedData method implementation has the following feature.  If there is prior data control on the form, its values will be used to modify the record of the corresponding dataset regardless of values from other data controls associated with the same data source component.  A prior data control (TcxWebDBGrid for instance) is a control that can post its values to a dataset on its own independently of the TcxWebDBDataNavigator control.  The name of this data control is specified via the AClientName parameter.


TcxCustomWebDataSource.ClearGrouping

TcxCustomWebDataSource          See Also

Cancels grouping applied to the dataset data.

procedure ClearGrouping; virtual;

Description

The ClearGrouping method is designed to clear grouping of records from the underlying dataset.

As implemented in the TcxCustomWebDataSource class, the ClearGrouping method does nothing.  Descendant classes (such as the TcxExtWebDataSource class, or your custom designed data source class/component, if any) can override the ClearGrouping method to remove dataset grouping in their own manner.


TcxCustomWebDataSource.ClearSorting

TcxCustomWebDataSource          See Also

Cancels sorting applied to the dataset data.

procedure ClearSorting; virtual;

Description

The ClearSorting method is designed to clear sorting of records from the underlying dataset.

As implemented in the TcxCustomWebDataSource class, the ClearSorting method does nothing.  Descendant classes (such as the TcxExtWebDataSource class, or your custom designed data source class/component, if any) can override the ClearSorting method to remove dataset sorting in their own manner.


TcxCustomWebDataSource.Create

TcxCustomWebDataSource          See Also

Creates a new instance of the TcxCustomWebDataSource class.

constructor Create(AOwner: TComponent); override;

Description

The Create method is used to create and initialize a new instance of the TcxCustomWebDataSource class.  After calling the inherited constructor, the Create method initializes the ActionName and AllowEditing properties and registers specific server side event handlers and renderers for the data source component by calling the RegisterActions and RegisterRenderers methods.

Do not create instances of the TcxCustomWebDataSource class.  Instead, use a descendant of the TcxCustomWebDataSource class such as TcxStdWebDataSource, TcxWebDataSource, or TcxWebDBDataSource class.


TcxCustomWebDataSource.DataNotification

TcxCustomWebDataSource          See Also

Responds to notifications that the dataset has changed.

type

  TcxUpdateType = (utLayout, utData);

procedure DataNotification(AUpdateType: TcxUpdateType); virtual;

Description

The DataNotification method is designed to perform specific actions in response to changes in the associated dataset.

The AUpdateType parameter specifies the manner in which the dataset is changed.  The following values are available for the AUpdateType parameter.

Value	Description
utLayout	The layout of dataset fields has changed (for instance, the dataset’s Active or Fields property has changed).
utData	Field data has changed (for instance, the focused row has changed, a specific record is created/deleted).

As implemented in the TcxCustomWebDataSource class, the DataNotification method performs nothing.  Descendant classes (such as the TcxStdWebDataSource, TcxExtWebDataSource, or TcxWebDBDataSource class) override the DataNotification method to perform specific operations in response to changes in the corresponding dataset.


TcxCustomWebDataSource.DefineProperties

TcxCustomWebDataSource          See Also

Provides methods to read and write the ActionName and FocusedRowIndex properties to a stream.

procedure DefineProperties(Filer: TFiler); override;

Description

The DefineProperties method uses the methods of the filer passed as the Filer parameter to assign methods that can load and save the ActionName and FocusedRowIndex properties to a stream.

This method overrides the inherited DefineProperties method in order to store unpublished ActionName and FocusedRowIndex properties.


TcxCustomWebDataSource.DeleteRecord

TcxCustomWebDataSource          See Also

Deletes a specific record from the associated dataset.

procedure DeleteRecord(ARowIndex: Integer); virtual;

Description

The DeleteRecord method is designed to remove a record specified by the ARowIndex parameter from a corresponding dataset.

Note: Note that the ARowIndex parameter is zero-based.  Standard dataset components consider their first record index to be 1.

As implemented in the TcxCustomWebDataSource class, the DeleteRecord method performs nothing.  Descendant classes (such as the TcxStdWebDataSource, TcxExtWebDataSource, or TcxWebDBDataSource class) override the DeleteRecord method to delete a specific dataset record in their own manner.

Generally, the DeleteRecord method is designed to perform the following actions:

•	Checks the value returned by the CanEdit method to determine whether the dataset can be edited.  If this value is False, the DeleteRecord method performs nothing and sets the ActionName property to 'CANCELEDIT'  specified by the scxCancelEditAction.

•	Invokes the OnDeleting event (if its handler is assigned).

•	Positions the corresponding dataset on a record specified by the ARowIndex parameter.

•	Forces the corresponding dataset to delete its active record.

•	Set the ActionName property to 'DELETE' specified by the scxDeleteAction.

•	Invokes the OnDeleted event (if its handler is assigned).


TcxCustomWebDataSource.Destroy

TcxCustomWebDataSource          See Also

Destroys the TcxCustomWebDataSource object.

destructor Destroy; override;

Description

The Destroy method is used to destroy an instance of the TcxCustomWebDataSource class and release any allocated memory.

The Destroy method performs the following actions step by step:

•	Clears the list of registered event names and corresponding handlers.

•	Frees references to the TcxWebActionsHelper and TcxWebValuesHelper objects (specified via the WebActionsHelper and WebValuesHelper properties) and replaces these references with nil.

•	Frees the internal list of associated data controls.

•	Calls the inherited destructor.

Do not call the Destroy method directly in an application.  Use the Free method instead.


TcxCustomWebDataSource.EditRecord

TcxCustomWebDataSource          See Also

Prepares the corresponding dataset to edit a specific record.

procedure EditRecord(ARowIndex: Integer); virtual;

Description

The EditRecord method is designed to prepare the corresponding dataset to modify record data specified by the ARowIndex parameter.

Note: Note that the ARowIndex parameter is zero-based.  Standard dataset components consider their first record index to be 1.

As implemented in the TcxCustomWebDataSource class, the EditRecord method performs nothing.  Descendant classes (such as the TcxStdWebDataSource, TcxExtWebDataSource, or TcxWebDBDataSource class) override the EditRecord method to force the corresponding dataset to be positioned on a specific record in its own manner.

Generally the EditRecord method is designed to perform the following actions:

•	Checks the value returned by the CanEdit method to determine whether the dataset can be edited.  If this value is False, the EditRecord method performs nothing and sets the ActionName property to 'CANCELEDIT' specified by the scxCancelEditAction constant.

•	Positions the corresponding dataset on a record specified by the ARowIndex parameter.

•	Sets the ActionName property to 'STARTEDIT' specified by the scxStartEditAction constant.


TcxCustomWebDataSource.Expand

TcxCustomWebDataSource          See Also

Expands/collapses a specific grouped row.

procedure Expand(ARowIndex: Integer; AExpanded, ARecursive: Boolean); virtual;

Description

When a dataset is grouped, its data can be represented in a tree-like manner, where a root row (additional row or grouping row) is created for each grouped field value, and all the records that share the same values are displayed as child rows.

The Expand method is designed to expand or collapse a grouping row specified by the ARowIndex parameter.

The AExpanded parameter specifies whether the grouped row will be expanded or collapsed.  If the AExpanded parameter is set to True, the specified grouping row will be expanded; otherwise it will be collapsed.

The ARecursive parameter specifies whether child grouping rows (if any) will be expanded/collapsed as determined by the AExpanded parameter.  For instance, if the ARecursive parameter is set to True and the AExpanded parameter is set to False, the grouping row specified by the ARowIndex parameter and all its child grouping rows will be collapsed.

As implemented in the TcxCustomWebDataSource class, the Expand method performs nothing.  Descendant classes (such as the TcxExtWebDataSource class or your custom designed data source class/component, if any) can override the Expand method to expand/collapse a specific grouping row in their own manner.

Generally the Expand method is designed to perform the following actions:

•	Check the AllowExpanding property to determine whether rows of the dataset can be expanded.  If the AllowExpanding property is set to False, the Expand method performs nothing but set the ActionName property to 'UNDEFINED' specified by the scxUndefinedAction constant.

•	Invoke the OnExpanding event (if it is implemented for a component and its handler is assigned).

•	Force the corresponding data controller object (if any) to expand/collapse a specific grouping row in compliance with the passed ARowIndex, AExpanded, and ARecursive parameters.

•	Set the ActionName property to 'EXPAND' specified by the scxExpandingAction constant.

•	Invoke the OnExpanded event (if it is implemented for a component and its handler is assigned).


TcxCustomWebDataSource.FullCollapse

TcxCustomWebDataSource          See Also

Collapses all expanded grouped rows.

procedure FullCollapse; virtual;

Description

When a dataset is grouped, its data can be represented in a tree-like manner, where a root row (an additional row or grouping row) is created for each grouped field value, and all the records that share the same values are displayed as child rows.

The FullCollapse method is designed to collapse all the expanded grouping rows of a dataset.

As implemented in the TcxCustomWebDataSource class, the FullCollapse method does nothing.  Descendant classes (such as the TcxExtWebDataSource class or your custom designed data source class/component, if any) can override the FullCollapse method to collapse all grouping rows in their own manner.


TcxCustomWebDataSource.FullExpand

TcxCustomWebDataSource          See Also

Expands all grouped rows.

procedure FullExpand; virtual;

Description

When a dataset is grouped, its data can be represented in a tree-like manner, where a root row (an additional row or grouping row) is created for each grouped field value, and all the records that share the same values are displayed as child rows.

The FullExpand method is designed to expand all the grouping rows of a dataset.

As implemented in the TcxCustomWebDataSource class, the FullExpand method does nothing.  Descendant classes (such as the TcxExtWebDataSource class or your custom designed data source class/component, if any) can override the FullExpand method to expand all grouping rows in their own manner.


TcxCustomWebDataSource.GetAllowEditing

TcxCustomWebDataSource          See Also

Returns the value of the AllowEditing property.

function GetAllowEditing: Boolean; virtual;

Description

As implemented in the TcxCustomWebDataSource class, the GetAllowEditing method returns the value of the AllowEditing property.  You may override it in descendant classes (if you design your own data source component), to allow expanding of grouped dataset records.


TcxCustomWebDataSource.GetAllowExpanding

TcxCustomWebDataSource          See Also

Returns the value of the AllowExpanding property.

function GetAllowExpanding: Boolean; virtual;

Description

As implemented in the TcxCustomWebDataSource class, the GetAllowExpanding method simply returns False.  You may override it in descendant classes (if you design your own data source component), to allow expanding of grouped dataset records.

This method is overridden by the TcxExtWebDataSource class.


TcxCustomWebDataSource.GetAllowGrouping

TcxCustomWebDataSource          See Also

Returns the value of the AllowGrouping property.

function GetAllowGrouping: Boolean; virtual;

Description

As implemented in the TcxCustomWebDataSource class, the GetAllowGrouping method simply returns False.  You may override it in descendant classes (if you design your own data source component), to allow grouping of dataset records.

This method is overridden by the TcxExtWebDataSource class.


TcxCustomWebDataSource.GetAllowSorting

TcxCustomWebDataSource          See Also

Returns the value of the AllowSorting property.

function GetAllowSorting: Boolean; virtual;

Description

As implemented in the TcxCustomWebDataSource class, the GetAllowSorting method simply returns False.  You may override it in descendant classes (if you design your own data source component), to allow sorting of dataset records.

This method is overridden by the TcxExtWebDataSource class.


TcxCustomWebDataSource.GetDisplayText

TcxCustomWebDataSource          See Also

Returns the value of the DisplayTexts property.

function GetDisplayText(ARecordIndex, AItemIndex: Integer): string; virtual;

Description

The GetDisplayText method is designed to return a string representation of a specific field’s value for display within data-aware web controls.

The ARecordIndex parameter specifies the index of a dataset record.  The AItemIndex parameter represents the index of a field whose value is to be returned.

As implemented in the TcxCustomWebDataSource class, the GetDisplayText method simply returns an empty string.  Descendant classes (such as the TcxStdWebDataSource or TcxExtWebDataSource class) override the GetDisplayText method to return a proper value for the DisplayTexts property.


TcxCustomWebDataSource.FieldByName

TcxCustomWebDataSource          See Also

Returns an object representing the dataset field with a specified name.

function FieldByName(const Name: string): TcxCustomWebDataField; virtual;

Description

The FieldByName method returns the TcxCustomWebDataField object representing the field specified by its name.  The name of the field is specified by the Name parameter.  The parameter value is compared to the Name property value of scanned record fields.

If no item matching the name was found in the Fields list of the data source component, the FieldByName method returns nil.


TcxCustomWebDataSource.GetFields

TcxCustomWebDataSource          See Also

Returns the value of the Fields property.

function GetFields: TCollection; virtual;

Description

As implemented in the TcxCustomWebDataSource class, the GetFields method simply returns the Fields property value (the TCollection type).  Descendant classes (such as the TcxStdWebDataSource, TcxWebDataSource, and TcxWebDBDataSource classes) override the GetFields method to perform checked typecasts and to return a desired value for the Fields property.


TcxCustomWebDataSource.GetFocusedRowIndex

TcxCustomWebDataSource          See Also

Returns the value of the FocusedRowIndex property.

function GetFocusedRowIndex: Integer; virtual;

Description

The GetFocusedRowIndex method is designed to return the index of the focused record in the corresponding dataset.

As implemented in the TcxCustomWebDataSource class, the GetFocusedRowIndex method simply returns -1.  Descendant classes (such as the TcxStdWebDataSource and TcxExtWebDataSource classes) override the GetFocusedRowIndex method to return the index of the active record within the associated dataset in their own manner.


TcxCustomWebDataSource.GetGroupingItemCount

TcxCustomWebDataSource          See Also

Returns the total number of grouping fields.

function GetGroupingItemCount: Integer; virtual;

Description

When the dataset data is grouped by dataset field values, the GetGroupingItemCount method is designed to return the number of fields whose values are used to group records of the dataset associated with the data source component.

Once the dataset data is grouped, a new item within an internal grouping fields list is created.  This item contains a reference to the mentioned grouping field against whose values the dataset is grouped.  The order of items within a grouping fields list is specified by the grouping level.

Thus the GetGroupingItemCount method is designed to return the total number of items within the internal grouping fields list.

Note:  If dataset data is not grouped, an internal grouping fields list is empty and the GetGroupingItemCount method returns 0.

As implemented in the TcxCustomWebDataSource class, the GetGroupingItemCount method simply returns 0.  Descendant classes (such as the TcxExtWebDataSource class or your custom designed data source class/component, if any) can override the GetGroupingItemCount method to return the number of grouping fields in their own manner.


TcxCustomWebDataSource.GetGroupingItemIndex

TcxCustomWebDataSource          See Also

Returns the index of a field specified by its position within a grouping fields list.

function GetGroupingItemIndex(Item: Integer): Integer; virtual;

Description

Once the dataset data is grouped based on the values of a specific field, a new item within a grouping fields list is created.  This item contains a reference to the grouping field against whose values the dataset is grouped.  The order of items within a grouping fields list is specified by the grouping level.

The GetGroupingItemIndex method is designed to return the index of a dataset field specified by its position within a grouping fields list.

The Item parameter specifies the index of an item representing a grouping field within a grouping fields list.  The value of the Item parameter must be between 0 and the value returned by the GetGroupingItemCount method decremented by one (GetGroupingItemCount - 1).

As implemented in the TcxCustomWebDataSource class, the GetGroupingItemIndex method simply returns -1.  Descendant classes (such as the TcxExtWebDataSource class or your custom designed data source class/component, if any) can override the GetGroupingItemIndex method to return the proper grouping field index.


TcxCustomWebDataSource.GetItemGroupIndex

TcxCustomWebDataSource          See Also

Returns the position of a specific grouping field within a grouping fields list.

function GetItemGroupIndex(ItemIndex: Integer): Integer; virtual;

Description

Once a dataset data is grouped by the values of a specific field, a new item within a grouping fields list is created.  This item contains a reference to the grouping field against whose values the dataset is grouped.  The order of items within a grouping fields list is specified by the grouping level.

The GetItemGroupIndex method is designed to return the index of an item representing a specific grouping field within the grouping fields list.  The ItemIndex parameter specifies the index of a grouping field within the associated dataset.  Thus the GetItemGroupIndex method can be used to obtain the grouping level of a specific dataset field.

As implemented in the TcxCustomWebDataSource class, the GetItemGroupIndex method simply returns -1.  Descendant classes (such as the TcxExtWebDataSource class or your custom designed data source class/component, if any) can override the GetItemGroupIndex method to return the proper field grouping level.


TcxCustomWebDataSource.GetItemHelperClass

TcxCustomWebDataSource          See Also

Returns a helper class for a specific field.

function GetItemHelperClass(AItemIndex: Integer): TcxDataFieldHelperClass; virtual;

Description

Dataset records can contain different data type fields.  Generally speaking, a single field represents the characteristics of a single column in a dataset (for instance, it specifies column data type).  In order to correctly process different types of field data, specific field helper classes are used.  Any individual field helper class converts field data into its string representation which can be used when generating resulting HTML code.

The GetItemHelperClass method is designed to return an appropriate helper class for a field specified by the AItemIndex parameter.

As implemented in the TcxCustomWebDataSource class, the GetItemHelperClass method simply returns the basic TcxDataFieldHelper class.  Descendant classes (such as the TcxStdWebDataSource, TcxExtWebDataSource, and TcxWebDBDataSource classes or your custom designed data source class/component, if any) can override the GetItemHelperClass method to return the proper helper class for a specific dataset field.


TcxCustomWebDataSource.GetItemSortOrder

TcxCustomWebDataSource          See Also

Returns a value that specifies sort order for the specified field.

type

  TcxWebDataSortOrder = (wsoNone, wsoAscending, wsoDescending);

function GetItemSortOrder(ItemIndex: Integer): TcxWebDataSortOrder; virtual;

Description

The contents of the associated dataset can be sorted against field values in both ascending and descending order.  The GetItemSortOrder method is designed to return a value that indicates the sort order of a specific dataset’s field values. The ItemIndex parameter specifies the index of a field within a dataset record.

The GetItemSortOrder method can return one of the following values.

Value	Meaning
wsoNone	The associated dataset is not sorted by values of the specified field.
wsoAscending	The associated dataset is sorted by values of the specified field in ascending order.
wsoDescending	The associated dataset is sorted by values of the specified field in descending order.

As implemented in the TcxCustomWebDataSource class, the GetItemSortOrder method simply returns \ wsoNone.  Descendant classes (such as the TcxExtWebDataSource class or your custom designed data source class/component, if any) can override the GetItemSortOrder method to obtain field sort order in their own manner.


TcxCustomWebDataSource.GetRecordCount

TcxCustomWebDataSource          See Also

Returns the value of the RecordCount property.

function GetRecordCount: Integer; virtual;

Description

The GetRecordCount method is designed to return the total number of records within the associated dataset.

As implemented in the TcxCustomWebDataSource class, the GetRecordCount method simply returns 0.  Descendant classes (such as the TcxStdWebDataSource and TcxExtWebDataSource classes or your custom designed data source class/component, if any) can override the GetRecordCount method to return the total number of records in their own manner.


TcxCustomWebDataSource.GetRowCount

TcxCustomWebDataSource          See Also

Returns the value of the RowCount property.

function GetRowCount: Integer; virtual;

Description

The GetRowCount method is designed to return the total number of rows (including grouped rows) that represent the associated dataset in its current state.

Note: If the dataset is not grouped, the GetRowCount method is designed to return the same value as the RecordCount property.

As implemented in the TcxCustomWebDataSource class, the GetRowCount method simply returns 0.  Descendant classes (such as the TcxStdWebDataSource and TcxExtWebDataSource classes or your custom designed data source class/component, if any) can override the GetRowCount method to return the total number of rows in their own manner.


TcxCustomWebDataSource.GetRowDisplayText

TcxCustomWebDataSource          See Also

Returns a specific field value as it should be displayed in data aware web controls.

function GetRowDisplayText(RowIndex: Integer; ItemIndex: Integer): string; virtual;

Description

The GetRowDisplayText method is designed to return a string representation of a specific field value for display within data aware web controls.

The RowIndex parameter specifies the index of the row within the internal list of rows.  This internal row list consists of rows that represent the associated dataset in its current state.  For instance, if the dataset is grouped, the internal list of rows contains additional grouped rows in addition to standard dataset records.  The total number of rows in this internal list can be determined via the RowCount property.  The ItemIndex parameter represents the index of a field.

Note: If the dataset is not grouped, GetRowDisplayText method is designed to return the DisplayTexts property value.

As implemented in the TcxCustomWebDataSource class, the GetRowDisplayText method simply returns an empty string.  Descendant classes (such as the TcxStdWebDataSource and TcxExtWebDataSource classes) override the GetRowDisplayText method to return a specific row’s field value in their own manner.


TcxCustomWebDataSource.GetRowExpanded

TcxCustomWebDataSource          See Also

Returns a value that indicates whether a specific row is expanded.

function GetRowExpanded(RowIndex: Integer): Boolean; virtual;

Description

When a dataset is grouped against field values, its data can be represented in a tree-like manner, where a root row (additional row or grouping row) is created for each grouping field value, and all the records that share the same value are displayed as child rows.  Thus the root (grouped) rows can be expanded/collapsed to display/hide their child rows.

The GetRowExpanded method is designed to return a Boolean value, which indicates whether a row specified by the RowIndex parameter is expanded.

The RowIndex parameter specifies the index of a row within the internal list of rows.  This internal row list consists of rows that represent the associated dataset in its current state.  For instance, if the dataset is grouped, the internal list of rows contains additional grouped rows in addition to standard dataset records.  The total number of rows in this internal list can be determined via the RowCount property.

Note: If the dataset is not grouped or a row specified by the RowIndex parameter is not a grouped row, the GetRowExpanded method is designed to return False.

As implemented in the TcxCustomWebDataSource class, the GetRowExpanded method simply returns False.  Descendant classes (such as the TcxExtWebDataSource class or your custom designed data source class/component, if any) can override the GetRowExpanded method to determine whether a specific row is expanded in its own manner.


TcxCustomWebDataSource.GetRowLevel

TcxCustomWebDataSource          See Also

Returns the grouping level of a specific row.

function GetRowLevel(RowIndex: Integer): Integer; virtual;

Description

When the dataset data is grouped by values of several fields, its data can be represented in a tree-like manner.

The GetRowLevel method is designed to return the grouping level of a row specified by the RowIndex parameter.

The RowIndex parameter specifies the index of a row within the internal rows list.  This internal row list consists of rows which represent the associated dataset in its current state.  For instance, if the dataset is grouped, the internal list of rows contains additional grouped rows in addition to standard dataset records.  The total number of rows in this internal list can be determined via the RowCount property.

Note: If the dataset is not grouped, the GetRowLevel method is designed to return 0.

As implemented in the TcxCustomWebDataSource class, the GetRowLevel method simply returns 0.  Descendant classes (such as the TcxExtWebDataSource class or your custom designed data source class/component, if any) can override the GetRowLevel method to obtain the grouping level of a specific row in their own manner.


TcxCustomWebDataSource.GetRowRecord

TcxCustomWebDataSource          See Also

Returns the index of a dataset record by row index.

function GetRowRecord(RowIndex: Integer): Integer; virtual;

Description

The GetRowRecord method is designed to return the index of a dataset record that corresponds to a row specified by the RowIndex parameter.

The RowIndex parameter specifies the index of a row within the internal row list.  This internal row list consists of rows that represent the associated dataset in its current state.  For instance, if the dataset is grouped, the internal list of rows contains rows (including grouped rows) which are not hidden within collapsed rows.  The total number of rows in this internal list is specified by the RowCount property.

As implemented in the TcxCustomWebDataSource class, the GetRowRecord method simply returns the value of the passed RowIndex parameter.  Descendant classes (such as the TcxExtWebDataSource class or your custom designed data source class/component, if any) can override the GetRowRecord method to obtain the index of a corresponding dataset record in their own manner.

Note:  If the RowIndex parameter specifies the index of a grouped row, the GetRowRecord method is designed to return the index of the first record (not a grouped row) following this grouped row.


TcxCustomWebDataSource.GetRowValue

TcxCustomWebDataSource          See Also See Also

Returns a value of a specific field in a specific row of the internal row list.

function GetRowValue(RowIndex: Integer; ItemIndex: Integer): Variant; virtual;

Description

The GetRowValue method is designed to return a value of a specific field that is contained within a row specified by the RowIndex parameter.

The RowIndex parameter specifies the index of a row within the internal list of rows.  This internal row list consists of rows which represent the associated dataset in its current (grouped) state.  For instance, if the dataset is grouped, the internal list of rows contains additional grouped rows in addition to standard dataset records.  The total number of rows in this internal list is specified by the RowCount property.

The ItemIndex parameter is the index of a field whose value is returned by the GetRowValue method.

When the dataset is not grouped, the GetRowValue method is designed to function the same way as the GetValue method which returns the value of the Values property.

As implemented in the TcxCustomWebDataSource class, the GetRowValue method simply returns varEmpty (the variant is unassigned).  Descendant classes (such as the TcxStdWebDataSource and TcxExtWebDataSource classes or your custom designed data source class/component, if any) can override the GetRowValue method to return the value of a specific row field in their own manner.


TcxCustomWebDataSource.GetSortingItemCount

TcxCustomWebDataSource          See Also

Returns the number of sorting fields.

function GetSortingItemCount: Integer; virtual;

Description

The dataset associated with the data source component can be sorted by field values.  The contents and data type of the sorted field determine the new order of the records.

The GetSortingItemCount method is designed to return the number of fields whose values are used to sort dataset records.

When dataset data is sorted, a new item within a sorting fields list is created.  This item contains a reference to the sorting field by whose values the dataset is sorted.  The order of items within a sorting fields list is specified by the sorting level.

As implemented in the TcxCustomWebDataSource class, the GetSortingItemCount method simply returns 0.  Descendant classes (such as the TcxExtWebDataSource class or your custom designed data source class/component, if any) can override the GetSortingItemCount method to return the number of sorting fields in their own manner.


TcxCustomWebDataSource.GetSortingItemIndex

TcxCustomWebDataSource          See Also

Returns the index of a field specified by its position within a sorting fields list.

function GetSortingItemIndex(Item: Integer): Integer; virtual;

Description

When the dataset data is sorted by field values, a new item within the sorting fields list is created.  This item contains a reference to the mentioned sorting field against whose values the dataset is sorted.  Order of items within a sorting fields list is specified by the sorting level.

The GetSortingItemIndex method is designed to return the index of a dataset field specified by its position within a sorting fields list.

The Item parameter specifies the index of an item representing a sorting field within a sorting fields list.  A value of the Item parameter must be between 0 and a value returned by the GetSortingItemCount method decremented by one (GetSortingItemCount - 1).

As implemented in the TcxCustomWebDataSource class, the GetSortingItemIndex method simply returns 0.  Descendant classes (such as the TcxExtWebDataSource class or your custom designed data source class/component, if any) can override the GetSortingItemIndex method to return the proper sorting field index.


TcxCustomWebDataSource.GetValue

TcxCustomWebDataSource          See Also

Returns the value of the Values property.

function GetValue(ARecordIndex, AItemIndex: Integer): Variant; virtual;

Description

The GetValue method is designed to return a value of a specific field that is contained within a dataset record specified by the ARecordIndex parameter.  The ItemIndex parameter is the index of the field whose value is returned by the GetValue method.

As implemented in the TcxCustomWebDataSource class, the GetValue method simply returns varEmpty (the variant is unassigned).  Descendant classes (such as the TcxStdWebDataSource and TcxExtWebDataSource classes or your custom designed data source class/component, if any) can override the GetValue method to return the value of a specific record field in their own manner.


TcxCustomWebDataSource.GetWebActionsHelper

TcxCustomWebDataSource          See Also

Returns the value of the WebActionsHelper property.

function GetWebActionsHelper: TcxWebActionsHelper; virtual;

Description

The GetWebActionsHelper method returns an object implementing the functionality of the data source component regarding server side event handling.

The TcxCustomWebDataSource class delegates this part of its functionality to the TcxWebActionsHelper object.  This object is retrieved via the WebActionsHelper property, which implements the IcxWebActions interface.

The TcxWebActionsHelper object manages registration and execution of event handlers.  In order to register component event handlers, you should override the RegisterActions method of the TcxCustomWebDataSource class.  This method should call the RegisterAction method of the TcxWebActionsHelper object (WebActionsHelper property) for each event, which can be handled by your data source component.  The name of the event and the corresponding handler are transmitted to this method as parameters.  It is recommended to register an event with an empty string name.  This allows EWF to avoid errors when the request contains an empty __ACTIONNAME hidden input value and non-empty __TARGETNAME for some reasons.


TcxCustomWebDataSource.GetWebRenderHelper

TcxCustomWebDataSource          See Also

Returns the value of the WebRenderHelper property.

function GetWebRenderHelper: TcxWebRenderHelper; virtual;

Description

The TcxCustomWebDataSource class delegates this part of its functionality to the TcxWebRenderHelper object.  This object is retrieved via the WebRenderHelper property, which implements the IcxCodeProvider interface.

Each component can be rendered in a number of ways depending upon client browser type.  In order to implement this, each component has a number of renderer classes each used to render the code for a particular browser.  These classes are registered within the RegisterRenderers method of the TcxCustomWebDataSource class.  Descendant data source classes override this method to register renderer classes as their needs dictate.  This method should call the RegisterRenderer method of the TcxWebRenderHelper class for each renderer class.

The TcxWebRenderHelper class contains a number of methods that render specific component code.  Each of these methods is implemented similarly.  First, the renderer class, corresponding to the specified browser type is instantiated.  Then the corresponding method of the renderer class is called in order to render the desired code.


TcxCustomWebDataSource.GetWebValuesHelper

TcxCustomWebDataSource          See Also

Returns the value of the WebValuesHelper property.

function GetWebValuesHelper: TcxWebValuesHelper; virtual;

Description

The TcxCustomWebDataSource class delegates this part of its functionality to the TcxWebValuesHelper object.  This object is retrieved via the WebValuesHelper property, which implements the IcxWebValues interface.


TcxCustomWebDataSource.Group

TcxCustomWebDataSource          See Also

Groups the dataset data based upon a specific grouping field’s contents.

procedure Group(GroupField, GroupIndex: Integer); virtual;

Description

The Group method is designed to group records of the corresponding dataset based upon the contents of a field specified by the GroupField parameter. The GroupIndex parameter specifies the index of an item represented by a grouping field within a grouping fields list.  In other words, the GroupIndex parameter specifies the proper grouping level for a field.

As implemented in the TcxCustomWebDataSource class, the Group method performs nothing.  Descendant classes (such as the TcxExtWebDataSource class or your custom designed data source class/component, if any) can override the Group method to perform grouping in their own manner.

Generally the Group method is designed to perform the following actions:

•	Check the AllowGrouping property to determine whether the dataset can be grouped.  If the AllowGrouping property is set to False, the Group method performs nothing and sets the ActionName property to ' UNDEFINED' specified by the scxUndefinedAction constant.

•	Invoke the OnGrouping event (if it is implemented for a component and its handler is assigned).

•	Force the corresponding data controller object to group dataset records in compliance with the passed GroupField and GroupIndex parameters.

•	Set the ActionName property to 'GROUP' specified by the scxGroupingAction constant.

•	Invoke the OnGrouped event (if it is implemented for a component and its handler is assigned).


TcxCustomWebDataSource.InsertRecord

TcxCustomWebDataSource          See Also

Inserts a new record to the dataset and posts it.

procedure InsertRecord(ARowIndex: Integer); virtual;

Description

The InsertRecord method is designed to create a new, empty record in the dataset and post it.  The ARowIndex parameter specifies the index of the newly created record.  The newly inserted record becomes the active record.

As implemented in the TcxCustomWebDataSource class, the InsertRecord method performs nothing.  Descendant classes (such as the TcxStdWebDataSource, TcxExtWebDataSource and TcxWebDBDataSource classes or your custom designed data source class/component, if any) can override the InsertRecord method to insert a new record in their own manner.

Generally, the InsertRecord method is designed to perform the following actions:

•	Check the value returned by the CanEdit method to determine whether the dataset can be edited.  If this value is False, the InsertRecord method performs nothing and sets the ActionName property to 'CANCELEDIT' specified by the scxCancelEditAction constant.

•	Invoke the OnInserting event (if its handler is assigned).

•	Force the corresponding data controller object (or dataset) to insert a new record to the position specified by the ARowIndex parameter.

•	Set the ActionName property to the 'INSERT' value specified by the scxInsertAction constant.

•	Invoke the OnInserted event (if its handler is assigned).


TcxCustomWebDataSource.DoSetValues

TcxCustomWebDataSource          See Also

Sets the value(s) arrived within a request to a component’s property(s).

procedure DoSetValues; virtual;

Description

This method implements the DoSetValues method of the IcxWebValues interface.  It is used to set the value(s) arrived within a request to the data source component’s property(s).  The values arrived within a request are stored by the component by means of different HTML elements (edits, combo boxes, etc.), which are located within the form.  Assigning these values to a component’s properties is the last step in the process designed so as not to lose the changes made by a user on the client side of the application.  Please refer to the IcxWebValues interface description for a complete description of this process.

The DoSetValues method of the TcxCustomWebDataSource class does nothing.  It is overridden by derived classes as needed.  In descendant classes (such as the TcxStdWebDataSource and TcxExtWebDataSource classes or your custom designed data source class/component, if any) this method is implemented to retrieve value(s) from the Values collection of the TcxWebValuesHelper object (the WebValuesHelper property of the TcxCustomWebDataSource class).  Retrieved values are assigned to corresponding properties.


TcxCustomWebDataSource.Loaded

TcxCustomWebDataSource          See Also

Initializes the data source component after the form file has been read into memory.

procedure Loaded; override;

Description

Do not call the protected Loaded method.  The streaming system calls this method after it loads the component’s form from a stream.

As implemented in the TcxCustomWebDataSource, it performs nothing.  Descendants override this method as their needs dictate.


TcxCustomWebDataSource.NeedUpdateFields

TcxCustomWebDataSource          See Also

Returns a value that specifies whether fields list should be updated.

function NeedUpdateFields: Boolean; virtual;

Description

The NeedUpdateFields method is designed to verify whether the Fields list of a data source component properly represents a collection of data fields in the corresponding dataset.

The NeedUpdateFields method returns True if the total number of fields in a dataset differs from the total number of fields in the associated data source component, or if a specific field of the data source has no corresponding field in a dataset (this is true only for web data sources which make use of a dataset component).  Otherwise it returns False.

As implemented in the TcxCustomWebDataSource class, the NeedUpdateFields method simply returns False.  Descendant classes (such as the TcxStdWebDataSource and TcxWebDBDataSource classes or your custom designed data source class/component, if any) can override the NeedUpdateFields method to verify whether fields list of the data source component should be updated in their own manner.


TcxCustomWebDataSource.PostEdit

TcxCustomWebDataSource          See Also

Posts changes to the associated dataset.

procedure PostEdit(APriorControlName: string); virtual;

Description

The PostEdit method is designed to modify record data in the associated dataset.  It should call the ChangedData method to post changes made by data controls.

The APriorControlName parameter specifies the name of a prior data control.  If the name of a prior control is specified, the dataset is updated using its values regardless of the values stored by other controls, which are bound to the same record field (fields).

As implemented in the TcxCustomWebDataSource class, the PostEdit method performs nothing.  Descendant classes (such as the TcxStdWebDataSource and TcxExtWebDataSource classes, or your custom designed data source class/component, if any) can override the PostEdit method to post changes in their own manner.

Generally the PostEdit method is designed to perform the following actions:

•	Check the value returned by the CanEdit method to determine whether the dataset can be edited.  If this value is False, the PostEdit method performs nothing and sets the ActionName property to 'CANCELEDIT' specified by the scxCancelEditAction constant.

•	Invoke the OnBeforePost event (if its handler is assigned).

•	Call the ChangedData method to modify the corresponding dataset data.

•	Set the ActionName property to 'POSTEDIT' specified by the scxPostEditAction constant.

•	Invoke the OnAfterPost event (if its handler is assigned).


TcxCustomWebDataSource.ReadActionName

TcxCustomWebDataSource          See Also

Set the ActionName property to a string value read from a specific reader object's stream.

procedure ReadActionName(Reader: TReader); virtual;

Description

The ReadActionName method is used to read a string value from a reader object's stream specified by the Reader parameter and assign this value to the ActionName property.

This is used to store the value of the unpublished ActionName property.  The DefineProperties method also declares a ReadFocusedRowIndex method to store the value of the unpublished FocusedRowIndex property.


TcxCustomWebDataSource.Refresh

TcxCustomWebDataSource          See Also

Refreshes data within data aware web controls.

procedure Refresh; virtual;

Description

The Refresh method is used to refresh data displayed by data aware web controls in response to changes in the corresponding dataset.

As implemented, the Refresh method simply calls the UpdateDataLayout method of the data source component.


TcxCustomWebDataSource.ReadFocusedRowIndex

TcxCustomWebDataSource          See Also

Set the FocusedRowIndex property to an integer number type read from a specific reader object's stream.

procedure ReadFocusedRowIndex(Reader: TReader); virtual;

Description

The ReadFocusedRowIndex method is used to read an integer number type from a reader object's stream specified by the Reader parameter and assign this value to the FocusedRowIndex property.

This is used to store the value of the unpublished FocusedRowIndex property.  The DefineProperties method also declares the ReadActionName method to store the value of the unpublished ActionName property.


TcxCustomWebDataSource.RegisterActions

TcxCustomWebDataSource          See Also

Registers server side events that can be handled by the data source component.

procedure RegisterActions; virtual;

Description

This method is designed to register server side events that can be handled by the data source component (actions).  Registering an action implies calling the RegisterAction method of the TcxWebActionsHelper object (WebActionsHelper property).  The parameters transmitted to this method are the name of the event and the handler.

The RegisterActions method of the TcxCustomWebDataSource class does nothing.  It is overridden in derived classes (such as the TcxStdWebDataSource and TcxExtWebDataSource classes) in order to register server side events as needed.  You should also override this method if designing a data source component that must handle server-side events.

Only server side events that are invoked by the client side of the application should be registered.

Note: It is recommended to register an event with an empty string name.  This allows EWF to avoid errors, when the __ACTIONNAME hidden input (specifying the event name) is transmitted empty.  An error should only occur if the __TARGETNAME hidden input (specifying the component) is not empty.


TcxCustomWebDataSource.RegisterClient

TcxCustomWebDataSource          See Also

Adds a specific component (control) to the Clients list.

procedure RegisterClient(Client: TComponent);

Description

The RegisterClient method is used to add a reference to a data aware component specified by the Client parameter to the Clients list of the data source component.  The Clients property keeps a list of all data aware components that use the data source component to connect to an appropriate dataset.  A component is added to the Clients list when it makes reference to the data source component via the DataSource property of the associated data binding object (DataBinding property).


TcxCustomWebDataSource.RegisterRenderers

TcxCustomWebDataSource          See Also

Registers renderer classes, which render the HTML code representing the data source component for a specific browser.

procedure RegisterRenderers; virtual;

Description

This method is designed to register the renderer classes (TcxWebRenderer descendants), which render the HTML code representing the data source component (for instance, specific hidden inputs which contain necessary information concerning a data connection) for a specific browser.  Registering a renderer class implies calling the RegisterRenderer method of the TcxWebRenderHelper object (WebRenderHelper property).

The RegisterRenderers method of the TcxCustomWebDataSource class registers the renderer classes providing HTML code representing the data source component within Internet Explorer and Netscape Navigator.  The renderer class for Internet Explorer is the default.


TcxCustomWebDataSource.RegisterValues

TcxCustomWebDataSource          See Also

Registers the HTML elements that contain data related to a data source component.

procedure RegisterValues; virtual;

Description

This method implements the RegisterValues method of the IcxWebValues interface.  It is designed to register the IDs of the HTML elements displaying the component’s data or containing auxiliary information.  Registering a value implies calling the RegisterValue method of the TcxWebValuesHelper object (WebValuesHelper property).

The RegisterValues method of the TcxCustomWebDataSource class registers two hidden inputs.  The first is designed to contain the name of an action (an ActionName property value) applied to the associated dataset.  The second hidden input contains the index of the focused row (a FocusedRow property value).  This allows the data source component to update itself after a user has performed any actions against corresponding dataset data (such as navigation through records; record creation, deletion, modification).

The derived classes (such as the TcxStdWebDataSource and TcxExtWebDataSource classes, or your custom designed data source class/component, if any) can override the RegisterValues method in order to register additional HTML elements whose values are required for proper functionality.


TcxCustomWebDataSource.SetEditValue

TcxCustomWebDataSource          See Also

Posts an entered value to a specified field of an inserted record.

procedure SetEditValue(AItemIndex: Integer; AValue: Variant); virtual;

Description

The SetEditValue method is designed to assign a value specified by the Value parameter to a specific dataset field of a newly inserted record.  The ItemIndex parameter is the index of a field whose value is being set by the SetEditValue method.  The AValue parameter contains the edited cell value.

Note that the SetEditValue method is intended to invoke the OnSetEditValue event if its handler is assigned.

As implemented in the TcxCustomWebDataSource class, the SetEditValue method does nothing.  Descendant classes (such as the TcxStdWebDataSource and TcxExtWebDataSource classes, or your custom designed data source class/component, if any) can override the SetEditValue method to assign the value to a specific field of the inserted record in their own manner.


TcxCustomWebDataSource.SetFields

TcxCustomWebDataSource          See Also

Sets the value of the Fields property.

procedure SetFields(Value: TCollection);

Description

As implemented in the TcxCustomWebDataSource class, the SetFields method simply assigns the value specified by the Value parameter to the Fields property (the TCollection type).  Descendant classes (such as the TcxStdWebDataSource, TcxWebDataSource, and TcxWebDBDataSource classes) override the SetFields method to perform checked typecasts and to assign a desired value type to their Fields property.


TcxCustomWebDataSource.SetFocusedRowIndex

TcxCustomWebDataSource          See Also

Sets the value of the FocusedRowIndex property.

procedure SetFocusedRowIndex(Value: Integer); virtual;

Description

The SetFocusedRowIndex method is designed to assign a value specified by the Value parameter to the FocusedRowIndex property.

The Value parameter specifies the index of the focused record in the corresponding dataset.

As implemented in the TcxCustomWebDataSource class, the SetFocusedRowIndex method does nothing.  Descendant classes (such as the TcxStdWebDataSource and TcxExtWebDataSource classes, or your custom designed data source class/component, if any) can override the SetFocusedRowIndex method to assign a value to the FocusedRowIndex property in their own manner.

Generally, SetFocusedRowIndex is designed to perform the following actions:

•	Invoke the OnScrolling event (if its handler is assigned).

•	Change the focused row index (sets the FocusedRowIndex property to the value of the Value parameter).

•	Invoke the OnScrolled event (if its handler is assigned).


TcxCustomWebDataSource.SetRecordCount

TcxCustomWebDataSource          See Also

Sets the value of the RecordCount property.

procedure SetRecordCount(Value: Integer); virtual;

Description

The SetRecordCount method is used internally to assign a value specified by the Value parameter to the RecordCount property.

As implemented in the TcxCustomWebDataSource class, the SetRecordCount method does nothing.  Descendant classes (such as the TcxWebDataSource class, or your custom designed data source class/component, if any) can override the SetRecordCount method to assign a value to the RecordCount property in their own manner.


TcxCustomWebDataSource.SetValue

TcxCustomWebDataSource          See Also

Sets the value of the Values property.

procedure SetValue(ARecordIndex, AItemIndex: Integer; const Value: Variant); virtual;

Description

The SetValue method is designed to assign a value specified by the Value parameter to a specific dataset field.  The ARecordIndex parameter specifies the index of a dataset record.  The ItemIndex parameter is the index of a field whose value is being set by the SetValue method.

As implemented in the TcxCustomWebDataSource class, the SetValue method does nothing.  Descendant classes (such as the TcxStdWebDataSource and TcxExtWebDataSource classes, or your custom designed data source class/component, if any) can override the SetValue method to assign the value to a specific record field in their own manner.


TcxCustomWebDataSource.Sort

TcxCustomWebDataSource          See Also

Sorts the dataset by a specific field values.

procedure Sort(SortIndex: Integer; SortOrder: TcxWebDataSortOrder); virtual;

Description

The Sort method is designed to perform dataset sorting based upon the values of a field specified by the SortIndex parameter.  The SortOrder parameter specifies the sort order of a specific dataset field.  The following values are available for the SortOrder parameter.

Value	Meaning
wsoNone	The associated dataset is not sorted.
wsoAscending	The associated dataset is sorted by values of the specified field in ascending order.
wsoDescending	The associated dataset is sorted by values of the specified field in descending order.

As implemented in the TcxCustomWebDataSource class, the Sort method performs nothing.  Descendant classes (such as the TcxExtWebDataSource class, or your custom designed data source class/component, if any) can override the Sort method to perform sorting in their own manner.

Generally, the Sort method is designed to perform the following actions:

•	Check the AllowSorting property to determine whether the dataset can be sorted.  If the AllowSorting property is set to False, the Sort method performs nothing and sets the ActionName property to ' UNDEFINED' specified by the scxUndefinedAction constant.

•	Invoke the OnSorting event (if it is implemented for a component and its handler is assigned).

•	Force the corresponding data controller object (if any) to sort dataset records in compliance with the passed GroupField and GroupIndex parameters.

•	Set the ActionName property to 'SORT' specified by the scxSortingAction constant.

•	Invoke the OnSorted event (if it is implemented for a component and its handler is assigned).


TcxCustomWebDataSource.UnGroup

TcxCustomWebDataSource          See Also

Ungroups dataset data by a specific grouping field’s values.

procedure UnGroup(UnGroupIndex: Integer); virtual;

Description

The UnGroup method is designed to ungroup records of the associated dataset, which was grouped based upon the contents of a field specified by the UnGroupIndex parameter. If the dataset was not grouped by the values of the field specified by the UnGroupedIndex parameter, nothing occurs.

When dataset data is ungrouped, the corresponding item is removed from a grouping fields list.

As implemented in the TcxCustomWebDataSource class, the UnGroup method does nothing.  Descendant classes (such as the TcxExtWebDataSource class, or your custom designed data source class/component, if any) can override the UnGroup method to perform ungrouping in their own manner.

Generally, the UnGroup method is designed to perform the following actions:

•	Check the AllowGrouping property to determine whether the dataset can be grouped/ungrouped.  If the AllowGrouping property is set to False, the UnGroup method performs nothing and sets the ActionName property to 'UNDEFINED' specified by the scxUndefinedAction constant.

•	Invoke the OnGrouping event (if it is implemented for a component and its handler is assigned).

•	Force the corresponding data controller object (if any) to ungroup dataset records in compliance with the passed UnGroupIndex parameter.

•	Set the ActionName property to 'GROUP' specified by the scxGroupingAction constant.

•	Invoke the OnGrouped event (if it is implemented for a component and its handler is assigned).


TcxCustomWebDataSource.UnRegisterClient

TcxCustomWebDataSource          See Also

Removes a specific component from the Clients list.

procedure UnRegisterClient(Client: TComponent);

Description

The UnregisterClient method is used to remove a reference to a component specified by the Client parameter from the Clients list of the data source component.  The Clients property keeps a list of all data aware components that use the data source component to connect to an appropriate dataset.  A component is removed from the Clients list when it sets/resets the DataSource property of the associated data binding object (DataBinding property).


TcxCustomWebDataSource.UpdateDataLayout

TcxCustomWebDataSource          See Also

Updates data aware web controls in response to dataset data changes.

procedure UpdateDataLayout; virtual;

Description

Once a data aware web control has a data link and its DataSource and DataField properties correspondingly specify the data source and data field, it needs to respond to changes in the data in that field, either because of a move to a different record or because of a change made to that field.

The UpdateDataLayout method is used to update values of data aware web controls/components for which the data source component provides data.

The UpdateDataLayout method sequentially retrieves an appropriate IcxWebDataSourceSupport interface (if it is supported) for each member of the Clients list and calls the ChangedDataLayout method of the obtained interface.


TcxCustomWebDataSource.UpdateDefaultFields

TcxCustomWebDataSource          See Also

Updates dynamically generated field components of the data source.

procedure UpdateDefaultFields; virtual;

Description

A data source component implements the Fields property to provide access to a collection of field objects, which correspond to the fields of the associated dataset.  Field objects of the Fields collection are created automatically based on the current structure of the dataset fields.

The UpdateDefaultFields method is designed to update field object specified by the Fields property in response to changes of the dataset fields (if the corresponding dataset uses default fields).

As implemented in the TcxCustomWebDataSource class, the UpdateDefaultFields method does nothing.  Descendant classes (such as the TcxStdWebDataSource and TcxWebDBDataSource classes, or your custom designed data source class/component, if any) can override the UpdateDefaultFields method to update default fields in their own manner.


TcxCustomWebDataSource.UpdateValue

TcxCustomWebDataSource          See Also

Updates a value of a specific field.

procedure UpdateValue(AItem: TcxCustomWebDataField; AValue: Variant); virtual;

Description

The UpdateValue method is designed to assign a value specified by the AValue parameter to a dataset field specified by the AItem parameter in the focused record of the corresponding dataset.

As implemented in the TcxCustomWebDataSource class, the UpdateValue method does nothing.  Descendant classes (such as the TcxStdWebDataSource, TcxWebDataSource, and TcxWebDBDataSource classes, or your custom designed data source class/component, if any) can override the UpdateValue method to update a specific field value in their own manner.


TcxCustomWebDataSource.WebCancelEdit

TcxCustomWebDataSource          See Also

Runs the CancelEdit method.

procedure WebCancelEdit(const AParameters: TcxActionParameters); virtual;

Description

The WebCancelEdit method is registered as the handler for the ‘CANCELEDIT’ server side event (action).  The AParameters parameter specifies data required to handle this event (generally, the 'CANCELEDIT' action does not use any additional parameters).

The WebCancelEdit method simply calls the CancelEdit method of the data source component.

This method should not be overridden in descendant classes.  You should override the CancelEdit method in order to perform additional actions during the ‘CANCELEDIT’ event is handled.


TcxCustomWebDataSource.WebDelete

TcxCustomWebDataSource          See Also

Runs the DeleteRecord method with the appropriate parameter.

procedure WebDelete(const AParameters: TcxActionParameters); virtual;

Description

The WebDelete method is registered as the handler for the ‘DELETE’ server side event (action).  The AParameters parameter specifies data required to handle this event (in particular, the ParamString field of the AParameters parameter contains an integer which specifies the index of a row being deleted by a user at the client side).

The WebDelete method processes data passed via the AParameters parameter and forms the necessary value of the DeleteRecord method’s parameter.  Then the WebDelete method calls the DeleteRecord method with this formed parameter.

This method should not be overridden in descendant classes.  You should override the DeleteRecord method in order to perform additional actions during the ‘DELETE’ event is handled.


TcxCustomWebDataSource.WebInsert

TcxCustomWebDataSource          See Also

Runs the InsertRecord method with the appropriate parameter.

procedure WebInsert(const AParameters: TcxActionParameters); virtual;

Description

The WebInsert method is registered as the handler for the ‘INSERT’ server side event (action).  The AParameters parameter specifies data required to handle this event (in particular, the ParamString field of the AParameters parameter contains an integer which specifies the index of a row being inserted by a user at the client side).

The WebInsert method processes data passed via the AParameters parameter and forms the necessary value of the InsertRecord method’s parameter.  Then the WebInsert method calls the InsertRecord method with this formed parameter.

This method should not be overridden in descendant classes.  You should override the InsertRecord method in order to perform additional actions during the ‘INSERT’ event is handled.


TcxCustomWebDataSource.WebMoveBy

TcxCustomWebDataSource          See Also

Changes the index of the focused row (FocusedRowIndex property).

procedure WebMoveBy(const AParameters: TcxActionParameters); virtual;

Description

The WebMoveBy method is internally used to move the active record by a specified number of records.

The WebMoveBy method is registered as the handler for the ‘MOVEBY’ server side event (action).  AParameters specifies data required to handle this event.  In particular, the ParamString field of the AParameters parameter contains an integer which specifies the distance between old and new focused rows.  A positive value for distance indicates forward progress through the dataset, while a negative value indicates backward progress.

The WebMoveBy method processes data passed via the AParameters parameter and forms the necessary value for the FocusedRowIndex property.  Then the WebMoveBy method assigns this value to the FocusedRowIndex property and sets the ActionName property to 'MOVEBY' specified by the scxMoveByAction constant.


TcxCustomWebDataSource.WebMoveTo

TcxCustomWebDataSource          See Also

Moves focus to another record in the dataset.

procedure WebMoveTo(const AParameters: TcxActionParameters); virtual;

Description

The WebMoveTo method is internally used to move focus to a specific record in the dataset (to make the record active).

The WebMoveTo method is registered as the handler for the ‘MOVETO’ server side event (action).  The AParameters parameter specifies data required to handle this event.  In particular, the ParamString field of the AParameters parameter contains an integer which specifies the index of the row activated by a user at the client side.

The WebMoveTo method processes data passed via the AParameters parameter and forms the necessary value for the FocusedRowIndex property.  The WebMoveTo method assigns this value to the FocusedRowIndex property and sets the ActionName property to 'MOVETO' specified by the scxMoveToAction constant.


TcxCustomWebDataSource.WebPostEdit

TcxCustomWebDataSource          See Also

Runs the PostEdit method with the appropriate parameter.

procedure WebPostEdit(const AParameters: TcxActionParameters); virtual;

Description

The WebPostEdit method is registered as the handler for the ‘POSTEDIT’ server side event (action).  The AParameters parameter specifies data required to handle this event (in particular, the ParamString field of the AParameters parameter contains the name of a prior data aware web control).

The WebPostEdit method processes data passed via the AParameters parameter and forms the necessary value for the PostEdit method parameter.  Then the WebPostEdit method calls the PostEdit method with this formed parameter.

This method should not be overridden in descendant classes.  You should override the PostEdit method in order to perform additional actions during the ‘POSTEDIT’ event.


TcxCustomWebDataSource.WebRefresh

TcxCustomWebDataSource          See Also

Updates a data view.

procedure WebRefresh(const AParameters: TcxActionParameters); virtual;

Description

The WebRefresh method is registered as the handler for the ‘REFRESH’ server side event (action).  The AParameters parameter specifies data required to handle this event (generally, the ‘REFRESH’ action does not use any additional parameters).

The WebRefresh method simply calls the Refresh method and sets the ActionName property to 'REFRESH' specified by the scxRefreshAction constant.  The post back itself forces the data to be reloaded from the associated dataset.


TcxCustomWebDataSource.WebStartEdit

TcxCustomWebDataSource          See Also

Runs the EditRecord method with the appropriate parameter.

procedure WebStartEdit(const AParameters: TcxActionParameters); virtual;

Description

The WebStartEdit method is registered as the handler for the ‘STARTEDIT’ server side event (action).  The AParameters parameter specifies data required to handle this event (in particular, the ParamString field of the AParameters parameter contains an integer which specifies the index of a row being edited by a user at the client side).

The WebStartEdit method processes data passed via the AParameters parameter and forms the necessary value for the EditRecord method parameter.  Then the WebStartEdit method calls the EditRecord method with this formed parameter.

This method should not be overridden in descendant classes.  You should override the EditRecord method in order to perform additional actions during the ‘POSTEDIT’ event.


TcxCustomWebDataSource.WriteActionName

TcxCustomWebDataSource          See Also

Writes a value for the ActionName property to a specific writer object stream.

procedure WriteActionName(Writer: TWriter); virtual;

Description

The WriteActionName method is used internally to write a value for the ActionName property to a writer object stream specified by the Writer parameter.

This is used to store the value of the unpublished ActionName property.  The DefineProperties method also declares the WriteFocusedRowIndex method to store the value of the unpublished FocusedRowIndex property.


TcxCustomWebDataSource.WriteFocusedRowIndex

TcxCustomWebDataSource          See Also

Writes a value for the FocusedRowIndex property to a specific writer object stream.

procedure WriteFocusedRowIndex(Writer: TWriter); virtual;

Description

The WriteFocusedRowIndex method is used to write a value for the FocusedRowIndex property to a specific writer object stream specified by the Writer parameter.

This is used to store the value of the unpublished FocusedRowIndex property.  The DefineProperties method also declares the WriteActionName method to store the value of the unpublished ActionName property.


TcxCustomWebDataSource.OnAfterPost

TcxCustomWebDataSource          See Also

Occurs after record data of the associated dataset is modified.

type

  TcxDataEvent = procedure (Sender: TObject; ARowIndex: Integer) of object;

property OnAfterPost: TDataEditEvent;

Description

Write an OnAfterPost event handler to perform specific actions immediately after an application posts changes to the active record.  The OnAfterPost event is invoked by the PostEdit method after it performs modification, deletion, or insertion of a record and sets the ActionName property to 'POSTEDIT' specified by the scxPostEditAction constant.

The Sender parameter is the data source component whose event handler is called.  The ARowIndex parameter specifies the index of the focused row whose data has been modified.


TcxCustomWebDataSource.OnBeforePost

TcxCustomWebDataSource          See Also

Occurs before an application posts changes made to the active record.

type

  TcxDataEvent = procedure (Sender: TObject; ARowIndex: Integer) of object;

property OnBeforePost: TDataEditEvent;

Description

Write an OnBeforePost event handler to perform specific actions before an application posts dataset changes.  The OnBeforePost event is invoked when an application calls the PostEdit method.

The Sender parameter is the data source component whose event handler is called.  The ARowIndex parameter specifies the index of the focused row whose data is being modified.

An application might use the OnBeforePost event to perform validity checks on data changes before committing them.


TcxCustomWebDataSource.OnCancelEdit

TcxCustomWebDataSource          See Also

Occurs after an application cancels changes to the active record.

type

  TcxDataEvent = procedure (Sender: TObject; ARowIndex: Integer) of object;

property OnCancelEdit: TDataEditEvent;

Description

Write an OnCancelEdit event handler to perform specific actions after an application cancels changes made to the active record.  The OnCancelEdit event is invoked by the CancelEdit method after it cancels a dataset operation (such as Edit, Insert, or Delete) and sets the ActionName property to 'CANCELEDIT' specified by the scxCancelEditAction constant.

The Sender parameter is the data source component whose event handler is called.  The ARowIndex parameter specifies the index of the focused row whose data was modified.


TcxCustomWebDataSource.OnDeleted

TcxCustomWebDataSource          See Also

Occurs after an application deletes a record.

type

  TcxDataEvent = procedure (Sender: TObject; ARowIndex: Integer) of object;

property OnDeleted: TDataEditEvent;

Description

Write an OnDeleted event handler to perform specific actions after an application deletes the active record in the corresponding dataset.  The OnDeleted event is called by the DeleteRecord method after it deletes the record and sets the ActionName property to 'DELETE' specified by the scxDeleteAction constant.

The Sender parameter is the data source component whose event handler is called.  The ARowIndex parameter specifies the index of a deleted record.


TcxCustomWebDataSource.OnDeleting

TcxCustomWebDataSource          See Also

Occurs before an application attempts to delete the active record.

type

  TcxDataEvent = procedure (Sender: TObject; ARowIndex: Integer) of object;

property OnDeleting: TDataEditEvent;

Description

Write an OnDeleting event handler to perform specific actions before an application deletes the active record of the corresponding dataset.  The OnDeleting event is called by the DeleteRecord method before it actually deletes a record.

The Sender parameter is the data source component whose event handler is called.  The ARowIndex parameter specifies the index of a row being deleted.


TcxCustomWebDataSource.OnInserted

TcxCustomWebDataSource          See Also

Occurs after an application inserts a new record.

type

  TcxDataEvent = procedure (Sender: TObject; ARowIndex: Integer) of object;

property OnInserted: TDataEditEvent;

Description

Write an OnInserted event handler to perform specific actions immediately after an application inserts a new record.  The InsertRecord method generates an OnInserted event after it inserts a new record, posts this record to the dataset and sets the ActionName property to 'INSERT' specified by the scxInsertAction constant.

The Sender parameter is the data source component whose event handler is called.  The ARowIndex parameter specifies the index of an inserted row.


TcxCustomWebDataSource.OnInserting

TcxCustomWebDataSource          See Also

Occurs before an application attempts to insert a new record.

type

  TcxDataEvent = procedure (Sender: TObject; ARowIndex: Integer) of object;

property OnInserting: TDataEditEvent;

Description

Write an OnInserting event handler to perform specific actions before an application inserts a new record.  The InsertRecord method generates the OnInserting event before it sets the dataset into an insert state.

The Sender parameter is the data source component whose event handler is called.  The ARowIndex parameter specifies the index of a row being inserted.


TcxCustomWebDataSource.OnScrolled

TcxCustomWebDataSource          See Also

Occurs after an application scrolls from one record to another.

type

  TcxDataEvent = procedure (Sender: TObject; ARowIndex: Integer) of object;

property OnScrolled: TScrollingEvent;

Description

Write an OnScrolled event handler to perform specific actions immediately after an application scrolls to another record.  The OnScrolled event is generated by the SetFocusedRowIndex after it makes a specific record active by changing the value of the FocusedRowIndex property.

The Sender parameter is the data source component whose event handler is called.  The ARowIndex parameter specifies the index of the destination row.


TcxCustomWebDataSource.OnScrolling

TcxCustomWebDataSource          See Also

Occurs before an application scrolls from one record to another.

type

  TcxDataEvent = procedure (Sender: TObject; ARowIndex: Integer) of object;

property OnScrolling: TScrollingEvent;

Description

Write an OnScrolling event handler to perform specific actions immediately before an application scrolls to another record.  The OnScrolling event is generated by the SetFocusedRowIndex before it activates a specific record by changing the value of the FocusedRowIndex property.

The Sender parameter is the data source component whose event handler is called.  The ARowIndex parameter specifies the index of the destination row.


TcxCustomWebDataSource.OnStartEdit

TcxCustomWebDataSource          See Also

Occurs before an application enters into edit mode for the active record.

type

  TcxDataEvent = procedure (Sender: TObject; ARowIndex: Integer) of object;

property OnStartEdit: TDataEditEvent;

Description

Write a OnStartEdit event handler to perform specific actions before an application enables editing of the active record.

The Sender parameter is the data source component whose event handler is called.  The ARowIndex parameter specifies the index of a row where move to.


TcxCustomWebDataSource.OnSetEditValue

TcxCustomWebDataSource

Fires before posting cell value changes to the dataset.

type

  TcxSetEditValueEvent = procedure(Sender: TObject; AItemIndex, ARowIndex: Integer; var AValue: Variant; var CanSet: Boolean) of object;

property OnSetEditValue: TcxSetEditValueEvent;

Description

Write an OnSetEditValue event handler to perform validation of a cell’s value before posting to the associated dataset.  This provides the chance to correct the changed value or to cancel changes.

The Sender parameter specifies the event sender.  The AItemIndex and ARowIndex parameters specify the cell column and row indexes respectively.  The AValue parameter contains the changed cell value, which you may modify if necessary.  The CanSet property specifies whether the change is actually to be posted.  Set this parameter to False to cancel the change.


TcxCustomWebDataSource.OnSetInsertValue

TcxCustomWebDataSource

Fires when inserting a new record into the dataset.

type

  TcxSetInsertValueEvent = procedure(Sender: TObject; AItemIndex, ARowIndex: Integer; var AValue: Variant; var CanSet: Boolean) of object;

property OnSetInsertValue: TcxSetInsertValueEvent;

Description

Write an OnSetInsertValue event handler to initialize cell values of a row being inserted to the associated dataset.  This is required when you want a new inserted row to have any default values other than blank.

The Sender parameter specifies the event sender.  The AItemIndex and ARowIndex parameters specify the cell’s column and row indexes respectively.  The AValue parameter transmits cell values.  You can specify a cell value via this parameter, if necessary.  The CanSet property specifies whether the cell value specified should be posted.  Set this parameter to False to leave the cell blank.


TcxWebDataLink
TcxWebDataLink Object

Hierarchy          Properties          Methods

Represents a helper class used by the TcxStdWebDataSource component for notification purpose.

Unit

cxWebData

TcxWebDataLink = class(TDataLink)

Description

The TcxWebDataLink class is a helper class used to provide notifications between the TcxStdWebDataSource component and its associated dataset component.


TcxWebDataLink Hierarchy
Hierarchy

TDataLink


Properties for TcxWebDataLink
TcxWebDataLink Properties

TcxWebDataLink          Legend

In TcxWebDataLink

WebDataSource


Methods for TcxWebDataLink
TcxWebDataLink Methods

TcxWebDataLink          Legend

In TcxWebDataLink

ActiveChanged

DataSetchanged


TcxWebDataLink.WebDataSource

TcxWebDataLink          See Also

Returns the corresponding web data source component.

property WebDataSource: TcxCustomWebDataSource;

Description

The WebDataSource property is used to provide access to the web data source component that should be notified about changes in its associated dataset.

ReadOnly property


TcxWebDataLink.ActiveChanged

TcxWebDataLink

Responds to changes in the Active property of the dataset associated with the corresponding data source component.

procedure ActiveChanged; override;

Description

The ActiveChanged method is used to notify the corresponding data source component about changes in the Active property of the associated dataset component.

As implemented in the TcxWebDataLink class, the ActiveChanged method calls the DataNotification method of the corresponding web data source component and passes the utLayout value as a parameter.


TcxWebDataLink.DataSetChanged

TcxWebDataLink

Responds to changes in the dataset associated with the corresponding data source component.

procedure DataSetChanged; override;

Description

The DataSetChanged method is used to notify the corresponding data source component about changes to the contents of the associated dataset component.

As implemented in the TcxWebDataLink class, the DataSetChanged method calls the DataNotification method of the corresponding web data source component and passes the utData value as a parameter.


TcxStdWebDataSource
 TcxStdWebDataSource Object

Hierarchy          Properties          Methods          Events          See Also

Provides an interface between a dataset component and data aware controls on a web page.

Unit

cxWebData

TcxStdWebDataSource = class(TcxCustomWebDataSource)

Description

Use the TcxStdWebDataSource component to provide a conduit between a dataset and data aware web controls on a web page that enable display, navigation, and editing of the data underlying the dataset.

All datasets must be associated with a web data source component if their data is to be displayed and manipulated in data aware web controls.  Similarly, each data aware web control needs to be associated with a data source component in order for the control to receive and manipulate data.

The TcxStdWebDataSource class represents a simple (standard) web data source component which allows the associated data aware web controls to display and edit data of the corresponding dataset.  If you want to perform additional data manipulations (such as grouping or sorting records) you should use extended versions of EWF’s data source component represented by the TcxWebDataSource or TcxWebDBDataSource classes.

The TcxStdWebDataSource component supports a set of custom events which you can handle straight on the client side.  These event types are specified by the TcxWebDataSourceEvent type.


TcxStdWebDataSource Hierarchy
Hierarchy

TComponent

     |

TcxCustomWebDataSource

     |

TcxWebComponent


Properties for TcxStdWebDataSource
TcxStdWebDataSource Properties

TcxStdWebDataSource          Legend

In TcxStdWebDataSource

DataSet

DataSource

Fields

Derived from TcxCustomWebDataSource

ActionName

AllowEditing

AllowExpanding

AllowGrouping

AllowSorting

ClientCount

Clients

DisplayTexts

FocusedRowIndex

FullName

KeyFieldName

LoadAllRecords

RecordCount

RowCount

Values

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxStdWebDataSource
TcxStdWebDataSource Methods

TcxStdWebDataSource          Legend

In TcxStdWebDataSource

CancelEdit

Create

DataNotification

DeleteRecord

Destroy

DoSetValues

EditRecord

GetDisplayText

GetFields

GetFocusedRowIndex

GetItemField

GetItemHelperClass

GetRecordCount

GetRowCount

GetRowDisplayText

GetRowValue

GetValue

InsertRecord

Loaded

NeedUpdateFields

Notification

PostEdit

RegisterActions

RegisterRenderers

RegisterValues

SetEditValue

SetFocusedRowIndex

SetValue

UpdateDefaultFields

UpdateValue

Derived from TcxCustomWebDataSource

CanEdit

CanSetValues

ChangedData

ClearGrouping

ClearSorting

DefineProperties

Expand

FieldByName

FullCollapse

FullExpand

GetAllowEditing

GetAllowExpanding

GetAllowGrouping

GetAllowSorting

GetGroupingItemCount

GetGroupingItemIndex

GetItemGroupIndex

GetItemHelperClass

GetItemSortOrder

GetRowExpanded

GetRowLevel

GetRowRecord

GetSortingItemCount

GetSortingItemIndex

GetWebActionsHelper

GetWebRenderHelper

GetWebValuesHelper

Group

ReadActionName

ReadFocusedRowIndex

Refresh

RegisterClient

SetRecordCount

Sort

UnGroup

UnRegisterClient

UpdateDataLayout

WebCancelEdit

WebDelete

WebInsert

WebMoveBy

WebMoveTo

WebPostEdit

WebRefresh

WebStartEdit

WriteActionName

WriteFocusedRowIndex

Derived from TcxWebComponent

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterActions

RegisterEvents

RegisterRenderers

RegisterValues

ScriptsSubscription

SetState

StyleChanged

ValidateContainer


Events for TcxStdWebDataSource
TcxStdWebDataSource Events

TcxStdWebDataSource          Legend

Derived from TcxCustomWebDataSource

OnAfterPost

OnBeforePost

OnCancelEdit

OnDeleted

OnDeleting

OnInserted

OnInserting

OnScrolled

OnScrolling

OnSetEditValue

OnSetInsertValue

OnStartEdit

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxStdWebDataSource.DataSet

TcxStdWebDataSource          See Also

Specifies the dataset for which the data source component serves as a conduit to data aware web controls.

property DataSet: TDataSet;

Description

Set the DataSet property to the name of an existing dataset component either at design time, or at runtime.  By changing the value of the DataSet property at runtime an application can effectively use the same data aware web controls to display and edit data in different datasets.


TcxStdWebDataSource.DataSource

TcxStdWebDataSource          See Also

Represents a standard data source object used to provide internal interactions.

property DataSource: TDataSource;

Description

The DataSource property is used internally to provide interaction between the data source component and the corresponding data link object.  The data link object is used to notify the data source about changes in the underlying dataset.

This is an internally used protected property.


TcxStdWebDataSource.Fields

TcxStdWebDataSource          See Also

Represents a collection of fields available for data aware web controls.

property Fields: TcxStdWebDataFields;

Description

Use the Fields property to access field objects at the data source level.

A data source component implements the Fields property to provide access to its own field collection represented by the TcxStdWebDataFields class.  This collection contains field objects (Items property of the TcxStdWebDataField type) which correspond to the fields of the associated dataset.  Field objects of the Fields collection are created automatically based on the current structure of the dataset fields.

Accessing fields with the Fields property is useful for applications that:

•	Iterate over some or all fields in a dataset.

•	Perform additional operations with the dataset data (such as grouping and sorting) based upon the value of a specific field from the Fields collection.

•	Work with underlying tables (represented by a dataset) whose internal data structure is unknown at runtime.

The Fields property of the TcxStdWebDataSource class overrides the Fields property of the TcxCustomWebDataSource class.


TcxStdWebDataSource.CancelEdit

TcxStdWebDataSource          See Also

Cancels modifications to the active record if not yet posted.

procedure CancelEdit; override;

Description

Call the CancelEdit method to undo modifications made to values of one or more fields belonging to the active record of the corresponding dataset.  As long as those changes are not posted, the CancelEdit method returns the record to its previous state.

As implemented in the TcxStdWebDataSource class, the CancelEdit method performs the following actions.

•	Checks whether the last performed action is a new record insert (the ActionName property value equals ‘INSERT‘) and deletes the newly created record from the corresponding dataset, if true.

•	Sets the ActionName property to ‘CANCELEDIT‘ specified by the scxCancelEditAction constant.

•	Invokes the OnCancelEdit event (if its handler is assigned).

Typically the CancelEdit method is used to back out of changes in response to user request, or in field validation routines that back out illegal field values.

The CancelEdit method of the TcxStdWebDataSource class overrides the CancelEdit method of the TcxCustomWebDataSource class.


TcxStdWebDataSource.Create

TcxStdWebDataSource          See Also

Creates an instance of a TcxStdWebDataSource component.

constructor Create(AOwner: TComponent); override;

Description

Use the Create method to instantiate a data source component at runtime.  Data source components added to a form at design time are automatically created. The AOwner parameter specifies the owner of the data source component (typically, the page module).

The Create method calls its inherited constructor and initializes the Fields property by creating an empty fields list for the TcxStdWebDataFields type.


TcxStdWebDataSource.DataNotification

TcxStdWebDataSource          See Also

Responds to notifications that data is being modified (in the dataset or data controls).

procedure DataNotification(AUpdateType: TcxUpdateType); override;

Description

The DataNotification method responds to data changes in the associated dataset or client control. The AUpdateType parameter specifies whether the dataset or client controls should update their data.

If you design a custom data source component, you can override the DataNotification method to perform specific actions in response to data changes.

The DataNotification method overrides the DataNotification method of the TcxCustomWebDataSource class.


TcxStdWebDataSource.DeleteRecord

TcxStdWebDataSource          See Also

Deletes a specific record for the corresponding dataset and positions the dataset on the next record.

procedure DeleteRecord(ARowIndex: Integer); override;

Description

Use the DeleteRecord method to remove a record specified by the ARowIndex parameter from a database underlying the corresponding dataset.

Note: Note that the ARowIndex parameter is zero-based (it is assumed that the first dataset record is specified by the ARowIndex parameter which equals 0).  Standard Delphi dataset components assume their first record index to be 1.

The DeleteRecord method performs the following actions:

•	Checks the value returned by the CanEdit method to determine whether the dataset can be edited.  If the return value is False, the DeleteRecord method performs nothing and sets the ActionName property to 'CANCELEDIT' specified by the scxCancelEditAction constant.

•	Invokes the OnDeleting event handler (if it is assigned).

•	Positions the corresponding dataset on a record specified by the ARowIndex parameter.

•	Forces the corresponding dataset to delete its active record.

•	Sets the ActionName property to 'DELETE' specified by the scxDeleteAction constant.

•	Invokes the OnDeleted event handler (if it is assigned).

The DeleteRecord method overrides the DeleteRecord method of the TcxCustomWebDataSource class.


TcxStdWebDataSource.Destroy

TcxStdWebDataSource          See Also

Destroys the TcxStdWebDataSource object.

destructor Destroy; override;

Description

The Destroy method is used to destroy an instance of the TcxStdWebDataSource object and to free any allocated memory. Do not call the Destroy method directly.  Instead, call the Free method, which checks that the data source reference is not nil before calling the Destroy method.

The Destroy method frees the Fields property before calling the inherited destructor for the TcxStdWebDataSource component.


TcxStdWebDataSource.EditRecord

TcxStdWebDataSource          See Also

Prepares the corresponding dataset to edit a specific record.

procedure EditRecord(ARowIndex: Integer); override;

Description

Use the EditRecord method to prepare the corresponding dataset to modify data for the record specified by the ARowIndex parameter.

Note: Note that the ARowIndex parameter is zero-based (it is assumed that the first dataset record is specified by the ARowIndex parameter which equals 0).  Standard Delphi dataset components assume their first record index to be 1.

The EditRecord method performs the following actions:

•	Checks the value returned by the CanEdit method to determine whether the dataset can be edited.  If the returned value is False, the EditRecord method performs nothing and sets the ActionName property to 'CANCELEDIT' specified by the scxCancelEditAction constant.

•	Positions the corresponding dataset on a record specified by the ARowIndex parameter.

•	Sets the ActionName property to 'STARTEDIT' specified by the scxStartEditAction constant.

The EditRecord method overrides the EditRecord method of the TcxCustomWebDataSource class.


TcxStdWebDataSource.GetDisplayText

TcxStdWebDataSource          See Also

Returns the value of the DisplayTexts property.

function GetDisplayText(ARecordIndex, AItemIndex: Integer): string; override;

Description

The GetDisplayText method is used to return a string representation of a specific field’s value for display in data aware web controls. The ARecordIndex parameter specifies the index of a dataset record whose value is accessed.

Note: Note that the ARecordIndex parameter is zero-based (it is assumed that the first dataset record is specified by the ARecordIndex parameter which equals 0).  Standard Delphi dataset components assume their first record index to be 1.

The AItemIndex parameter represents the index of the field whose value is obtained.

The GetDisplayText method overrides the GetDisplayText method of the TcxCustomWebDataSource class.


TcxStdWebDataSource.GetFields

TcxStdWebDataSource          See Also

Returns the value of the Fields property.

function GetFields: TcxStdWebDataFields;

Description

The GetFields method overrides the GetFields method of the TcxCustomWebDataSource class to perform checked typecast and to return the Fields property value represented by the TcxStdWebDataFields class.

If you design your custom data source component, you can override the GetFields method to return a desired Fields property value type.


TcxStdWebDataSource.GetFocusedRowIndex

TcxStdWebDataSource          See Also

Returns the value of the FocusedRowIndex property.

function GetFocusedRowIndex: Integer; override;

Description

The GetFocusedRowIndex method returns the index of the active record within the associated dataset.

The GetFocusedRowIndex method is used to return an integer that specifies the position of the active record within the dataset’s recordset.  If a dataset is not assigned for the data source component or the corresponding dataset is not active, the GetFocusedRowIndex method returns 0.  Otherwise, the GetFocusedRowIndex method returns a number between 0 and the total number of rows in the recordset (reflected in the RecordCount or RowCount properties) decremented by one.

The GetFocusedRowIndex method overrides the GetFocusedRowIndex method of the TcxCustomWebDataSource class.


TcxStdWebDataSource.GetItemField

TcxStdWebDataSource          See Also

Finds a dataset field based on the name of the corresponding data source field.

function GetItemField(AItemName: string): TField;

Description

The GetItemField method is used to retrieve a dataset field that is specified by the name of the corresponding field from the Fields collection of the data source component.

The AItemName parameter is the name (the Name property value) of an existing field from the Fields collection. The GetItemField method returns the TField object that represents the specified field.  If the specified field does not exist, the GetItemField method raises an EDatabaseError exception.


TcxStdWebDataSource.GetItemHelperClass

TcxStdWebDataSource          See Also

Returns an appropriate helper class for a specific item within the Fields collection.

function GetItemHelperClass(AItemIndex: Integer): TcxDataFieldHelperClass; override;

Description

Field components from the Fields collection provide access to data in a particular field (column) of the associated dataset.  Generally speaking, a single field represents the characteristics of a single dataset field (for instance, it specifies column data type).  Data source fields delegate their type-specific functionality to specially designed helper classes.

Any individual field helper class can convert field specific data types into their string representation, which can be used when generating the resulting HTML code.

The GetItemHelperClass method returns an appropriate helper class based upon the data type of a field specified by the AItemIndex parameter.

The GetItemHelperClass method overrides the GetItemHelperClass method of the TcxCustomWebDataSource class.


TcxStdWebDataSource.GetRecordCount

TcxStdWebDataSource          See Also

Returns the value of the RecordCount property.

function GetRecordCount: Integer; override;

Description

The GetRecordCount method returns the total number of records in the recordset of the associated dataset component.  If a dataset is not assigned to the data source component or the dataset is not active, the GetRecordCount method returns 0.  Otherwise, it returns the value of the RecordCount property for the corresponding dataset.

The GetRecordCount method overrides the GetRecordCount method of the TcxCustomWebDataSource class.


TcxStdWebDataSource.GetRowCount

TcxStdWebDataSource          See Also

Returns the value of the RowCount property.

function GetRowCount: Integer; override;

Description

Generally, the GetRowCount method is designed to return the total number of rows (including grouped rows) that represent an associated dataset in its current state.  Since the TcxStdWebDataSource component does not allow for data grouping, there are no additional grouping rows and the GetRowCount method is equal to the GetRecordCount method.

If a dataset is not assigned to the data source component or the dataset is not active, the GetRowCount method returns 0.  Otherwise, it returns the total number of records in the recordset of the corresponding dataset component (in other words, the value of the RecordCount property of the dataset).

The GetRowCount method overrides the GetRowCount method of the TcxCustomWebDataSource class.


TcxStdWebDataSource.GetRowDisplayText

TcxStdWebDataSource          See Also

Returns a specific field’s value as it should be displayed in data aware web controls.

function GetRowDisplayText(RowIndex: Integer; ItemIndex: Integer): string; override;

Description

Since the TcxStdWebDataSource component does not allow you to perform data grouping, there are no additional grouping rows whose field values can be processed by the GetRowDisplayText method.  So this method performs the same actions as the GetDisplayText method and returns the value of the DisplayTexts property.

The RowIndex parameter specifies the index of a dataset record.  The ItemIndex parameter represents the index of the field whose value is accessed.

If a dataset is not assigned to the data source component or the dataset is not active, the GetRowDisplayText method returns an empty string.  Otherwise, it returns a string value which is equivalent to the value of the DisplayTexts property.

The GetRowDisplayText method overrides the GetRowDisplayText method of the TcxCustomWebDataSource class.


TcxStdWebDataSource.GetRowValue

TcxStdWebDataSource          See Also

Returns a specified field value from within a specified dataset record.

function GetRowValue(RowIndex: Integer; ItemIndex: Integer): Variant; override;

Description

The GetRowValue method is used to return the value of a specific field contained within a dataset record specified by the RowIndex parameter. The RowIndex parameter specifies the index of the dataset record.  The ItemIndex parameter is the index of the field whose value is accessed.

If a dataset is not assigned to the data source component or the dataset is not active, the GetRowValue method returns varEmpty.  Otherwise, it returns a specified field’s value.  As implemented in the TcxStdWebDataSource class, the GetRowValue method returns the same value (Variant) as the GetValue method.

The GetRowValue method overrides the GetRowValue method of the TcxCustomWebDataSource class.


TcxStdWebDataSource.GetValue

TcxStdWebDataSource          See Also

Returns the value of the Values property.

function GetValue(ARecordIndex, AItemIndex: Integer): Variant; override;

Description

The GetValue method is used to return a value of a specific field that is contained within a dataset record specified by the ARecordIndex parameter.  The ItemIndex parameter is the index of the field whose value is accessed.

If a dataset is not assigned to the data source component or the dataset is not active, the GetValue method returns varEmpty.  Otherwise, it returns a specified field’s value.

The GetValue method overrides the GetValue method of the TcxCustomWebDataSource class.


TcxStdWebDataSource.InsertRecord

TcxStdWebDataSource          See Also

Inserts a new record to the dataset and posts it to the database.

procedure InsertRecord(ARowIndex: Integer); override;

Description

Use the InsertRecord method to create a new empty record in the dataset and write this record to the database.  The ARowIndex parameter specifies the index of a newly created record.  After creation, the new record becomes the active record.

The InsertRecord method performs the following actions:

•	Checks the value returned by the CanEdit method to determine whether the dataset can be edited.  If the return value is False, the InsertRecord method performs nothing and sets the ActionName property to 'CANCELEDIT' specified by the scxCancelEditAction constant.

•	Invokes the OnInserting event (if its handler is assigned).

•	Forces the corresponding dataset component to insert a new record to the position specified by the ARowIndex parameter.

•	Sets the ActionName property to 'INSERT' specified by the scxInsertAction constant.

•	Invokes the OnInserted event (if its handler is assigned).

The InsertRecord method overrides the InsertRecord method of the TcxCustomWebDataSource class.


TcxStdWebDataSource.DoSetValues

TcxStdWebDataSource          See Also

Sets the ActionName and FocusedRowIndex properties to the values arrived within a request.

procedure DoSetValues; override;

Description

This method overrides the DoSetValues method (of the TcxCustomWebDataSource class) which implements the DoSetValues method of the IcxWebValues interface.  The DoSetValues method is used to set the values arrived within a request to the data source component’s ActionName and FocusedRowIndex properties.


TcxStdWebDataSource.Loaded

TcxStdWebDataSource          See Also

Initializes the data source component after the form file has been read into memory.

procedure Loaded; override;

Description

Do not call the protected Loaded method.  The streaming system calls this method after it loads the component’s form from a stream. After calling the inherited Loaded method, this method initializes the FocusedRowIndex property.

The Loaded method overrides the Loaded method of the TcxCustomWebDataSource class.


TcxStdWebDataSource.NeedUpdateFields

TcxStdWebDataSource          See Also

Returns a value that specifies whether the Fields list should be updated.

function NeedUpdateFields: Boolean; override;

Description

The NeedUpdateFields method is used to verify whether the Fields list of the data source component properly coincides with a collection of data fields in the corresponding dataset. The NeedUpdateFields method returns True if the Fields list of the data source component should be updated due to changes within the corresponding dataset.

This method overrides the NeedUpdateFields method of the TcxCustomWebDataSource class.


TcxStdWebDataSource.Notification

TcxStdWebDataSource          See Also

Responds to notifications that web components are being created or destroyed.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

The Notification method is called automatically when the component specified by the AComponent parameter is about to be created or destroyed, as specified by the Operation parameter.

The Notification method of the TcxStdWebDataSource component responds to deleting the associated dataset component.  This method sets the DataSet property to nil in such a case.


TcxStdWebDataSource.PostEdit

TcxStdWebDataSource          See Also

Posts changes to the associated dataset.

procedure PostEdit(APriorControlName: string); override;

Description

Use the PostEdit method to modify record data for the associated dataset.  Calling this method implies calling the ChangedData method with a APriorControlName parameter.  It posts the changes made by data controls that make use of the data source component, to the associated dataset.

The APriorControlName parameter specifies the name of a prior data control (if any).  Its values will be used to modify a record field (fields) of the corresponding dataset regardless of values from other data controls bound to the same record field (fields).

The PostEdit method performs the following actions:

•	Checks the value returned by the CanEdit method to determine whether the dataset can be edited.  If the return value is False, the PostEdit method performs nothing and sets the ActionName property to 'CANCELEDIT' specified by the scxCancelEditAction constant.

•	Invokes the OnBeforePost event (if its handler is assigned).

•	Calls the ChangedData method to modify the corresponding dataset data.

•	Sets the ActionName property to 'POSTEDIT' specified by the scxPostEditAction constant.

•	Invokes the OnAfterPost event (if its handler is assigned).

The PostEdit method overrides the PostEdit method of the TcxCustomWebDataSource class.


TcxStdWebDataSource.RegisterActions

TcxStdWebDataSource          See Also

Registers server side events that can be handled by the data source component.

procedure RegisterActions; override;

Description

This method is designed to register server side events (actions) that can be handled by the data source component.  Registering an action implies calling the RegisterAction method of the TcxWebActionsHelper object (WebActionsHelper property).  The parameters transmitted to this method are the name of the event and the handler.

The RegisterActions method registers server side events regarding data navigation or modification within the corresponding dataset.  You should also override this method if designing a data source component that must handle server-side events. Only the server side events that  are invoked by the client side of the application should be registered.

Note: It is recommended to register your event with an empty string name.  This allows EWF to avoid errors, when the __ACTIONNAME hidden input (specifying the event name) is transmitted empty.  An error should only occur if the __TARGETNAME hidden input (specifying the component) is not empty.

The RegisterActions method overrides the RegisterActions method of the TcxCustomWebDataSource class.


TcxStdWebDataSource.RegisterRenderers

TcxStdWebDataSource          See Also

Registers renderer classes, which render the HTML code representing the data source component for a particular browser.

procedure RegisterRenderers; override;

Description

This method is used internally to register the renderer classes (TcxWebRenderer descendants), that render HTML code representing the data source component (for instance, specific hidden inputs that contain necessary information regarding the data connection) for a particular browser.  This provides multi-browser support.  Registering a renderer class implies calling the RegisterRenderer method of the TcxWebRenderHelper object (WebRenderHelper property).

The RegisterRenderers method of the TcxCustomWebDataSource class registers the renderer classes providing HTML code representing the data source component within Internet Explorer and Netscape Navigator 4.0 browsers.  The renderer class for Internet Explorer browser is the default.

The RegisterRenderers method overrides the RegisterRenderers method of the TcxCustomWebDataSource class.


TcxStdWebDataSource.RegisterValues

TcxStdWebDataSource          See Also

Registers HTML elements that contain data related to a data source component.

procedure RegisterValues; override;

Description

This method overrides the RegisterValues method (of the TcxCustomWebDataSource class) which implements the RegisterValues method of the IcxWebValues interface.  It is designed to register the IDs of the HTML elements displaying the component’s data or containing auxiliary information.  Registering a value implies calling the RegisterValue method of the TcxWebValuesHelper object (WebValuesHelper property).

The RegisterValues method simply calls the inherited RegisterValues method which registers two hidden inputs.  The first is designed to contain the name of the action (an ActionName property value) applied to the associated dataset.  The second hidden input contains the index of the focused row (a FocusedRow property value).  This allows the data source component to update itself after a user has performed actions against corresponding dataset data (such as navigation through records; record creation, deletion, modification).

If you design custom data source class/component you can override the RegisterValues method in order to register the additional HTML elements, which values are required for component’s proper functioning.


TcxStdWebDataSource.SetEditValue

TcxCustomWebDataSource          See Also

Posts an entered value to a specified field of an inserted record.

procedure SetEditValue(AItemIndex: Integer; AValue: Variant); override;

Description

The SetEditValue method assigns a value specified by the Value parameter to a specific dataset field of a newly inserted record.  The ItemIndex parameter is the index of a field whose value is being set by the SetEditValue method.  The AValue parameter contains the edited cell value.

Note that the SetEditValue method invokes the OnSetEditValue event if its handler is assigned.

The SetEditValue method overrides the SetEditValue method of the TcxCustomWebDataSource class.


TcxStdWebDataSource.SetFocusedRowIndex

TcxStdWebDataSource          See Also

Sets the value of the FocusedRowIndex property.

procedure SetFocusedRowIndex(Value: Integer); override;

Description

The SetFocusedRowIndex method is used to assign a value specified by the Value parameter to the FocusedRowIndex property.

The Value parameter specifies the index of the focused record in the corresponding dataset.

The SetFocusedRowIndex method performs the following actions:

•	Invokes the OnScrolling event (if its handler is assigned).

•	Changes the focused row index (sets the FocusedRowIndex property to the value of the Value parameter).  This action is performed only if a dataset is assigned to the data source component and the dataset is active.

•	Invokes the OnScrolled event (if its handler is assigned).

The SetFocusedRowIndex method overrides the SetFocusedRowIndex method of the TcxCustomWebDataSource class.


TcxStdWebDataSource.SetValue

TcxStdWebDataSource          See Also

Sets the value for the Values property.

procedure SetValue(ARecordIndex, AItemIndex: Integer; const Value: Variant); override;

Description

The SetValue method is used to assign a value specified by the Value parameter to a specific dataset field.  The ARecordIndex parameter specifies the index of a dataset record.  The ItemIndex parameter is the index of a field whose value is set.

The SetValue method overrides the SetValue method of the TcxCustomWebDataSource class.


TcxStdWebDataSource.UpdateDefaultFields

TcxStdWebDataSource          See Also

Updates dynamically generated field components for the data source.

procedure UpdateDefaultFields; override;

Description

A data source component implements the Fields property to provide access to a collection of field objects that correspond to the fields of the associated dataset.  By default, fields of the corresponding dataset are dynamic (dataset uses default fields).  Field objects of the Fields collection are created automatically based on the current field structure of the dataset component.

The UpdateDefaultFields method is used internally to update field objects specified by the Fields property in response to changes to dataset fields (if the corresponding dataset uses default fields).

The UpdateDefaultFields method overrides the UpdateDefaultFields method of the TcxCustomWebDataSource class.


TcxStdWebDataSource.UpdateValue

TcxStdWebDataSource          See Also

Updates the value of a specific field.

procedure UpdateValue(AItem: TcxCustomWebDataField; AValue: Variant); override;

Description

The UpdateValue method is used to assign a value specified by the AValue parameter to the specified field within the current record.  The field is specified via the AItem parameter.

This method is called when the value of a specific field from the Fields collection should be updated as a result of dataset changes.  This allows data aware web controls, which are bound to this field, to display proper field values.

The UpdateValue method overrides the UpdateValue method of the TcxCustomWebDataSource class.


cxWebGraphics Unit Overview
cxWebGraphics Unit

Classes

TcxWebFont

TcxWebFontSize

Other Types

TcxWebFontDecoration

TcxWebFontDecorations

TcxWebFontStyle

TcxWebFontTransform

TcxWebFontVariant

TcxWebFontWeight

TcxWebUnit


TcxWebFont
TcxWebFont Object

Hierarchy          Properties          Methods          Events

Specifies font characteristics.

Unit

cxWebGraphics

TcxWebFont = class(TPersistent)

Description

The TcxWebFont class describes font characteristics used when displaying text. Its properties define a set of characters by specifying the height, font family (typeface), attributes (such as bold or italic) and so on.

Use the TcxWebStyleController component to specify styles for controls, including font style.  The TcxWebStyleController contains items of type TcxWebStyleItem, each of which controls a style via the TcxWebStyle object.  The last object controls font style via its Font property represented by the TcxWebFont class.


TcxWebFont Hierarchy
Hierarchy

TPersistent


Properties for TcxWebFont
TcxWebFont Properties

TcxWebFont          Legend

In TcxWebFont

Bold

Color

Decoration

Italic

Name

Names

Overline

Size

Strikeout

Style

Transform

Underline

UpdateCount

Variant

Weight


Methods for TcxWebFont
TcxWebFont Methods

TcxWebFont          Legend

In TcxWebFont

Assign

BeginUpdate

Changed

Create

Destroy

EndUpdate

WriteDecoration

WriteHTML

WriteStyle

WriteTransform

WriteVariant

WriteWeight


Events for TcxWebFont
TcxWebFont Events

TcxWebFont          Legend

In TcxWebFont

OnChange


TcxWebFont.Bold

TcxWebFont          See Also

Indicates whether the current text should be displayed in bold.

property Bold: Boolean;

Description

Use the Bold property to determine whether the current text should be formatted in bold.  If set to True the font is bold; otherwise it is not.

Note: The Bold property affects the Weight property value and vice versa.  If one sets the Bold property to True the Weight property is automatically set to wfwBold.  If the Weight property is set to either to wfwBold or wfw700, the Bold property is automatically set to True.


TcxWebFont.Color

TcxWebFont          See Also

Specifies the color of the text.

property Color: TcxWebColor;

Description

Use the Color to specify the color of text characters (as opposed to background color).


TcxWebFont.Decoration

TcxWebFont          See Also

Specifies whether the text has line-through, overline, or underline decorations.

TcxWebFontDecoration = (wfdNone, wfdUnderline, wfdOverline, wfdLineThrough);

TcxWebFontDecorations = set of TcxWebFontDecoration;

property Decoration: TcxWebFontDecorations;

Description

Use the Decoration property to specify a set of decorations for the current font.  The table below explains the meaning of each in particular element.  The Decoration property affects the text-decoration CSS attribute.

Value	Description
wfdNone	Text font has no Decoration.
wfdUnderline	Text font is underlined.  The Underline property is automatically set to True, in such an instance.
wfdOverline	Text font is over lined.  The Overline property is automatically set to True, in such an instance.
wfdLineThrough	Text font has line passing through it.  The StrikeOut property is automatically set to True, in such an instance.

You can combine decorations to achieve a desired font effect.

The default value of the Decoration property is an empty set.


TcxWebFont.WriteHTML

TcxWebFont          See Also

Renders HTML code representing the font style.

procedure WriteHTML(HTMLTextBuilder: TcxHTMLTextBuilder);

Description

The WriteHTML method is used to render HTML code representing the font style.  The HTMLTextBuilder parameter represents an object which provides a means by which to render HTML code.  Each of its method writes text to the internal buffer.

ReadOnly Property


TcxWebFont.Italic

TcxWebFont          See Also

Specifies whether the current text is formatted as italic.

property Italic: Boolean;

Description

Use the Italic property to specify whether the current text is formatted as italic.  If set to True, the font is formatted italic, otherwise not.

Note: The Italic property affects the Style property and vice versa.  If one sets the Italic property to True, the Style property is set to wfsItalic.  If the Style property is set to either of wfsItalic or wfsOblique the Italic property is set to True.


TcxWebFont.Name

TcxWebFont          See Also

Specifies the typeface of the font.

property Name: string;

Description

Use the Name property to specify the typeface of the font.  If the font specified by the Name property does not exist on the client system, a valid font is taken from the list of fonts specified by the Names property.

Note:	If the combination of font family (typeface) and attributes (such as bold or italic) specifies a font that is not available on the system, the system substitutes a different font.


TcxWebFont.Names

TcxWebFont          See Also

Provides a list of alternative font names with a generic font family at the end of the list.

property Names: TStrings;

Description

The font’s typeface is specified by the Name property.  If such font does not exist in client’s system the system searches the Names property for one that is installed.

Use the Names property to enumerate a number of font names to be used by the client browser in case the font specified by the Name property is not installed.

Consider the situation when you set the Name property to, for example, "Verdana" and the client browser does not find such a font installed in the system.  The client browser sequentially tries each font from the internal list provided by the Names property to see if it is installed locally and if successful, the browser substitutes "Verdana" with the first font it locates.  If none of the fonts from the list are installed, the client browser applies the default system font, usually "Times New Roman".

In addition to the list of fonts, the Names property can contain a list of generic font families.  It represents groups of fonts common in style and size among which client browsers search for an appropriate one.

The first string in the Names property is always the font name specified by the Name property. The result of the property is used to generate the font-family CSS attribute.


TcxWebFont.OnChange

TcxWebFont          See Also

Occurs immediately after the font object changes.

property OnChange: TNotifyEvent;

Description

Write an OnChange event handler to take specific action when the font object changes. The properties of the font object reflect the new settings when OnChange occurs.


TcxWebFont.Overline

TcxWebFont          See Also

Specifies whether the current font is overlined.

property Overline: Boolean;

Description

Use the Overline property to specify whether a line is displayed over text.  Setting the value of this property to True adds wfdOverline to the Decoration property.  Setting the Overline property to False, removes this value from the set.


TcxWebFont.Size

TcxWebFont          See Also

Specifies the height of the font.

property Size: TcxWebFontSize;

Description

Use Size to specify font size.  The Size property uses the TcxWebFontSize object whose properties control both font size and units in which it is defined.


TcxWebFont.Strikeout

TcxWebFont          See Also

Specifies whether the current font has a strikeout appearance

property Strikeout: Boolean;

Description

Use the Strikeout property to specify whether a line is drawn through text.  Setting the value for this property to True adds wfdLineThrough to the Decoration property.  Setting the Overline property to False, removes this value from the set.


TcxWebFont.Style

TcxWebFont          See Also

Determines whether the font is normal, italic, or underlined.

TcxWebFontStyle = (wfsNotSet, wfsNormal, wfsItalic, wfsOblique);

property Style: TcxWebFontStyle;

Description

Use the Style property to add special characteristics to characters that use a font style.

Value	Description
wfsNotSet	Font style is not specified.  The font-style CSS font attribute is not generated.
wfsNormal	Font is normal.
wfsItalic	Font is italic.  Resembles hand-written font and unlike the oblique style, represents independent fonts.
wfsOblique	Font is italic.  Internet Explorer 4.0 renders italic and oblique identically.

The default value of the Style property is wfsNotSet.


TcxWebFont.Transform

TcxWebFont          See Also

Specifies the text type rendering.

TcxWebFontTransform = (wftNotSet, wftCapitalize, wftUppercase, wftLowercase, wftNone);

property Transform: TcxWebFontTransform;

Description

Use the Transform property to change the manner text is rendered.

Value	Description
wftNotSet	The Transform property is not set.  The font-transform CSS font attribute is not generated.
wftCapitalize	Transforms the first character of each word to uppercase.
wftUppercase	Transforms all characters to uppercase.
wftLowercase	Transforms all characters to lowercase.
wftNone	Text is not transformed.

The default value of the Transform property is wftNotSet.


TcxWebFont.Underline

TcxWebFont          See Also

Specifies whether the text is underlined.

property Underline: Boolean;

Description

Use the Underline property to specify whether a line is displayed under text.  Setting the value of this property to True adds wfdUnderline to the Decoration property.  Setting the Underline property to False, removes this value from the set.


TcxWebFont.UpdateCount

TcxWebFont          See Also

Indicates whether the TcxWebFont object responds to value changes.

property UpdateCount: Integer;

Description

BeginUpdate and EndUpdate method calls are used to temporarily prevent the font object from responding to property value changes.  Each BeginUpdate method call increments the UpdateCount property.  Each EndUpdate method call decrements it.  The font object notifies the owning style object of its changes only when the UpdateCount property value is 0.

ReadOnly Property


TcxWebFont.Variant

TcxWebFont          See Also

Specifies whether the text is displayed using small letters.

TcxWebFontVariant = (wfvNotSet, wfvNormal, wfvSmallCaps);

property Variant: TcxWebFontVariant;

Value	Description
wfvNotSet	The value is not set.  The font-variant CSS attribute is not generated.
wfvNormal	Font is normal.
wfvSmallCaps	Lowercase letters are displayed as small capital letters.

The default value of the Variant property is wfvNotSet.


TcxWebFont.Weight

TcxWebFont          See Also

Specifies font weight.

TcxWebFontWeight = (wfwNotSet, wfwNormal, wfwBold, wfwBolder, wfwLighter, wfw100, wfw200, wfw300, wfw400, wfw500, wfw600, wfw700, , wfw900);

property Weight: TcxWebFontWeight;

Description

Use the Weight property to specify the weight of the object’s font.  The Weight property affects the font-weight CSS font attribute.

Value	Description
wfwNotSet	Weight is not set.  The font-weight CSS attribute is not generated.
wfwNormal	Normal font.
wfwBold	Font is bold.
wfwBolder	Font is heavier than regular bold.
wfwLighter	Font is lighter than normal.
wfw100	Font is at least as light as 200.
wfw200	Font is at least as bold as 100 and at least as light as 300.
wfw300	Font is at least as bold as 200 and at least as light as 400.
wfw400	Normal font.
wfw500	Font is at least as bold as 400 and at least as light as 600.
wfw600	Font is at least as bold as the 500 and at least as light as 700.
wfw700	Font is bold.
wfw800	Font is at least as bold as 700 and at least as light as the 900 weight.
wfw900	Font is at least as bold as 800.
Note: The Bold property affects the Weight property value and vice versa.  If one sets the Bold property to True the Weight property is automatically set to wfwBold value.  If the Weight property is set to either to wfwBold or wfw700, the Bold property is set to True.

The default value of the Weight property is wfwNotSet.


TcxWebFont.Assign

TcxWebFont          See Also

Copies the contents of one TcxWebFont object from another.

procedure Assign(Source: TPersistent); override;

Description

Call the Assign method to copy the contents of the specified TcxWebFont object from another.  The source object is specified by the Source parameter.  The caller of the method is the destination object.  If Source is another TcxWebFont object, Assign method performs the following actions:

•	calls the BeginUpdate method of the caller;

•	assigns the Color, Decoration, Name, Names, Size, Style, Transform, Variant and Weight property values for the source object to the destination object;

•	calls the EndUpdate method of the caller.


TcxWebFont.BeginUpdate

TcxWebFont          See Also

Forces the TcxWebFont object to not respond to property value changes.

procedure BeginUpdate;

Description

The BeginUpdate and EndUpdate method calls are used to temporarily prevent the font object from responding to property value changes.


TcxWebFont.Changed

TcxWebFont          See Also

Responds to property value changes.

procedure Changed; dynamic;

Description

The Changed method is invoked each time a property value changes.  This method calls the OnChange event handler, if assigned.

Responding to property value changes can be temporarily blocked via the BeginUpdate and EndUpdate method calls.


TcxWebFont.Create

TcxWebFont          See Also

Creates an instance of the TcxWebFont class.

constructor Create;

Description

The Create method is used to initialize the TcxWebFont object.  It sets properties to their default values after calling the inherited constructor.  The Create method also initializes the Size and Names properties.

The TcxWebFont object is automatically created when the owning TcxWebStyle object is created.


TcxWebFont.WriteDecoration

TcxWebFont          See Also

Generates HTML code for the text-decoration CSS attribute.

procedure WriteDecoration(HTMLTextBuilder: TcxHTMLTextBuilder); virtual;

Description

The WriteHTML method delegates a part of its work for HTML rendering to the WriteDecoration method to generate HTML code which represents the text-decoration CSS attribute.  The HTMLTextBuilder parameter represents an object which provides a means to render HTML code.  Each of its method writes text to the internal buffer.


TcxWebFont.Destroy

TcxWebFont          See Also

Destroys the TcxWebFont object.

destructor Destroy; override;

Description

The Destroy method is used to dispose of the TcxWebFont object and free any allocated memory.  It frees the Size and Names properties before calling the inherited destructor.

Do not call the Destroy method in applications.  The TcxWebFont object is disposed of automatically when the owning TcxWebStyle object is destroyed.


TcxWebFont.EndUpdate

TcxWebFont          See Also

Forces the TcxWebFont object to respond to property value changes.

procedure EndUpdate;

Description

The BeginUpdate and EndUpdate method calls are used to temporarily prevent the font object from responding to property value changes.  Each BeginUpdate method call increments the internal counter by one.  Each EndUpdate method call decrements it.  The font object notifies the owning style object of its changes only when the internal counter is 0.


TcxWebFont.WriteStyle

TcxWebFont          See Also

Generates the font-style CSS attribute of the current font.

procedure WriteStyle(HTMLTextBuilder: TcxHTMLTextBuilder); virtual;

Description

The WriteStyle method is used to produce the font-style CSS attribute of the current font.

The HTMLTextBuilder parameter represents an object of type TcxHTMLTextBuilder.  Its methods are used to generate HTML code for the current page module.


TcxWebFont.WriteTransform

TcxWebFont          See Also

Generates the text-transform CSS attribute of the current font.

procedure WriteTransform(HTMLTextBuilder: TcxHTMLTextBuilder); virtual;

Description

The WriteTransform method is used to generate text-transform CSS attribute of the current font. The HTMLTextBuilder parameter represents an object of type TcxHTMLTextBuilder.  Its methods are used to generate HTML code for the current page module.


TcxWebFont. WriteVariant

TcxWebFont          See Also

Generates the font-variant CSS attribute of the current font.

procedure WriteVariant(HTMLTextBuilder: TcxHTMLTextBuilder); virtual;

Description

The WriteVariant method is used to generate font-variant CSS attribute of the current font. The HTMLTextBuilder parameter represents an object of type TcxHTMLTextBuilder.  Its methods are used to generate HTML code for the current page module.


TcxWebFont. WriteWeight

TcxWebFont          See Also

Generates the font-weight CSS attribute of the current font.

procedure WriteWeight(HTMLTextBuilder: TcxHTMLTextBuilder); virtual;

Description

The WriteWeight method is used to generate the font-weight CSS attribute of the current font. HTMLTextBuilder parameter represents an object of type TcxHTMLTextBuilder.  Its methods are used to generate HTML code for the current page module.


TcxWebFontSize
TcxWebFontSize Object

Hierarchy          Properties          Methods

Represents an object whose properties are used to set the size of the font.

Unit

cxWebGraphics

TcxWebFontSize = class(TPersistent)

Description

Use properties and methods of the TcxWebFontSize object to control the size of a particular font.

Note that font style is controlled via the TcxWebFont object which contains the Size property of the TcxWebFontSize type.  The TcxWebFontSize class contains properties that control font size.  The size can be set in different units as specified by the Units property.


TcxWebFontSize Hierarchy
Hierarchy

TPersistent


Properties for TcxWebFontSize
TcxWebFontSize Properties

TcxWebFontSize          Legend

In TcxWebFontSize

Units

Value

WebFont


Methods for TcxWebFontSize
TcxWebFontSize Methods

TcxWebFontSize          Legend

In TcxWebFontSize

Assign

Changed

Create

WriteHTML


TcxWebFontSize.WriteHTML

TcxWebFontSize          See Also

Renders HTML code representing font size.

procedure WriteHTML(HTMLTextBuilder: TcxHTMLTextBuilder);

Description

The method is used to render HTML code representing font size in the units specified by the Units property.

The HTMLTextBuilder parameter represents an object which provides means to render HTML code.  Each of its method writes text to the internal buffer.

ReadOnly Property


TcxWebFontSize.Units

TcxWebFontSize          See Also

Specifies measurement units of the font size.

TcxWebUnit = (wuCentimeters, wuEm, wuEx, wuInches, wuMillimeters, wuPercentage, wuPicas, wuPixels, wuPoints);

property Units: TcxWebUnit;

Description

The Units property specifies units of font size, i.e. the units in which the Value property value is measured.

Browsers support two types of length units: relative and absolute.  A relative length unit specifies a length in relation to another length property.  An absolute length unit specifies an absolute measurement, such as inches or centimeters.

The following table explains meanings of the units available.

Value	Description

Relative length units

wuEm	The height of the parent element's font is taken for reference point to calculate an element’s height. If the Value property value is 2 the element’s font size should be 2 times bigger than the parent’s.
wuEx	The height of the letter "x" of the parent element is taken for the reference point. If the Value property value is 2 the elements size will be 2 times bigger in size than the size of the "x" letter of the parent font.
wuPixels	Pixels.
wuPercentage	Percentage.  In this case size of the element is relative to the size of the parent element.

Absolute length units

wuInches	Inches (1 inch = 2.54 centimeters).
wuCentimeters	Centimeters.
wuMillimeters	Millimeters.
wuPoints	Points (1 point = 1/72 inches).
wuPicas	Picas (1 pica = 12 points).

The default value of the Units property is wuPoints.


TcxWebFontSize.Value

TcxWebFontSize          See Also

Controls size of the current font.

property Value: Integer;

Description

Use the Value property to specify font size in measurement units specified by the Units property.  This property cannot take values less than 2.

The default value of the Value property is 10.


TcxWebFontSize.WebFont

TcxWebFontSize          See Also

Provides access to the owning TcxWebFont object.

property WebFont: TcxWebFont;

Description

Use the WebFont property to provide access to the TcxWebFont object whose Size property is represented by this TcxWebFontSize object.  This property is used to notify the owning TcxWebFont object of the fact that some changes occurred in font size.

The WebFont property value is initialized by the constructor.

ReadOnly Property


TcxWebFontSize.Assign

TcxWebFontSize          See Also

Copies the contents of one TcxWebFontSize object to another.

procedure Assign(Source: TPersistent); override;

Description

Call the Assign method to assign the contents of the specified TcxWebFontSize object to another. The source object is specified by the Source parameter. The caller of the method is the destination object. If Source is another TcxWebFontSize object, the Assign method sets the Value and Units properties according to the corresponding properties of the object represented by the Source parameter and finally calls the Changed protected method.


TcxWebFontSize.Changed

TcxWebFontSize          See Also

Notifies the TcxWebFont object of changes occurred to the TcxWebFontSize object.

procedure Changed; dynamic;

Description

The Changed method is called when the value of the Units or Value property changes.  The method calls the Changed method of the owning TcxWebFont object.


TcxWebFontSize.Create

TcxWebFontSize          See Also

Creates an instance of the TcxWebFontSize class.

constructor Create(AWebFont: TcxWebFont);

Description

The Create method is used to initialize a new TcxWebFontSize object.  The AWebFont parameter specifies the TcxWebFont object owning the newly created instance.  The value of the parameter is assigned to the WebFont property.  The Create method also sets default values to the Units and Value properties after calling the inherited constructor.


TcxWebFontDecoration
TcxWebFontDecoration type

TcxWebFontSize          See Also

Contains values specifying text decorations.

Unit

cxWebGraphics

TcxWebFontDecoration = (wfdNone, wfdUnderline, wfdOverline, wfdLineThrough);

Description

The values of type TcxWebFontDecoration are used to define the TcxWebFontDecorations set.  Used by the Decoration property of the TcxWebFont class to specify the text-decoration CSS attribute.

The following values are available:

Value	Description
wfdNone	Default. Text has no decoration.
wfdUnderline	Text is underlined.
wfdOverline	Text has a line over it.
wfdLineThrough	Text has a line drawn through it.


TcxWebFontDecorations
TcxWebFontDecorations type

TcxWebFontSize          See Also

Represents a set of values specifying text decorations.

Unit

cxWebGraphics

TcxWebFontDecoration = (wfdNone, wfdUnderline, wfdOverline, wfdLineThrough);

TcxWebFontDecorations = set of TcxWebFontDecoration;

Description

The TcxWebFontDecorations set is used by the Decoration property of the TcxWebFont class to specify the text-decoration CSS attribute of the font.


TcxWebFontStyle
TcxWebFontStyle type

TcxWebFontSize          See Also

Contains values specifying font style.

Unit

cxWebGraphics

TcxWebFontStyle = (wfsNotSet, wfsNormal, wfsItalic, wfsOblique);

Description

The values of the TcxWebFontStyle type are used by the Style property of the TcxWebFont class to specify font style.

The following values are available:

Value	Description
wfsNotSet	TcxWebFontStyle is not specified.  The font-style CSS font attribute is not generated.
wfsNormal	Default. Normal font.
wfsItalic	Font is italic.  Resembles hand-written font and unlike the oblique style represents independent fonts.
wfsOblique	Font is italic.  Internet Explorer 4.0 renders italic and oblique identically.


TcxWebFontTransform
TcxWebFontTransform type

See Also

Contains values specifying text transformations.

Unit

cxWebGraphics

TcxWebFontTransform = (wftNotSet, wftCapitalize, wftUppercase, wftLowercase, wftNone);

Description

The values of type TcxWebFontTransform are used by the Transform property of the TcxWebFont class to specify the text-transform CSS attribute.

The following values are available:

Value	Description
wftNotSet	Value is not specified.  The text-transform CSS attribute is not generated.
wftCapitalize	Transforms the first character of each word to uppercase.
wftUppercase	Transforms all characters to uppercase.
wftLowercase	Transforms all characters to lowercase.
wftNone	Default. Text is not transformed.


TcxWebFontVariant
TcxWebFontVariant type

See Also

Contains values specifying whether the text is displayed in small capital letters.

Unit

cxWebGraphics

TcxWebFontVariant = (wfvNotSet, wfvNormal, wfvSmallCaps);

Description

The values of the TcxWebFontVariant type are used by the Variant property of the TcxWebFont class to specify font-variant CSS font attribute.

The following values are available:

Value	Description
wfvNotSet	TcxWebFontVariant is not specified.  The font-variant CSS font attribute is not generated.
wfvNormal	Default.  Normal font.
wfvSmallCaps	Font is in small capital letters.


TcxWebFontWeight
TcxWebFontWeight type

See Also

Contains values specifying font weight.

Unit

cxWebGraphics

TcxWebFontWeight = (wfwNotSet, wfwNormal, wfwBold, wfwBolder, wfwLighter, wfw100, wfw200, wfw300, wfw400, wfw500, wfw600, wfw700, wfw800,);

Description

The values of the TcxWebFontWeight type are used by the Weight property of the TcxWebFont class to specify the font-weight CSS font attribute.

The following values are available:

Value	Description
wfwNotSet	The TcxWebFontWeight is not specified.  The font-weight CSS font attribute is not generated.
wfwNormal	Default.  Normal font.
wfwBold	Font is bold.
wfwBolder	Font is heavier than regular bold.
wfwLighter	Font is lighter than normal.
wfw100	Font is at least as light as 200.
wfw200	Font is at least as bold as 100 and at least as light as 300.
wfw300	Font is at least as bold as 200 and at least as light as 400.
wfw400	Normal font.
wfw500	Font is at least as bold as 400 and at least as light as 600.
wfw600	Font is at least as bold as 500 and at least as light as 700.
wfw700	Font is bold.
wfw800	Font is at least as bold as 700 and at least as light as 900.
wfw900	Font is at least as bold as 800.


TcxWebUnit
TcxWebUnit type

See Also

Contains values specifying the measurement units for font size.

Unit

cxWebGraphics

TcxWebUnit = (wuCentimeters, wuEm, wuEx, wuInches, wuMillimeters, wuPercentage, wuPicas, wuPixels, wuPoints);

Description

The values of the TcxWebUnit type are used by the Size property of the TcxWebFont class to specify the font-size CSS font attribute.

The following values are available:

Value	Description

Relative length units

wuEm	The height of the parent element's font is taken for reference point to calculate the element’s height.
wuEx	The height of the letter "x" of the parent element is taken for the reference point.
wuPixels	Pixels.
wuPercentage	Percentage.  In this instance, the size of the element is relative to the size of the parent element.

Absolute length units

wuInches	Inches (1 inch = 2.54 centimeters).
wuCentimeters	Centimeters.
wuMillimeters	Millimeters.
wuPoints	Points (1 point = 1/72 inches).
wuPicas	Picas (1 pica = 12 points).


cxWebExtData Unit Overview
cxWebExtData Unit

Classes

TcxCustomWebDataControllerField

TcxExtWebDataSource

TcxWebDataControllerField

TcxWebDataControllerFields

TcxWebDataSource

TcxWebDBDataControllerField

TcxWebDBDataControllerFields

TcxWebDBDataSource

Other Types

TcxValueType

TExpandingEvent

TGroupingEvent

TSortingEvent


TcxCustomWebDataControllerField
TcxCustomWebDataControllerField Object

Hierarchy          Properties          Methods

Serves as the base for the TcxWebDataControllerField and TcxWebDBDataControllerField classes.

Unit

cxWebExtData

TcxCustomWebDataControllerField = class(TcxCustomWebDataField)

Description

There are three components providing access to datasets.  These are the TcxStdWebDataSource, TcxWebDataSource and TcxWebDBDataSource components.  Each data source component stores its field collection.  Classes representing fields (TcxCustomWebDataField descendants) are different for each data source.  The TcxCustomWebDataControllerField class represents a base class for the fields of the TcxWebDataSource and TcxWebDBDataSource classes.

The descendants of the TcxCustomWebDataControllerField class are the TcxWebDataControllerField and TcxWebDBDataControllerField classes.

The TcxCustomWebDataControllerField class introduces a number of properties and methods used to manage grouping and sorting by field values.


TcxCustomWebDataControllerField Hierarchy
Hierarchy

TCollectionItem

     |

TcxCustomWebDataField


Properties for TcxCustomWebDataControllerField
TcxCustomWebDataControllerField Properties

TcxCustomWebDataControllerField          Legend

In TcxCustomWebDataControllerField

DataController

DataSource

GroupingIndex

SortingOrder

Derived from TcxCustomWebDataField

DisplayLabel

FieldHelper

FieldType

Name

ScriptData


Methods for TcxCustomWebDataControllerField
TcxCustomWebDataControllerField Methods

TcxCustomWebDataControllerField          Legend

In TcxCustomWebDataControllerField

Create

Destroy

GetDataController

GetDataSource

Derived from TcxCustomWebDataField

GetFieldHelper


TcxCustomWebDataControllerField.DataController

TcxCustomWebDataControllerField          See Also

Gets the data controller object used to manage sorting and grouping of dataset fields.

property DataController: TcxCustomDataController;

Description

Grouping and sorting of dataset fields is performed by a specially designed data controller object.  The DataController property is used to retrieve it.

ReadOnly Property


TcxCustomWebDataControllerField.DataSource

TcxCustomWebDataControllerField          See Also

Gets the data source component owning the field.

property DataSource: TcxExtWebDataSource;

Description

Use the DataSource property to retrieve the data source component to which the field belongs.  This property is of type TcxExtWebDataSource.  Thus the returned value can be any descendant of this class.  Available descendants are TcxWebDataSource and TcxWebDBDataSource.

ReadOnly Property


TcxCustomWebDataControllerField.GroupingIndex

TcxCustomWebDataControllerField          See Also

Specifies the level of grouping performed by values of the field.

property GroupingIndex: Integer;

Description

Descendants of the TcxCustomWebDataControllerField class support dataset grouping by their values.  Moreover, dataset can be grouped by values of several fields at a time.  The GroupingIndex property specifies the level of grouping performed by values of the field.  Grouping levels are zero-based indexed.  Thus the GroupingIndex property of a field, against whose values first-level grouping is performed, is 0.  If no grouping is performed, the GroupingIndex property is –1.


TcxCustomWebDataControllerField.SortingOrder

TcxCustomWebDataControllerField          See Also

Specifies the order of sorting performed by values of the field.

TcxWebDataSortOrder = (wsoNone, wsoAscending, wsoDescending);

property SortingOrder: TcxWebDataSortOrder;

Description

Descendants of the TcxCustomWebDataControllerField class support dataset sorting by their values.  The SortingOrder property specifies the sort order performed by field values.  Use this property to read the sort order by field values.  Change the value of the SortingOrder property to implement sorting in a desired order or cancel sorting by field values.


TcxCustomWebDataControllerField.Create

TcxCustomWebDataControllerField          See Also

Creates a new instance of the TcxCustomWebDataControllerField class.

constructor Create(Collection: TCollection); override;

Description

The Create method is used to instantiate the TcxCustomWebDataControllerField class.  After calling the inherited constructor it notifies the data controller of its creation.

Do not create instances of the TcxCustomWebDataControllerField class in applications.  Use the Add method of the corresponding collection instead.


TcxCustomWebDataControllerField.Destroy

TcxCustomWebDataControllerField          See Also

Destroys the TcxCustomWebDataControllerField object.

destructor Destroy; override;

Description

The Destroy method is used to dispose of the TcxCustomWebDataControllerField object and free any allocated memory.  It notifies the data controller of its deletion before calling the inherited destructor.

Do not use the Destroy method.  Field-representing objects are disposed when being deleted from the corresponding collection.


TcxCustomWebDataControllerField.GetDataController

TcxCustomWebDataControllerField          See Also

Returns the value of the DataController property.

function GetDataController: TcxCustomDataController; overload; virtual;

Description

All data manipulations, such as grouping and sorting dataset records, are performed by a specially designed data controller object.  The DataController property provides access to the data controller object associated with the data source to which the field belongs.  The GetDataController method is the ‘read’ of this property.

This method is overloaded in derived classes to return a proper value.


TcxCustomWebDataControllerField.GetDataSource

TcxCustomWebDataControllerField          See Also

Returns the value of the DataSource property.

function GetDataSource: TcxExtWebDataSource; reintroduce; overload;

Description

The GetDataSource method is the ‘read’ of the DataSource property.  This property is of type TcxExtWebDataSource.  Thus the returned value can be any descendant of this class.  Available descendants are TcxWebDataSource and TcxWebDBDataSource.

This method is overloaded in derived classes to return a proper value.


TcxWebDataControllerField
TcxWebDataControllerField Object

Hierarchy          Properties          Methods

Represents a field of the TcxWebDataSource component.

Unit

cxWebExtData

TcxWebDataControllerField = class(TcxCustomWebDataControllerField)

Description

Each data source component provides access to dataset field values.  There are three data source components available, which differ in the type of dataset they are connect to and the type of data access.  These are the TcxStdWebDataSource, TcxWebDataSource, TcxWebDBDataSource components.

The TcxWebDataControllerField class represents a field owned by the TcxWebDataSource component.  This component stores its fields within a collection, which is accessed via its Fields property (TcxWebDataControllerFields class).

The TcxWebDataSource component is not connected to any external dataset.  Thus it is up to you to add the desirable number of fields and customize them.  This can be done both at design and runtime.  The image below shows the manner in which it is performed at design-time.


TcxWebDataControllerField Hierarchy
Hierarchy

TCollectionItem

     |

TcxCustomWebDataField

     |

TcxCustomWebDataControllerField


Properties for TcxWebDataControllerField
TcxWebDataControllerField Properties

TcxWebDataControllerField          Legend

In TcxWebDataControllerField

DataController

DataSource

ValueType

ValueTypeClass

Derived from TcxCustomWebDataControllerField

GroupingIndex

SortingOrder

Derived from TcxCustomWebDataField

DisplayLabel

FieldHelper

FieldType

Name

ScriptData


Methods for TcxWebDataControllerField
TcxWebDataControllerField Methods

TcxWebDataControllerField          Legend

In TcxWebDataControllerField

Create

GetDataController

GetDataSource

Derived from TcxCustomWebDataControllerField

Destroy

Derived from TcxCustomWebDataField

GetFieldHelper


TcxWebDataControllerField.DataController

TcxWebDataControllerField          See Also

Gets the associated data controller object.

property DataController: TcxWebDataController;

Description

All data manipulations, such as grouping and sorting dataset records, are performed by a specially designed data controller object.  The DataController property provides access to the data controller object associated with the data source to which the field belongs.

ReadOnly Property


TcxWebDataControllerField.DataSource

TcxWebDataControllerField          See Also

Provides access to the data source component owning the field.

property DataSource: TcxWebDataSource;

Description

Data source components store their collection of fields.  The TcxWebDataSource component stores its fields represented by the TcxWebDataControllerField objects.  These objects are stored within the Fields property represented by the TcxWebDataControllerFields object.

Each field-representing object (the TcxWebDataControllerField object, in particular) references the data source component to which it belongs.  This is implemented via the DataSource property.

ReadOnly Property


TcxWebDataControllerField.ValueType

TcxWebDataControllerField          See Also

Specifies field type values.

TcxValueType = (StringType, WideStringType, SmallintType,

      IntegerType, WordType, BooleanType, FloatType,

      CurrencyType, DateTimeType, FMTBcdType, LargeIntType,

      VariantType, ObjectType);

property ValueType: TcxValueType;

Description

The TcxWebDataSource component is not connected to any external dataset.  Thus it is up to you to add the desirable number of fields and customize them.  Use the ValueType property to specify the type of values contained within the field.


TcxWebDataControllerField.ValueTypeClass

TcxWebDataControllerField          See Also

Gets an object representing field type.

property ValueTypeClass: TcxValueTypeClass;

Description

Certain data type manipulations are performed by special objects corresponding to data types.  These objects are descendants of the TcxValueType class.  The ValueTypeClass returns a proper type-representing object.

Field value types can be specified via the ValueType property.

ReadOnly Property


TcxWebDataControllerField.Create

TcxWebDataControllerField

Creates an instance of the TcxWebDataControllerField class.

constructor Create(Collection: TCollection); override;

Description

The Create method is used to instantiate the TcxWebDataControllerField class.  It initializes the ValueType property after calling the inherited constructor.

Do not create TcxWebDataControllerField objects in applications.  Use the Add method of the TcxWebDataControllerFields object (the Fields property of the TcxWebDataSource object) instead.


TcxWebDataControllerField.GetDataController

TcxWebDataControllerField          See Also

Returns the value of the DataController property.

function GetDataController: TcxWebDataController; reintroduce; overload;

Description

All data manipulations, such as grouping and sorting dataset records, are performed by a specially designed data controller object.  The DataController property provides access to the data controller object associated with the data source to which the field belongs.  The GetDataController method is the ‘read’ of this property.

It overloads the base class method to return a proper value type.


TcxWebDataControllerField.GetDataSource

TcxWebDataControllerField          See Also

Returns the value of the DataSource property.

function GetDataSource: TcxWebDataSource; reintroduce; overload;

Description

The GetDataSource method is the ‘read’ of the DataSource property.

It overloads the base class method to return a proper value type.


TcxWebDataControllerFields
TcxWebDataControllerFields Object

Hierarchy          Properties          Methods

Represents a collection of fields in the TcxWebDataSource component.

Unit

cxWebExtData

TcxWebDataControllerFields = class(TCollection)

Description

Each data source component provides access to dataset field values.  There are three data source components available, which differ in the type of dataset they connect to and the type of data access.  These are the TcxStdWebDataSource, TcxWebDataSource, TcxWebDBDataSource components.

The TcxWebDataControllerFields class represents a collection of fields for the TcxWebDataSource component.  It is accessed via the Fields property.  The TcxWebDataControllerField object represents a single item within the collection.  Items can be accessed via the Items property of the TcxWebDataControllerFields class.

The TcxWebDataSource component is not connected to any external dataset.  Thus it is up to you to add the desirable number of fields and customize them.  This can be done both at design and runtime.  The image below shows the manner in which it is performed at design-time.


TcxWebDataControllerFields Hierarchy
Hierarchy

TCollection


Properties for TcxWebDataControllerFields
TcxWebDataControllerFields Properties

TcxWebDataControllerFields          Legend

In TcxWebDataControllerFields

DataSource

Items


Methods for TcxWebDataControllerFields
TcxWebDataControllerFields Methods

TcxWebDataControllerFields          Legend

In TcxWebDataControllerFields

Add

Create


TcxWebDataControllerFields.DataSource

TcxWebDataControllerFields          See Also

Gets the object representing the data source component owning the field collection.

property DataSource: TcxWebDataSource;

Description

The TcxWebDataSource component stores a collection of fields in its Fields property.  This property is represented by the TcxWebDataControllerFields object.  The TcxWebDataControllerFields class, in turn, provides a way to access the data source component owning it.  This is performed via the DataSource property.

ReadOnly Property


TcxWebDataControllerFields.Items

TcxWebDataControllerFields

Provides access to individual items within the field collection.

property Items[Index: Integer]: TcxWebDataControllerField;

Description

Use the Items property to access a field with a specified index within the collection.  The index of the field is specified by the Index parameter.  Fields are zero-based indexed.  Use the Count property to determine the number of fields within the collection.  This property’s return value is always one greater than the index of the last field.

You can add and delete items using the Add and Delete methods.


TcxWebDataControllerFields.Add

TcxWebDataControllerFields

Adds a new field to the end of the collection.

function Add: TcxWebDataControllerField;

Description

Use the Add method to add a new field to the collection.  This method creates a TcxWebDataControllerField object, adds it to the end of the collection and returns a reference to it.  The index of the added field will be one less than the value of the Count property.

Use the Items property to access an individual item within the collection.  A field can be removed from the collection via the Delete method.


TcxWebDataControllerFields.Create

TcxWebDataControllerFields

Creates a new instance of the TcxWebDataControllerFields class.

constructor Create(ADataSource: TcxCustomWebDataSource);

Description

The Create method is used to instantiate the TcxWebDataControllerFields class.  The ADataSource parameter specifies the data source component owning the field collection.  After calling the inherited constructor, this method assigns the value of the parameter to the DataSource property.

Do not create TcxWebDataControllerFields objects in applications.  It is automatically created when the owning data source component is initialized.


TcxWebDBDataControllerField
TcxWebDBDataControllerField Object

Hierarchy          Properties          Methods

Represents a field of the TcxWebDBDataSource component.

Unit

cxWebExtData

TcxWebDBDataControllerField = class(TcxCustomWebDataControllerField)

Description

Each data source component provides access to dataset field values.  There are three data source components available, which differ in the type of dataset they are connect to and the method of data access.  These are the TcxStdWebDataSource, TcxWebDataSource, TcxWebDBDataSource components.

The TcxWebDBDataControllerField class represents a field owned by the TcxWebDBDataSource component.  This component stores its fields within a collection, which is accessed via its Fields property (TcxWebDBDataControllerFields class).

The TcxWebDBDataSource component is connected to an external dataset.  This is performed via the DataSet property.  When this property value is set, the field collection is automatically initialized to represent all the fields of the associated dataset.


TcxWebDBDataControllerField Hierarchy
Hierarchy

TCollectionItem

     |

TcxCustomWebDataField

     |

TcxCustomWebDataControllerField


Properties for TcxWebDBDataControllerField
TcxWebDBDataControllerField Properties

TcxWebDBDataControllerField          Legend

In TcxWebDBDataControllerField

DataController

DataSet

DataSource

FieldName

Derived from TcxCustomWebDataControllerField

GroupingIndex

SortingOrder

Derived from TcxCustomWebDataField

DisplayLabel

FieldHelper

FieldType

Name

ScriptData


Methods for TcxWebDBDataControllerField
TcxWebDBDataControllerField Methods

TcxWebDBDataControllerField          Legend

In TcxWebDBDataControllerField

GetDataController

GetDataSource

Derived from TcxCustomWebDataControllerField

Create

Destroy

Derived from TcxCustomWebDataField

GetFieldHelper


TcxWebDBDataControllerField.DataController

TcxWebDBDataControllerField          See Also

Gets the associated data controller object.

property DataController: TcxWebDBDataController;

Description

All data manipulations, such as grouping and sorting dataset records, are performed by a specially designed data controller object.  The DataController property provides access to the data controller object associated with the data source to which the field belongs.

ReadOnly Property


TcxWebDBDataControllerField.DataSet

TcxWebDBDataControllerField          See Also

Gets the dataset to which the field belongs.

property DataSet: TDataSet;

Description

The TcxWebDBDataSource component is connected to an external dataset in order to provide data.  This is performed via its DataSet property.  Once this property is set, the field collection is automatically initialized to represent all the fields of the associated dataset.  Each field within the collection is represented by the TcxWebDBDataControllerField object.  Its DataSet property is used to obtain reference to the dataset object, to which the owning data source is connected.

ReadOnly Property


TcxWebDBDataControllerField.DataSource

TcxWebDBDataControllerField          See Also

Gets the data source component owning the field.

property DataSource: TcxWebDBDataSource;

Description

Data source components store their collections of fields.  The TcxWebDBDataSource component stores its fields represented by the TcxWebDBDataControllerField objects.  These objects are stored within the Fields property represented by the TcxWebDataControllerFields object.

Each field-representing object (the TcxWebDBDataControllerField object, in particular) references the data source component to which it belongs.  This is implemented via the DataSource property.

ReadOnly Property


TcxWebDBDataControllerField.FieldName

TcxWebDBDataControllerField          See Also

Specifies the name of the field represented by the TcxWebDBDataControllerField object.

property FieldName: string;

Description

Use the FieldName property to specify the name of the dataset field represented by the TcxWebDBDataControllerField object.  This property is set to the name of the corresponding dataset field when the TcxWebDBDataSource object initializes its field collection (the bound dataset is changed).


TcxWebDBDataControllerField.GetDataController

TcxWebDBDataControllerField          See Also

Gets the value of the DataController property.

function GetDataController: TcxWebDBDataController;

Description

All data manipulations, such as grouping and sorting dataset records, are performed by a specially designed data controller object.  The DataController property provides access to the data controller object associated with the data source to which the field belongs.  The GetDataController method is the ‘read’ of this property.

It overloads the base class method to return a proper value type.


TcxWebDBDataControllerField.GetDataSource

TcxWebDBDataControllerField          See Also

Returns the value of the DataSource property.

function GetDataSource: TcxWebDBDataSource;

Description

The GetDataSource method is the ‘read’ of the DataSource property.  It overloads the base class method to return a proper value type.


TcxWebDBDataControllerFields
TcxWebDBDataControllerFields Object

Hierarchy          Properties          Methods

Represents a collection of fields in the TcxWebDBDataSource component.

Unit

cxWebExtData

TcxWebDBDataControllerFields = class(TCollection)

Description

Each data source component provides access to dataset field values.  There are three data source components available, which differ in the type of dataset they connect to and the method of data access.  These are the TcxStdWebDataSource, TcxWebDataSource, TcxWebDBDataSource components.

The TcxWebDBDataControllerFields class represents a collection of fields for the TcxWebDBDataSource component.  It is accessed via the Fields property.  The TcxWebDBDataControllerField object represents a single item within the collection.  Items can be accessed via the Items property of the TcxWebDBDataControllerFields class.

The TcxWebDBDataSource component is connected to an external dataset in order to provide data.  The field collection is automatically initialized when the associated dataset is changed.  This collection contains TcxWebDBDataControllerField objects representing all the fields of the associated dataset.


TcxWebDBDataControllerFields Hierarchy
Hierarchy

TCollection


Properties for TcxWebDBDataControllerFields
TcxWebDBDataControllerFields Properties

TcxWebDBDataControllerFields          Legend

In TcxWebDBDataControllerFields

DataSource

Items


Methods for TcxWebDBDataControllerFields
TcxWebDBDataControllerFields Methods

TcxWebDBDataControllerFields          Legend

In TcxWebDBDataControllerFields

Add

Create

GetOwner


TcxWebDBDataControllerFields.DataSource

TcxWebDBDataControllerFields          See Also

Gets the object representing the data source component owning the field collection.

property DataSource: TcxWebDBDataSource;

Description

The TcxWebDBDataSource component stores a collection of fields in its Fields property.  This property is represented by the TcxWebDBDataControllerFields object.  The TcxWebDBDataControllerFields class, in turn, provides a way to access the data source component owning it.  This is performed via the DataSource property.

ReadOnly Property


TcxWebDBDataControllerFields.Items

TcxWebDBDataControllerFields

Provides access to individual items within the field collection.

property Items[Index:Integer]: TcxWebDBDataControllerField;

Description

Use the Items property to access a field with a specified index within the collection.  The index of the field is specified by the Index parameter.  Fields are zero-based indexed.  Use the Count property to determine the number of fields within the collection.  This property’s return value is always one greater than the index of the last field.

You can add and delete items using the Add and Delete methods.


TcxWebDBDataControllerFields.Add

TcxWebDBDataControllerFields

Adds a new field to the end of the collection.

function Add: TcxWebDBDataControllerField;

Description

Use the Add method to add a new field to the collection.  This method creates a TcxWebDBDataControllerField object, adds it to the end of the collection and returns a reference to it.  The index of the added field will be one less than the value of the Count property.

Use the Items property to access an individual item within the collection.  A field can be removed from the collection via the Delete method.


TcxWebDBDataControllerFields.Create

TcxWebDBDataControllerFields

Creates a new instance of the TcxWebDBDataControllerFields class.

constructor Create(ADataSource: TcxCustomWebDataSource);

Description

The Create method is used to instantiate the TcxWebDBDataControllerFields class.  The ADataSource parameter specifies the data source component owning the field collection.  After calling the inherited constructor, this method assigns the value of the parameter to the DataSource property.

Do not create TcxWebDBDataControllerFields objects in applications.  It is automatically created when the owning data source component is initialized.


TcxWebDBDataControllerFields.GetOwner

TcxWebDBDataControllerFields          See Also

Gets the owner of the field collection.

function GetOwner: TPersistent; override;

Description

The GetOwner method’s return value is used by the GetNamePath method.  Thus the GetOwner method overrides the base class method to return a proper owner.  This method returns the value of the DataSource property.


TcxValueType
TcxValueType type

Contains values corresponding to data types.

Unit

cxWebExtData

TcxValueType = (StringType, WideStringType, SmallintType,

      IntegerType, WordType, BooleanType, FloatType,

      CurrencyType, DateTimeType, FMTBcdType, LargeIntType,

      VariantType, ObjectType);

Description

The TcxValueType type contains values corresponding to data types of dataset field values.  These values are used to set the value of the ValueType property of the TcxWebDataControllerField object.

The following values are available:

Value	Description
StringType	Field values are AnsiStrings.
WideStringType	Field values are wide strings (a character can be represented by more than one byte, as in Unicode).
SmallintType	Field values are of Smallint (–32768..32767).
IntegerType	Field values are Integers (–2147483648..2147483647).
WordType	Field values are Word (0..65535).
BooleanType	Field values are Boolean (either True or False).
FloatType	Field values are Double (5.0 x 10^–324 .. 1.7 x 10^308).
CurrencyType	Field values are Currency (–922337203685477.5808.. 922337203685477.5807).
DateTimeType	Field values are DateTime.
FMTBcdType	Field values are binary coded decimals.
LagreIntType	Field values are Int64 (–2^63..2^63–1).
VariantType	Field values are Variants.
ObjectType	Field values are objects.


TExpandingEvent
TExpandingEvent type

Specifies the type of events that are invoked due to expansion or collapse of a grouped node.

Unit

cxWebExtData

TExpandingEvent = procedure (Sender: TObject; ARowIndex: Integer; AExpanded, ARecursive: Boolean) of object;

Description

TExpandingEvent represents expansion/collapse event types.  These are the OnExpanding and OnExpanded events which are invoked before and after a grouped node is expanded or collapsed respectively.  The Sender parameter represents the object, which invoked the event.  The ARowIndex parameter specifies the index of the row being either expanded or collapsed.  The AExpanded parameter determines whether the grouping row is expanded or collapsed.  The ARecursive parameter indicates whether all the child rows are being expanded/collapsed.


TGroupingEvent
TGroupingEvent type

Specifies the type of events that are invoked due to dataset grouping by field values.

Unit

cxWebExtData

TGroupingEvent = procedure (Sender: TObject; GroupField, GroupIndex: Integer) of object;

Description

TGroupingEvent specifies grouping event types.  These are the OnGrouping and OnGrouped events, which are invoked before and after a dataset is grouped (ungrouped) by field values respectively.  The Sender parameter specifies the object, which invoked the event.  The GroupField parameter determines the index of the field against whose values the dataset is grouped/ungrouped.  The GroupIndex parameter specifies the level of grouping implemented by values of the field.  If the GroupIndex parameter is –1 the associated dataset is being ungrouped by field values.


TSortingEvent
TSortingEvent type

Specifies the type of events that are invoked as a result of dataset sorting against field values.

Unit

cxWebExtData

TSortingEvent = procedure (Sender: TObject; SortField: Integer; SortOrder: TcxWebDataSortOrder) of object;

Description

TSortingEvent specifies sorting event types.  These are the OnSorting and OnSorted events, which are invoked before and after a dataset is sorted by field values respectively.  The Sender parameter specifies the object that invoked an event.  The SortField parameter determines the index of the field, whose values are used to sort a dataset.  The SortOrder parameter specifies the sort order being implemented.


TcxExtWebDataSource
TcxExtWebDataSource Object

Hierarchy          Properties          Methods          Events          See Also

Represents a base class for extended data source components.

Unit

cxWebExtData

TcxExtWebDataSource = class(TcxCustomWebDataSource)

Description

The TcxExtWebDataSource class represents a base class from which the TcxWebDataSource and TcxWebDBDataSource components are derived.  These components provide an interface between dataset components and data-aware web controls on a form.  Moreover, these TcxExtWebDataSource class descendants allow sorting, grouping and expanding grouped rows of the corresponding dataset.  The TcxExtWebDataSource class refers to the specially designed data controller class, which manages data sorting, grouping, and rows expansion.

The TcxExtWebDataSource class is a direct descendant of the TcxCustomWebDataSource class which supports the IcxCodeProvider, IcxWebActions, and IcxWebValues interfaces and consequently provides HTML and Java script code rendering functionality, handling specific server-side events, and manipulating values of a web data source component.

Use TcxExtWebDataSource class descendants to provide a conduit between a dataset and data aware controls that enable them to perform all essential data manipulations (display, navigation, editing, sorting, grouping, expanding) with underlying dataset data.

All datasets must be associated with a data source component if their data is to be displayed and manipulated in data aware controls.  Similarly, each data-aware control needs to be associated with a data source component in order for the control to receive and manipulate data.


TcxExtWebDataSource Hierarchy
Hierarchy

TComponent

     |

TcxCustomWebDataSource

     |

TcxWebComponent


Properties for TcxExtWebDataSource
TcxExtWebDataSource Properties

TcxExtWebDataSource          Legend

In TcxExtWebDataSource

AllowExpanding

AllowGrouping

AllowSorting

DataController

Derived from TcxCustomWebDataSource

ActionName

AllowEditing

ClientCount

Clients

DisplayTexts

Fields

FocusedRowIndex

FullName

KeyFieldName

LoadAllRecords

RecordCount

RowCount

Values

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxExtWebDataSource
TcxExtWebDataSource Methods

TcxExtWebDataSource          Legend

In TcxExtWebDataSource

CancelEdit

ClearGrouping

ClearSorting

Create

DeleteRecord

Destroy

DoSetValues

EditRecord

Expand

FullCollapse

FullExpand

GetAllowExpanding

GetAllowGrouping

GetAllowSorting

GetDataController

GetDisplayText

GetFocusedRowIndex

GetGroupingItemCount

GetGroupingItemIndex

GetItemGroupIndex

GetItemHelperClass

GetItemSortOrder

GetRecordCount

GetRowCount

GetRowDisplayText

GetRowExpanded

GetRowLevel

GetRowRecord

GetRowValue

GetSortingItemCount

GetSortingItemIndex

GetValue

Group

InsertRecord

PostEdit

RegisterActions

RegisterRenderers

RegisterValues

SetDataController

SetEditValue

SetFocusedRowIndex

SetValue

Sort

UnGroup

WebExpand

WebGroup

WebSort

WebUnGroup

Derived from TcxCustomWebDataSource

CanEdit

CanSetValues

ChangedData

DataNotification

DefineProperties

FieldByName

GetAllowEditing

GetFields

GetWebActionsHelper

GetWebRenderHelper

GetWebValuesHelper

Loaded

NeedUpdateFields

ReadActionName

ReadFocusedRowIndex

Refresh

RegisterClient

SetFields

SetRecordCount

UnRegisterClient

UpdateDataLayout

UpdateDefaultFields

UpdateValue

WebCancelEdit

WebDelete

WebInsert

WebMoveBy

WebMoveTo

WebPostEdit

WebRefresh

WebStartEdit

WriteActionName

WriteFocusedRowIndex

Derived from TcxWebComponent

GetProviders

GetState

GetVariableName

GetWebEventsHelper

GetWebScriptsHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterEvents

ScriptsSubscription

SetState

StyleChanged

ValidateContainer


Events for TcxExtWebDataSource
TcxExtWebDataSource Events

TcxExtWebDataSource          Legend

In TcxExtWebDataSource

OnExpanded

OnExpanding

OnGrouped

OnGrouping

OnSorted

OnSorting

Derived from TcxCustomWebDataSource

OnAfterPost

OnBeforePost

OnCancelEdit

OnDeleted

OnDeleting

OnInserted

OnInserting

OnScrolled

OnScrolling

OnSetEditValue

OnSetInsertValue

OnStartEdit

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxExtWebDataSource.AllowExpanding

TcxExtWebDataSource          See Also

Specifies whether a user is allowed to expand and collapse grouped rows (if any) for associated data aware web controls (e.g. grid).

property AllowExpanding: Boolean;

Description

Use the AllowExpanding property to specify whether grouped rows (if any) of associated controls can be expanded and collapsed.

Data aware web controls that display data from several dataset rows (e.g. TcxWebDBGrid control) are designed to support the display of grouped dataset data.  When dataset data is grouped based upon the contents of a column (or columns), its data is represented in a tree-like manner.  Additional grouped rows are created for each grouped field value, and all the records that share the same values are displayed as child rows.

Set the AllowExpanding property to True to allow a user to expand and collapse such grouped row of the associated data aware web control.  If the AllowExpanding property is set to True a user can expand/collapse a grouped row to display/hide its child rows.  If the AllowExpanding property is set to False, all grouped rows are automatically expanded and all their child rows are displayed.


TcxExtWebDataSource.AllowGrouping

TcxExtWebDataSource          See Also

Specifies whether associated recordset data can be grouped.

property AllowGrouping: Boolean;

Description

Use the AllowGrouping property to specify whether associated recordset data can be grouped.  Grouping can be implemented by means of the associated data-aware control (e.g. the TcxWebDBGrid control), or via the Group method.  Dataset data can be grouped against one or more field values.

Set the AllowGrouping property to True to allow grouping of dataset records.


TcxExtWebDataSource.AllowSorting

TcxExtWebDataSource          See Also

Specifies whether associated recordset data can be sorted.

property AllowSorting: Boolean;

Description

Use the AllowSorting property to specify whether associated recordset data can be sorted by values of one or more fields.

Data aware web controls that display data from several dataset rows (e.g. TcxWebDBGrid control) are designed to perform sorting of dataset data.  Such controls usually allow you to sort the contents of each column in both ascending and descending order.

Set the AllowSorting property to True to allow sorting of dataset records within data aware web controls associated with the data source component.


TcxExtWebDataSource.DataController

TcxExtWebDataSource

Specifies a specially designed data controller object.

property DataController: TcxCustomDataController;

Description

The DataController property is used internally to specify a data controller object that implements the necessary functionality for row sorting, grouping, and expansion.

This is an internally used protected property.


TcxExtWebDataSource.CancelEdit

TcxExtWebDataSource          See Also

Cancels un-posted changes to the current record.

procedure CancelEdit; override;

Description

Call the CancelEdit method to undo modifications made to one or more fields belonging to the active record of the corresponding dataset.  As long as those changes are not already posted, the CancelEdit method returns the record to its previous state.

As implemented in the TcxExtWebDataSource class the CancelEdit method performs the following actions.

•	Checks whether the last action is a new record insert (the ActionName property value equals ‘INSERT‘) and if so deletes the newly created record from the corresponding dataset.

•	Sets the ActionName property to ‘CANCELEDIT‘specified by the scxCancelEditAction constant.

•	Invokes the OnCancelEdit event (if its handler is assigned).

Typically, the CancelEdit method is used to back out of changes in response to user requests, or in field validation routines that back out of illegal field values.

The CancelEdit method of the TcxExtWebDataSource class overrides the CancelEdit method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.ClearGrouping

TcxCustomWebDataSource          See Also

Cancels grouping applied to the dataset data.

procedure ClearGrouping; override;

Description

The TcxExtWebDataSource class (and all its descendants) use a specifically designed data controller object (the DataController property) to perform and cancel grouping against dataset records.  When a data controller groups dataset data based upon the contents of a specific field, it creates a new item within an internal list of grouping fields.  This item contains a reference to the grouping field against whose values the dataset is grouped.  The order of items within a grouping fields list is specified by the grouping level.

The ClearGrouping method cancels all the grouping applied and clears the grouping fields list.

The ClearGrouping method overrides the ClearGrouping method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.ClearSorting

TcxCustomWebDataSource          See Also

Cancels sorting applied to the dataset data.

procedure ClearSorting; override;

Description

The TcxExtWebDataSource class (and all its descendants) use a specifically designed data controller object (the DataController property) to perform and cancel sorting against dataset records.  When a data controller sorts dataset data based upon the contents of a specific field, it creates a new item within an internal list of sorting fields.  This item contains a reference to the sorting field against whose values the dataset is sorted.  The order of items within a sorting fields list is specified by the sorting level.

The ClearSorting method cancels all the sorting applied and clears the sorting fields list.

The ClearSorting method overrides the ClearSorting method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.Create

TcxExtWebDataSource          See Also

Creates an instance of a TcxExtWebDataSource class.

constructor Create(AOwner: TComponent); override;

Description

The Create method is used to create and initialize a new instance of the TcxExtWebDataSource class.  The Create method calls its inherited constructor and then sets the AllowExpanding, AllowGrouping, and AllowSorting properties to True.

Do not create instances of the TcxExtWebDataSource class in applications.  Instead, use TcxExtWebDataSource class descendants such as the TcxWebDataSource or TcxWebDBDataSource class.


TcxExtWebDataSource.DeleteRecord

TcxExtWebDataSource          See Also

Deletes a specific record from the corresponding dataset.

procedure DeleteRecord(ARowIndex: Integer); override;

Description

The DeleteRecord method is designed to remove a record specified by the ARowIndex parameter from the corresponding dataset.

Note: The ARowIndex parameter is zero-based (it is assumed that the first dataset record is specified by the ARowIndex parameter which equals 0).  Standard Delphi dataset components assume their first record index to be 1.

The DeleteRecord method performs the following actions:

•	Checks the value returned of the CanEdit method to determine whether dataset data can be edited.  If it cannot (the return value is False), the DeleteRecord method performs nothing and sets the ActionName property to 'CANCELEDIT' specified by the scxCancelEditAction constant.

•	Invokes the OnDeleting event handler (if it is assigned).

•	Forces the corresponding dataset to delete the record specified by the ARowIndex parameter.

•	Sets the ActionName property to 'DELETE' specified by the scxDeleteAction constant.

•	Invokes the OnDeleted event handler (if it is assigned).

The DeleteRecord method overrides the DeleteRecord method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.Destroy

TcxExtWebDataSource          See Also

Destroys the TcxExtWebDataSource object.

destructor Destroy; override;

Description

The Destroy method is used to destroy an instance of the TcxExtWebDataSource object and release any allocated memory.  The Destroy method simply calls the inherited destructor for the component.

Do not call the Destroy method directly in an application.  Use the Free method instead.


TcxExtWebDataSource.EditRecord

TcxExtWebDataSource          See Also

Prepares the corresponding dataset to edit a specific record.

procedure EditRecord(ARowIndex: Integer); override;

Description

The EditRecord method is designed to prepare the corresponding dataset to modify data of the record specified by the ARowIndex parameter.

Note: The ARowIndex parameter is zero-based (it is assumed that the first dataset record is specified by the ARowIndex parameter which equals 0).  Standard Delphi dataset components assume their first record index to be 1.

The EditRecord method performs the following actions:

•	Checks the value returned by the CanEdit method to determine whether the dataset can be edited.  If it cannot (the return value is False), the EditRecord method performs nothing and sets the ActionName property to 'CANCELEDIT' specified by the scxCancelEditAction constant.

•	Positions the corresponding dataset on a record specified by the ARowIndex parameter.

•	Sets the ActionName property to 'STARTEDIT' specified by the scxStartEditAction constant.

The EditRecord method overrides the EditRecord method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.Expand

TcxExtWebDataSource          See Also

Expands/collapses the specified grouped row.

procedure Expand(ARowIndex: Integer; AExpanded, ARecursive: Boolean); override;

Description

When the dataset is grouped, its data can be represented in a tree-like manner, where grouped rows are created for each grouping field value, all records that share the same values are displayed as child rows.

The Expand method is designed to expand or collapse the specified grouped row.  The row is specified by its index via the ARowIndex parameter.

The AExpanded parameter specifies whether the grouped row will be expanded or collapsed.  If the AExpanded parameter is set to True the specified grouping row will be expanded.  Otherwise, it will be collapsed.

The ARecursive parameter specifies whether child grouping rows (if any) will be expanded/collapsed as specified by the AExpanded parameter.  For instance, if the ARecursive parameter is set to True, and the AExpanded parameter is set to False, the grouping row specified by the ARowIndex parameter and all its child grouping rows will be collapsed.

The Expand method of the TcxExtWebDataSource class performs the following actions:

•	Checks the AllowExpanding property to determine whether dataset rows can be expanded.  If they cannot (the AllowExpanding property is set to False), the Expand method performs nothing and sets the ActionName property to 'UNDEFINED' specified by the scxUndefinedAction constant.

•	Invokes the OnExpanding event (if its handler is assigned).

•	Forces a specific grouping row to be expanded/collapsed in compliance with the passed ARowIndex, AExpanded, and ARecursive parameters.

•	Sets the ActionName property to 'EXPAND' specified by the scxExpandingAction constant.

•	Invokes the OnExpanded event (if its handler is assigned).

The Expand method overrides the Expand method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.FullCollapse

TcxCustomWebDataSource          See Also

Collapses all expanded grouped rows.

procedure FullCollapse; override;

Description

When a dataset is grouped, its data can be represented in a tree-like manner, where a root row (an additional row or grouping row) is created for each grouped field value, and all the records that share the same values are displayed as child rows.

Use the FullCollapse method to collapse all the expanded grouping rows of a dataset.  You can also expand/collapse a particular grouping row using the Expand method of the TcxExtWebDataSource object.

The FullCollapse method overrides the FullCollapse method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.FullExpand

TcxCustomWebDataSource          See Also

Expands all grouped rows.

procedure FullExpand; override;

Description

When a dataset is grouped, its data can be represented in a tree-like manner, where a root row (an additional row or grouping row) is created for each grouped field value, and all the records that share the same values are displayed as child rows.

Use the FullExpand method to expand all the grouping rows of a dataset.  You can also expand/collapse a particular grouping row using the Expand method of the TcxExtWebDataSource object.

The FullExpand method overrides the FullExpand method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.GetAllowExpanding

TcxExtWebDataSource          See Also

Returns the AllowExpanding property value.

function GetAllowExpanding: Boolean; override;

Description

The GetAllowExpanding method returns a value that specifies whether a user is allowed to expand and collapse grouping rows (if any) for associated data aware web controls (e.g. grid).

The GetAllowExpanding method overrides the GetAllowExpanding method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.GetAllowGrouping

TcxExtWebDataSource          See Also

Returns the AllowGrouping property value.

function GetAllowGrouping: Boolean; override;

Description

The GetAllowGrouping method returns a value that specifies whether records of the corresponding dataset can be grouped within data aware web controls associated with the data source component.

The GetAllowGrouping method overrides the GetAllowGrouping method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.GetAllowSorting

TcxExtWebDataSource          See Also

Returns the AllowSorting property value.

function GetAllowSorting: Boolean; override;

Description

The GetAllowSorting method returns a value that specifies whether associated recordset data can be sorted by data aware web controls that access the dataset via the data source component.

The GetAllowSorting method overrides the GetAllowSorting method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.GetDataController

TcxExtWebDataSource

Returns the DataController property value.

function GetDataController: TcxCustomDataController; virtual;

Description

The GetDataController method returns a data controller object that implements the necessary functionality for row sorting, grouping, and row expanding/collapsing.


TcxExtWebDataSource.GetDisplayText

TcxExtWebDataSource

Returns the DisplayTexts property value.

function GetDisplayText(ARecordIndex, AItemIndex: Integer): string; override;

Description

The GetDisplayText method is used to return a string representation of a specific field’s value for display in data aware web controls. The ARecordIndex parameter specifies the index of a dataset record.  This record contains a specific field whose value is returned.

Note: The ARecordIndex parameter is zero-based (it is assumed that the first dataset record is specified by the ARecordIndex parameter which equals 0).  Standard Delphi dataset components consider their first record index to be 1.

The AItemIndex parameter represents the index of a dataset field.

The GetDisplayText method overrides the GetDisplayText method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.GetFocusedRowIndex

TcxExtWebDataSource

Returns the FocusedRowIndex property value.

function GetFocusedRowIndex: Integer; override;

Description

The GetFocusedRowIndex method is used to return the index of the focused (active) record in an internal rows list that are not hidden within collapsed groups.

The GetFocusedRowIndex method overrides the GetFocusedRowIndex method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.GetGroupingItemCount

TcxExtWebDataSource          See Also

Returns the total number of grouping fields.

function GetGroupingItemCount: Integer; override;

Description

When the data of a corresponding dataset is grouped based upon the contents of a field (or fields) the GetGroupingItemCount method returns the number of fields whose values are used to group dataset records.

Once dataset data is grouped, a new item within an internal grouping fields list is created.  This item contains a reference to the grouping field against whose values the dataset is grouped.  The order of items within a grouping fields list is specified by the grouping level. Thus, the GetGroupingItemCount method is designed to return the total number of items within the internal grouping fields list.

Note:  If dataset data is not grouped, an internal grouping fields list is empty and the GetGroupingItemCount method returns 0.

In order to obtain the index of a field specified by its position within a grouping fields list, you should use the GetGroupingItemIndex method.  If you wish to obtain the position of a specific grouping field within a grouping fields list, use the GetItemGroupIndex method.

The GetGroupingItemCount method overrides the GetGroupingItemCount method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.GetGroupingItemIndex

TcxExtWebDataSource          See Also

Returns the index of a field specified by its position within a grouping fields list.

function GetGroupingItemIndex(Item: Integer): Integer; override;

Description

Once dataset data is grouped based upon the contents of a specific field, a new item within an internal grouping fields list is created.  This item contains a reference to the grouping field against which dataset values are grouped.  The order of items within a grouping fields list is specified by the grouping level.

The GetGroupingItemIndex method is used to return the index of a dataset field specified by its position within a grouping fields list. The Item parameter specifies the index of an item representing a grouping field within a grouping fields list.

Note:  If dataset data is not grouped, the internal grouping fields list is empty.

If you wish to obtain the position of a specific grouping field within a grouping fields list, use the GetItemGroupIndex method.  Additionally you can use the GetGroupingItemCount method to return the total number of items within the internal grouping fields list.

The GetGroupingItemIndex method overrides the GetGroupingItemIndex method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.GetItemGroupIndex

TcxExtWebDataSource          See Also

Returns the position of a specific grouping field within a grouping fields list.

function GetItemGroupIndex(ItemIndex: Integer): Integer; override;

Description

Once dataset data is grouped based upon the contents of a specific field, a new item within the grouping fields list is created.

The GetItemGroupIndex method returns the index of the item that represents a specific grouping field within a grouping fields list. The ItemIndex parameter specifies the index of a grouping field within a dataset record.

Since the order of items within a grouping fields list is specified by the grouping level, the GetItemGroupIndex method can be used to obtain a grouping level of a specific dataset field.

If you wish to obtain the index of a field specified by its position within a grouping fields list, you can use the GetGroupingItemIndex method.  Additionally you can use the GetGroupingItemCount method to return the total number of items within the internal grouping fields list.

The GetItemGroupIndex method overrides the GetItemGroupIndex method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.GetItemHelperClass

TcxExtWebDataSource          See Also

Returns a reference to the helper object of a specific field.

function GetItemHelperClass(AItemIndex: Integer): TcxDataFieldHelperClass; override;

Description

Each field-representing object (accessed via the Fields property) delegates the part of its functionality to a specially designed helper object.  The GetItemHelperClass method returns this object type.  The reference can point to any descendant of the TcxDataFieldHelper class.  There are a number of descendants specifically designed for different field types.  These classes are the TcxStringFieldHelper, TcxIntegerFieldHelper, TcxFloatFieldHelper, TcxDateTimeFieldHelper, TcxBooleanFieldHelper and TcxImageFieldHelper.


TcxExtWebDataSource.GetItemSortOrder

TcxExtWebDataSource

Returns a value that determines the sort order of a specific field.

function GetItemSortOrder(ItemIndex: Integer): TcxWebDataSortOrder; override;

Description

The contents of dataset data can be sorted by values of one or more fields in both ascending and descending order.  The GetItemSortOrder method returns a value that indicates sort order implemented against the values of a specified field.  The field is specified by its index via the ItemIndex parameter.

The GetItemSortOrder method can return one of the following values.

Value	Meaning
wsoNone	Data is not sorted.
wsoAscending	Data is sorted by specified field values in ascending order.
wsoDescending	Data is sorted by specified field values in descending order.

The GetItemSortOrder method overrides the GetItemSortOrder method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.GetRecordCount

TcxExtWebDataSource          See Also

Returns the RecordCount property value.

function GetRecordCount: Integer; override;

Description

The GetRecordCount method is used to return the total number of records within the associated dataset.  Bear in mind that the GetRecordCount method returns the number of physical records composing the dataset in contrast to the GetRowCount method, which returns the number of rows not hidden within collapsed groups.

The GetRecordCount method overrides the GetRecordCount method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.GetRowCount

TcxExtWebDataSource          See Also

Returns the RowCount property value.

function GetRowCount: Integer; override;

Description

The GetRowCount method is used to return the total number of rows that are not hidden within collapsed groups.  In other words, if dataset data is grouped, the GetRowCount method returns the number of rows accessible to display in data aware controls.

Note: If the dataset is not grouped, the GetRowCount method is designed to return the same value as the GetRecordCount method (for the RecordCount property).

The GetRowCount method overrides the GetRowCount method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.GetRowDisplayText

TcxExtWebDataSource          See Also

Returns a string representation of the specified field’s value.

function GetRowDisplayText(RowIndex: Integer; ItemIndex: Integer): string; override;

Description

The GetRowDisplayText method is used to return a string representation of the specified field’s value for display in data aware web controls. The RowIndex parameter specifies the index of a row in an internal rows list that are not hidden within collapsed groups.  The total number of rows in this internal list is specified by the RowCount property.  The ItemIndex parameter represents the index of a field.

If the RowIndex parameter points to a grouped row, the GetRowDisplayText method returns the value of a field that is used to group dataset data.

The GetRowDisplayText method overrides the GetRowDisplayText method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.GetRowExpanded

TcxExtWebDataSource

Returns a value indicating whether the specified row is expanded.

function GetRowExpanded(RowIndex: Integer): Boolean; override;

Description

The GetRowExpanded method is used to return a Boolean value indicating whether a row specified by the RowIndex parameter is expanded.

The RowIndex parameter specifies the index of a row in an internal rows list that are not hidden within collapsed groups.  The total number of rows in this internal list is specified by the RowCount property.

The GetRowExpanded method overrides the GetRowExpanded method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.GetRowLevel

TcxExtWebDataSource

Returns the grouping level of a specified row.

function GetRowLevel(RowIndex: Integer): Integer; override;

Description

When dataset data is grouped based upon the contents of several fields, its data can be represented in a tree-like manner.  In this instance, group rows at the first grouping level will be the parents for grouping rows at the second grouping level, etc.

The GetRowLevel method is used to return the grouping level of the row specified by the RowIndex parameter.

The RowIndex parameter specifies the index of a row in the internal rows list that are not hidden within collapsed groups.  The total number of rows in this internal list is specified by the RowCount property.

Note: If dataset data is not grouped, the GetRowLevel method returns 0.

The GetRowLevel method overrides the GetRowLevel method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.GetRowRecord

TcxExtWebDataSource

Returns the index of a dataset record - corresponding to the specified row - from an internal rows list.

function GetRowRecord(RowIndex: Integer): Integer; override;

Description

All the extended data source components (descendants of the TcxExtWebDataSource class) use a specially designed data controller object to perform data-processing operations such as sorting, grouping, etc.  The data controller object (DataController property) maintains several internal lists of rows to provide its necessary functionality.

The RowIndex parameter specifies the index of the row in an internal list of non hidden rows.  The total number of rows in this internal list is specified by the RowCount property.

The GetRowRecord method overrides the GetRowRecord method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.GetRowValue

TcxExtWebDataSource

Returns a value for the specified field and row.

function GetRowValue(RowIndex: Integer; ItemIndex: Integer): Variant; override;

Description

The GetRowValue method is used to return a value for the specified field that is contained within the row specified by the RowIndex parameter.

The RowIndex parameter specifies the index of a row in an internal rows list that is not hidden within collapsed groups.  The total number of rows in this internal list is specified by the RowCount property.   The ItemIndex parameter is the index of the field.

The GetRowValue method overrides the GetRowValue method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.GetSortingItemCount

TcxExtWebDataSource          See Also

Returns the total number of fields against whose values data is sorted.

function GetSortingItemCount: Integer; override;

Description

All the extended data source components (descendants of the TcxExtWebDataSource class) use a specially designed data controller object to perform data-processing operations such as sorting, grouping, etc.  The data controller object (the DataController property) can sort dataset records based upon the contents of individual field (fields).  The contents and data type for the sorting field determines the new order of records within an internal row list of the data controller.

The GetSortingItemCount method is used to return the total number of fields against whose values data is sorted.

The GetSortingItemCount method overrides the GetSortingItemCount method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.GetSortingItemIndex

TcxExtWebDataSource          See Also

Returns the index of a field specified by its position within a sorting fields list.

function GetSortingItemIndex(Item: Integer): Integer; override;

Description

The TcxExtWebDataSource class (and all its descendants) use a specifically designed data controller object (DataController property) to perform sorting against dataset records.  When a data controller sorts dataset data based upon the contents of a specific field, it creates a new item within an internal list of sorting fields.  This item contains a reference to the sorting field against whose values the dataset is sorted.

The GetSortingItemIndex method is used to return the index of a dataset field specified by its position within a sorting fields list. The Item parameter specifies the index of the field within the internal list of sorting fields.

The GetSortingItemIndex method overrides the GetSortingItemIndex method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.GetValue

TcxExtWebDataSource          See Also

Returns the Values property value.

function GetValue(ARecordIndex, AItemIndex: Integer): Variant; override;

Description

The GetValue method is used to return the value of a specified field that is contained within a dataset record specified by the ARecordIndex parameter.  The ItemIndex parameter is the index of the field whose value GetValue returns.

The GetValue method overrides the GetValue method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.Group

TcxExtWebDataSource          See Also See Also

Groups dataset data by a specified field’s contents.

procedure Group(GroupField, GroupIndex: Integer); override;

Description

The TcxExtWebDataSource class (and all its descendants) use a specifically designed data controller object (the DataController property) to perform grouping against dataset records.  When a data controller groups dataset data based upon the contents of a specific field, it creates a new item within an internal list of grouping fields.  This item contains a reference to the grouping field against whose values the dataset is grouped.  The order of items within a grouping fields list is specified by the grouping level.

The Group method is used to group records of the corresponding dataset based upon the contents of a specified field.  The field is specified by its index via the GroupField parameter.

The GroupIndex parameter specifies the index of an item represented a grouping field within an internal grouping fields list maintained by a data controller object.  In other words, the GroupIndex parameter specifies the grouping level of the field.

Generally the Group method performs the following actions:

•	Checks the AllowGrouping property to determine whether the dataset can be grouped.  If it cannot (the AllowGrouping property is set to False), the Group method performs nothing and sets the ActionName property to ' UNDEFINED' specified by the scxUndefinedAction constant.

•	Invokes the OnGrouping event (if its handler is assigned).

•	Forces the corresponding data controller object to group dataset records in compliance with the passed GroupField and GroupIndex parameters.

•	Sets the ActionName property to 'GROUP' specified by the scxGroupingAction constant.

•	Invokes the OnGrouped event (if its handler is assigned).

The Group method overrides the Group method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.InsertRecord

TcxExtWebDataSource          See Also

Inserts a new record to the associated dataset.

procedure InsertRecord(ARowIndex: Integer); override;

Description

The InsertRecord method is used to create a new, empty record in the dataset and activates this record.  The ARowIndex parameter specifies the index of a newly created record.

Generally the InsertRecord method performs the following actions:

•	Checks the value returned by the CanEdit method to determine whether the dataset can be edited.  If it cannot (the return value is False), the InsertRecord method performs nothing and sets the ActionName property to 'CANCELEDIT' specified by the scxCancelEditAction constant.

•	Invokes the OnInserting event (if its handler is assigned).

•	Forces the corresponding data controller object to insert a new record to the position specified by the ARowIndex parameter and to change the index of the focused row (FocusedRowIndex property).

•	Sets the ActionName property to 'INSERT' specified by the scxInsertAction constant.

•	Invokes the OnInserted event (if its handler is assigned).

The InsertRecord method overrides the InsertRecord method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.DoSetValues

TcxExtWebDataSource          See Also

Updates the data source component with respect to values received within the request.

procedure DoSetValues; override;

Description

This method implements the DoSetValues method of the IcxWebValues interface.  The DoSetValues method is used to set the values arriving within a request to the data source component’s ActionName and FocusedRowIndex properties.  It also updates properties of the corresponding data controller object specified by the DataController property (these properties are designed to store information about grouping, sorting and row expansion).


TcxExtWebDataSource.PostEdit

TcxExtWebDataSource          See Also

Posts changes to the associated dataset.

procedure PostEdit(APriorControlName: string); override;

Description

Use the PostEdit method to modify record data for the associated dataset.

The APriorControlName parameter specifies the name of a prior data control (if any) whose values will be used to modify the record field (fields) of the corresponding dataset regardless of values from other data controls that are associated with the same data source component and bound to the same record field (fields).

Generally, the PostEdit method performs the following actions:

•	Checks the value returned by the CanEdit method to determine whether the dataset can be edited.  If it cannot (return value is False), the PostEdit method performs nothing and sets the ActionName property to \ 'CANCELEDIT' specified by the scxCancelEditAction constant.

•	Invokes the OnBeforePost event (if its handler is assigned).

•	Calls the ChangedData method to modify corresponding dataset data.

•	Sets the ActionName property to 'POSTEDIT' specified by the scxPostEditAction constant.

•	Invokes the OnAfterPost event (if its handler is assigned).

The PostEdit method overrides the PostEdit method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.RegisterActions

TcxExtWebDataSource          See Also

Registers server side events that can be handled by the data source component.

procedure RegisterActions; override;

Description

This method is used to register the server side events (actions), which can be handled by the data source component.  Registering an action implies calling the RegisterAction method of the TcxWebActionsHelper object (WebActionsHelper property).  The parameters transmitted to this method are the name of the event and the handler.

The RegisterActions method calls the inherited method with the same name and then registers server side events dealing with data navigation and modification (including data sorting, grouping, and row expansion) within the corresponding dataset.

Note that only the server side events that are invoked by the client side of the application should be registered.

Note: It is recommended to register an event with an empty string name.  This allows EWF to avoid errors, when the __ACTIONNAME hidden input (specifying the event name) is transmitted empty.  No actions will be executed only if the __TARGETNAME hidden input (specifying the component) is empty.

The RegisterActions method overrides the RegisterActions method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.RegisterRenderers

TcxExtWebDataSource          See Also

Registers renderer classes, which render the HTML code representing a data source component for a particular browser.

procedure RegisterRenderers; override;

Description

This method is used internally to register renderer classes (TcxWebRenderer descendants), which render the HTML code representing a data source component for a specific browser.  Registering a renderer class implies calling the RegisterRenderer method of the TcxWebRenderHelper object (WebRenderHelper property).

The RegisterRenderers method of the TcxExtWebDataSource class registers two classes designed to render HTML code for Internet Explorer and Netscape Navigator 4.0.

The RegisterRenderers method overrides the RegisterRenderers method of the TcxCustomWebDataSource class.

Do not call the inherited RegisterRenderers in the overridding method.


TcxExtWebDataSource.RegisterValues

TcxExtWebDataSource          See Also

Registers the HTML elements that contain data related to a data source component.

procedure RegisterValues; override;

Description

This method implements the RegisterValues method of the IcxWebValues interface.  It is designed to register the IDs of the HTML elements displaying the component’s data or containing auxiliary information.  Registering a value implies calling the RegisterValue method of the TcxWebValuesHelper object (WebValuesHelper property).

First, the RegisterValues method calls the inherited RegisterValues method which registers two hidden inputs – for values of the ActionName and FocusedRowIndex properties.  Then the RegisterValues method registers three additional hidden inputs for values of the specific properties of the data controller object specified by the DataController property.  These properties are designed to store information about row grouping, sorting, and expansion.

This allows a data source component to update itself after a user has performed any actions against corresponding dataset data (such as row sorting, grouping, and expansion).


TcxExtWebDataSource.SetDataController

TcxExtWebDataSource          See Also

Sets the DataController property value.

procedure SetDataController(Value: TcxCustomDataController);

Description

The SetDataController method sets the DataController property to the value specified by the Value parameter.  The Value parameter represents a data controller object that implements the necessary functionality for extended data processing (row sorting, grouping, and expansion).


TcxExtWebDataSource.SetEditValue

TcxCustomWebDataSource          See Also

Posts an entered value to a specified field of an inserted record.

procedure SetEditValue(AItemIndex: Integer; AValue: Variant); override;

Description

The SetEditValue method assigns a value specified by the Value parameter to a specific dataset field of a newly inserted record.  The ItemIndex parameter is the index of a field whose value is being set by the SetEditValue method.  The AValue parameter contains the edited cell value.

Note that the SetEditValue method invokes the OnSetEditValue event, if its handler is assigned.

The SetEditValue method overrides the SetEditValue method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.SetFocusedRowIndex

TcxExtWebDataSource          See Also

Sets the FocusedRowIndex property value.

procedure SetFocusedRowIndex(Value: Integer); override;

Description

The SetFocusedRowIndex method is used to set the FocusedRowIndex property to a specified value.  The assigned value is transmitted as the Value parameter.

The SetFocusedRowIndex method performs the following actions.

•	Invokes the OnScrolling event (if its handler is assigned).

•	Forces a data controller object (the DataController property) to change the focused row index to a value specified by the Value parameter.

•	Invokes the OnScrolled event (if its handler is assigned).

The GetFocusedRowIndex method overrides the GetFocusedRowIndex method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.SetValue

TcxExtWebDataSource          See Also

Sets the Values property value.

procedure SetValue(ARecordIndex, AItemIndex: Integer; const Value: Variant); override;

Description

The SetValue method is used to set the Values property to a value specified by the Value parameter.  The Value parameter represents the value of a specific field which is contained within a dataset record specified by the ARecordIndex parameter.

The ItemIndex parameter is the index of a field whose value the SetValue method sets.

The SetValue method overrides the SetValue method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.Sort

TcxExtWebDataSource          See Also

Sorts dataset data by the specified field’s contents.

procedure Sort(SortIndex: Integer; SortOrder: TcxWebDataSortOrder); override;

Description

The Sort method is used to sort records of the corresponding dataset based upon the contents of a specified field.  The field is specified by its index via the SortIndex parameter.

Data can be sorted by specified field values in both ascending and descending order.  The sort order of a specific dataset field is specified by the SortOrder parameter.  The following values are available for this parameter.

Value	Meaning
WsoNone	The column is not sorted.
wsoAscending	The column is sorted in the ascending order.
wsoDescending	The column is sorted in the descending order.

Generally the Sort method performs the following actions:

•	Checks the AllowSorting property to determine whether the dataset can be sorted.  If it cannot (the AllowSorting property is set to False), the Sort method performs nothing and sets the ActionName property to ' UNDEFINED' specified by the scxUndefinedAction constant.

•	Invokes the OnSorting event (if its handler is assigned).

•	Forces the corresponding data controller object (the DataController property) to sort dataset records in compliance with the passed SortIndex and SortOrder parameters.

•	Sets the ActionName property to 'SORT' specified by the scxSortingAction constant.

•	Invokes the OnSorted event (if its handler is assigned).

The Sort method overrides the Sort method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.UnGroup

TcxExtWebDataSource          See Also

Clears data grouping by specified field values.

procedure UnGroup(UnGroupIndex: Integer); override;

Description

The UnGroup method is used to cancel data grouping by the contents of a specified field.  The field is specified by its index via the UnGroupIndex parameter.

The UnGroup method performs the following actions:

•	Checks the AllowGrouping property to determine whether the dataset can be grouped/ungrouped.  If it cannot (the AllowGrouping property is set to False), the UnGroup method performs nothing and sets the ActionName property to 'UNDEFINED' specified by the scxUndefinedAction constant.

•	Invokes the OnGrouping event (if its handler is assigned).

•	Forces the corresponding data controller object (the DataController property) to ungroup dataset records in compliance with the passed UnGroupIndex parameter.

•	Sets the ActionName property to 'GROUP' specified by the scxGroupingAction constant.

•	Invokes the OnGrouped event (if its handler is assigned).

The UnGroup method overrides the UnGroup method of the TcxCustomWebDataSource class.


TcxExtWebDataSource.WebExpand

TcxExtWebDataSource          See Also

Runs the Expand method with appropriate parameters.

procedure WebExpand(const AParameters: TcxActionParameters); virtual;

Description

The WebExpand method is registered as the handler for the ‘EXPAND’ server side event (action).  AParameters specifies data required to handle this event.  In particular, the ParamString field of AParameters contains an integer which specifies the index of the row a user expands/collapses.

The WebExpand method processes data passed via the AParameters parameter and forms the necessary values for the Expand method’s parameters.  Then, the WebExpand method calls the Expand method with these formed parameters.

Override the Expand method in order to perform additional actions when the ‘EXPAND‘ event is handled.


TcxExtWebDataSource.WebGroup

TcxExtWebDataSource          See Also

Runs the Group method with appropriate parameters.

procedure WebGroup(const AParameters: TcxActionParameters); virtual;

Description

The WebGroup method is registered as the handler for the ‘GROUP’ server side event (action).  AParameters specifies data required to handle this event.  In particular, the ParamString field of AParameters contains two integers which specify the index of the grouping field and its group level.

The WebGroup method processes data passed via the AParameters parameter and forms the necessary values for the Group method’s parameters.  Then, the WebGroup method calls the Group method with these formed parameters.

Override the Group method in order to perform additional actions when the ‘GROUP’ event is handled.


TcxExtWebDataSource.WebSort

TcxExtWebDataSource          See Also

Runs the Sort method with the appropriate parameters.

procedure WebSort(const AParameters: TcxActionParameters); virtual;

Description

The WebSort method is registered as the handler for the ‘SORT’ server side event (action).  AParameters specifies data required to handle this event.  In particular, the ParamString field of AParameters contains an integer that specifies the index of the sorting field.

The WebSort method processes data passed via AParameters and forms the necessary values for the Sort method’s parameters.  Then the WebSort method calls the Sort method with these formed parameters.

Override the Sort method in order to perform additional actions when the ‘SORT’ event is handled.


TcxExtWebDataSource.WebUnGroup

TcxExtWebDataSource          See Also

Runs the UnGroup method with the appropriate parameters.

procedure WebUnGroup(const AParameters: TcxActionParameters); virtual;

Description

The WebUnGroup method is registered as the handler for the ‘UNGROUP’ server side event (action).  AParameters specifies data required to handle this event (in particular, the ParamString field of the AParameters parameter contains an integer which specifies the index of an ungrouping field).

The WebUnGroup method processes data passed via the AParameters parameter and forms the necessary value for the UnGroup method’s parameter.  Then the WebUnGroup method calls the UnGroup method with this formed parameter.

Override the UnGroup method in order to perform additional actions when the ‘UNGROUP’ event is handled.


TcxExtWebDataSource.OnExpanded

TcxExtWebDataSource          See Also

Fires after a grouping row has been expanded/collapsed.

type

  TExpandingEvent = procedure(Sender: TObject; ARowIndex: Integer; AExpanded, ARecursive: Boolean) of object;

property OnExpanded: TExpandingEvent;

Description

Write an OnExpanded event handler to perform specific actions immediately after a grouping row has been expanded/collapsed.  The OnExpanded event is invoked by the Expand method after it expands/collapses a specific grouping row and sets the ActionName property to ‘EXPAND’ specified by the scxExpandingAction constant.

The ARowIndex parameter specifies the index of the row a user has expanded/collapsed. The AExpanded parameter indicates whether the row specified by the ARowIndex parameter has been expanded.  If the AExpanded parameter is set to False, the row has been collapsed.

The ARecursive parameter indicates whether all child grouped rows have been expanded or collapsed as specified by the AExpanded parameter.


TcxExtWebDataSource.OnExpanding

TcxExtWebDataSource          See Also

Fires before a collapsed grouping row has expanded.

type

  TExpandingEvent = procedure(Sender: TObject; ARowIndex: Integer; AExpanded, ARecursive: Boolean) of object;

property OnExpanding: TExpandingEvent;

Description

Write an OnExpanding event handler to perform specific actions before a grouping row is expanded/collapsed.  The OnExpanded event is invoked by the Expand method before it expands/collapses the specified grouping row and sets the ActionName property to ‘EXPAND’ specified by the scxExpandingAction constant.

The ARowIndex parameter specifies the index of a row that is to be expanded/collapsed. The AExpanded parameter indicates whether the row specified by the ARowIndex parameter is to be expanded.  If the AExpanded parameter is set to False, the row is to be collapsed.

The ARecursive parameter indicates whether all child grouped rows are to be expanded or collapsed as specified by the AExpanded parameter.


TcxExtWebDataSource.OnGrouped

TcxExtWebDataSource          See Also

Fires after data has been grouped by values of a specified column.

type

  TGroupingEvent = procedure(Sender: TObject; GroupField, GroupIndex: Integer) of object;

property OnGrouped: TGroupingEvent;

Description

Write an OnGrouped event handler to perform specific actions each time a dataset has been grouped based upon the contents of a specified field.  The OnGrouped event is invoked by the Group method after it groups the dataset and sets the ActionName property to ‘GROUP’ specified by the scxGroupingAction constant.

The GroupField parameter specifies the index of the field whose values are used to group dataset records.  The GroupIndex parameter specifies the group level of the grouping field.


TcxExtWebDataSource.OnGrouping

TcxExtWebDataSource          See Also

Fires before the associated dataset is grouped.

type

  TGroupingEvent = procedure(Sender: TObject; GroupField, GroupIndex: Integer) of object;

property OnGrouping: TGroupingEvent;

Description

Write an OnGrouping event handler to perform specific actions each time a dataset is grouped based upon the contents of a specified field.  The OnGrouping event is invoked by the Group method before it groups a dataset and sets the ActionName property to ‘GROUP’ specified by the scxGroupingAction constant.

The GroupField parameter specifies the index of the field whose values are used to group dataset records.  The GroupIndex parameter indicates the group level of the grouping field.


TcxExtWebDataSource.OnSorted

TcxExtWebDataSource          See Also

Fires after the associated dataset has been sorted.

type

  TSortingEvent = procedure(Sender: TObject; SortField: Integer; SortOrder: TcxWebDataSortOrder) of object;

property OnSorted: TSortingEvent;

Description

Write an OnSorted event handler to perform specific actions each time a dataset has been sorted by the contents of a specified field.  The OnSorted event is invoked by the Sort method after it sorts a dataset and sets the ActionName property to ‘SORT’ specified by the scxSortingAction constant.

The SortField parameter specifies the index of the field whose values are used to sort dataset records.  The SortOrder parameter indicates the order (ascending, descending or none) in which the contents of the dataset are sorted.


TcxExtWebDataSource.OnSorting

TcxExtWebDataSource          See Also

Fires before the associated dataset is sorted.

type

  TSortingEvent = procedure(Sender: TObject; SortField: Integer; SortOrder: TcxWebDataSortOrder) of object;

property OnSorting: TSortingEvent;

Description

Write the OnSorting event handler to perform specific actions each time a dataset is sorted based upon the contents of a specified field.  The OnSorting event is invoked by the Sort method after it sorts a dataset and sets the ActionName property to ‘SORT’ specified by the scxSortingAction constant.

The SortField parameter specifies the index of the field whose values are used to sort dataset records.  The SortOrder parameter indicates the order (ascending, descending or none) in which the contents of the dataset are sorted.


TcxWebDataSource
 TcxWebDataSource Object

Hierarchy          Properties          Methods          Events          See Also

Provides specific memory dataset functionality and an interface between the dataset and data aware web controls on a form.

Unit

cxWebExtData

TcxWebDataSource = class(TcxExtWebDataSource)

Description

The TcxWebDataSource class represents an extended data source component, which provides a conduit between data stored in memory and data aware web controls on a form.  This component performs extended data manipulations with the data.  The TcxWebDataSource component provides specific memory dataset functionality to create and store data in memory but access it as if it were from a standard database file.

Since the TcxWebDataSource class is a direct descendant of the TcxExtWebDataSource class, it performs row sorting, grouping and expansion of the corresponding memory dataset.  Just like its ancestor (the TcxExtWebDataSource class), the TcxWebDataSource class uses a specially designed data controller object to manage such enhanced data manipulations.  This data controller is accessed via the DataController property of the TcxWebDataSource class.

Being a descendant of the TcxCustomWebDataSource and TcxExtWebDataSource classes, the TcxWebDataSource class supports the IcxCodeProvider, IcxWebActions, and IcxWebValues interfaces.  Thus it provides functionality for rendering HTML and Java script code, handling specific server-side events, manipulating values of a web data source component, and performing enhanced data manipulations.

Use the TcxWebDataSource component if you want to allow a user at the client side to perform grouping and sorting of records created manually and stored in memory.  If you need to access data from a physical database, you can use the TcxWebDBDataSource component.  In both instances, you should use data aware web controls (i.e. TcxWebDBGrid component) that enable an end user to perform all extended data manipulations.

If you do not need grouping or sorting of dataset data you can make use of the TcxStdWebDataSource component. All datasets must be associated with a data source component if their data is to be displayed and manipulated in data aware controls.  Similarly, each data aware web control needs to be associated with a data source component in order for the control to receive and manipulate data.

The TcxWebDataSource component supports a set of custom events for client side processing.  These event types are specified by the TcxWebDataSourceEvent type.


TcxWebDataSource Hierarchy
Hierarchy

TComponent

     |

TcxCustomWebDataSource

     |

TcxExtWebDataSource

     |

TcxWebComponent


Properties for TcxWebDataSource
TcxWebDataSource Properties

TcxWebDataSource          Legend

In TcxWebDataSource

DataController

Fields

RecordCount

Derived from TcxExtWebDataSource

AllowExpanding

AllowGrouping

AllowSorting

Derived from TcxCustomWebDataSource

ActionName

AllowEditing

ClientCount

Clients

DisplayTexts

FocusedRowIndex

FullName

KeyFieldName

LoadAllRecords

RowCount

Values

WebActionsHelper

WebRenderHelper

WebValuesHelper

Derived from TcxWebComponent

CustomEvents

Styles

WebComponentState

WebEventsHelper

WebRendererClasses

WebScriptsHelper


Methods for TcxWebDataSource
TcxWebDataSource Methods

TcxWebDataSource          Legend

In TcxWebDataSource

Create

DataNotification

Destroy

GetDataController

GetFields

LoadFromStream

RegisterRenderers

SaveToStream

SetDataController

SetFields

SetRecordCount

UpdateValue

Derived from TcxExtWebDataSource

CancelEdit

ClearGrouping

ClearSorting

DeleteRecord

DoSetValues

EditRecord

Expand

FullCollapse

FullExpand

GetAllowExpanding

GetAllowGrouping

GetAllowSorting

GetDisplayText

GetFocusedRowIndex

GetGroupingItemCount

GetGroupingItemIndex

GetItemGroupIndex

GetItemHelperClass

GetItemSortOrder

GetRecordCount

GetRowCount

GetRowDisplayText

GetRowExpanded

GetRowLevel

GetRowRecord

GetRowValue

GetSortingItemCount

GetSortingItemIndex

GetValue

Group

InsertRecord

PostEdit

RegisterActions

RegisterValues

SetEditValue

SetFocusedRowIndex

SetValue

Sort

UnGroup

WebExpand

WebGroup

WebSort

WebUnGroup

Derived from TcxCustomWebDataSource

CanEdit

CanSetValues

ChangedData

DefineProperties

FieldByName

GetAllowEditing

GetWebActionsHelper

GetWebRenderHelper

GetWebValuesHelper

Loaded

NeedUpdateFields

ReadActionName

ReadFocusedRowIndex

Refresh

RegisterClient

UnRegisterClient

UpdateDataLayout

UpdateDefaultFields

WebCancelEdit

WebDelete

WebInsert

WebMoveBy

WebMoveTo

WebPostEdit

WebRefresh

WebStartEdit

WriteActionName

WriteFocusedRowIndex

Derived from TcxWebComponent

GetProviders

GetState

GetVariableName

GetWebEventsHelper

GetWebScriptsHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterEvents

ScriptsSubscription

SetState

StyleChanged

ValidateContainer


Events for TcxWebDataSource
TcxWebDataSource Events

TcxWebDataSource          Legend

Derived from TcxExtWebDataSource

OnExpanded

OnExpanding

OnGrouped

OnGrouping

OnSorted

OnSorting

Derived from TcxCustomWebDataSource

OnAfterPost

OnBeforePost

OnCancelEdit

OnDeleted

OnDeleting

OnInserted

OnInserting

OnScrolled

OnScrolling

OnSetEditValue

OnSetInsertValue

OnStartEdit

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebDataSource.DataController

TcxWebDataSource          See Also

Specifies a specially designed data controller object.

property DataController: TcxWebDataController;

Description

The DataController property is used internally to specify a data controller object that implements the necessary functionality for data sorting, grouping, and row expansion/collapse.

This is an internally used protected property.


TcxWebDataSource.Fields

TcxWebDataSource          See Also

Represents the collection of fields available for data aware web controls.

property Fields: TcxWebDataControllerFields;

Description

Use the Fields property to access field components at the data source level.

A data source component implements the Fields property to provide access to its own fields collection specified by the TcxWebDataControllerFields class.  This collection contains field components (the TcxWebDBDataControllerField objects accessed via the Items property).

Before binding data aware web controls with a TcxWebDataSource component, you should create fields for a memory dataset maintained by this data source component.  This can be done via the Editing Fields dialog at design-time or via standard methods of a collection at runtime.

Accessing fields with the Fields property is useful for applications that:

•	Iterate over some or all fields in a dataset.

•	Perform additional operations with dataset data (such as grouping and sorting) based upon the value of a specific field from the Fields collection.

The Fields property of the TcxWebDataSource class redeclares the Fields property of the TcxCustomWebDataSource class.


TcxWebDataSource.RecordCount

TcxWebDataSource          See Also

Specifies the maximum number of records that can be stored in a memory dataset.

property RecordCount: Integer;

Description

Use the RecordCount property to limit the number of records within the memory dataset.  If zero, a memory dataset has no records.

The RecordCount property of the TcxWebDataSource class redeclares the RecordCount property of the TcxCustomWebDataSource class.


TcxWebDataSource.Create

TcxWebDataSource          See Also

Creates an instance of the TcxWebDataSource class.

constructor Create(AOwner: TComponent); override;

Description

Use the Create method to instantiate a data source component at runtime.  Data source components added to a form at design time are automatically created.

The Create method calls its inherited constructor and initializes the Fields and DataController properties.


TcxWebDataSource.DataNotification

TcxWebDataSource          See Also

Responds to notifications that dataset data is being modified.

procedure DataNotification(AUpdateType: TcxUpdateType); override;

Description

The DataNotification method of the TcxWebDataSource class performs specific actions in response to data changes in a memory dataset.  The DataNotification method updates all associated data controls  in order to display the proper data.

The AUpdateType parameter specifies the manner in which data changes in the corresponding dataset.

The DataNotification method overrides the DataNotification method of the TcxCustomWebDataSource class.


TcxWebDataSource.Destroy

TcxWebDataSource          See Also

Destroys the TcxWebDataSource component.

destructor Destroy; override;

Description

Do not call the Destroy method directly.  Instead, call the Free method, which checks that the data source reference is not nil before calling the Destroy method.

The Destroy method frees the Fields and DataController properties before calling the inherited destructor for the component.


TcxWebDataSource.GetDataController

TcxWebDataSource          See Also

Returns the DataController property value.

function GetDataController: TcxWebDataController;

Description

The GetDataController method returns a data controller object that implements the necessary functionality for data sorting, grouping, and row expansion/collapse.


TcxWebDataSource.GetFields

TcxWebDataSource          See Also

Returns the Fields property value.

function GetFields: TcxWebDataControllerFields;

Description

The GetFields method overrides the GetFields method of the TcxCustomWebDataSource class to perform a checked typecast and to return the Fields property value represented by the TcxWebDataControllerFields class.


TcxWebDataSource.LoadFromStream

TcxWebDataSource          See Also

Loads a memory dataset’s data from a stream.

procedure LoadFromStream(AStream: TStream);

Description

Call the LoadFromStream method to populate a memory dataset for the data source component with data from a stream.  The AStream parameter specifies the stream from which to read data.

A stream must contain data written to it by another TcxWebDataSource object using the SaveToStream method.


TcxWebDataSource.RegisterRenderers

TcxWebDataSource          See Also

Registers renderer classes, which render the HTML code representing a data source component for different browsers.

procedure RegisterRenderers; override;

Description

This method is used internally to register renderer classes (TcxWebRenderer descendants), that render the HTML code representing the data source component for different browsers.  Registering a renderer class implies calling the RegisterRenderer method of the TcxWebRenderHelper object (WebRenderHelper property).

The RegisterRenderers method of the TcxWebDataSource class registers two classes which render HTML code for Internet Explorer and Netscape Navigator 4.0.

The RegisterRenderers method overrides the RegisterRenderers method of the TcxExtWebDataSource class.


TcxWebDataSource.SaveToStream

TcxWebDataSource          See Also

Saves a memory dataset’s data to the specified stream.

procedure SaveToStream(AStream: TStream);

Description

Call the SaveToStream method to save memory dataset data to the stream specified by the AStream parameter.  This method is useful if you want to persist data created at runtime.

The saved data can be loaded back into another data source object using the LoadFromStream method.


TcxWebDataSource.SetDataController

TcxWebDataSource          See Also

Sets the DataController property value.

procedure SetDataController(Value: TcxWebDataController);

Description

The SetDataController method sets the DataController property to the value specified by the Value parameter.  The Value parameter represents a data controller object that implements the necessary functionality for extended data processing (sorting, grouping, and row expansion/collapse).


TcxWebDataSource.SetFields

TcxWebDataSource          See Also

Sets the Fields property value.

procedure SetFields(Value: TcxWebDataControllerFields);

Description

The SetFields method calls the inherited SetFields method of the TcxCustomWebDataSource class and passes the Value parameter to it.  The Value parameter specifies the data source field collection which is of type TcxWebDataControllerFields.


TcxWebDataSource.SetRecordCount

TcxWebDataSource          See Also

Sets the RecordCount property value.

procedure SetRecordCount(Value: Integer); override;

Description

The SetRecordCount method sets the RecordCount property to a value specified by the Value parameter.  This parameter limits the number of records that can be stored in a memory dataset at runtime.

The SetRecordCount method overrides the SetRecordCount method of the TcxCustomWebDataSource class.


TcxWebDataSource.UpdateValue

TcxWebDataSource          See Also

Updates a specified field value.

procedure UpdateValue(AItem: TcxCustomWebDataField; AValue: Variant); override;

Description

The UpdateValue method is used to assign a specified value to the dataset field within the focused record of the associated dataset.  The assigned value is specified by the AValue parameter.  The field is specified by the object representing it via the AItem parameter.

This method is called when the value of a specific field from the Fields collection should be updated as a result of dataset changes.  This allows data aware web controls that are bound to this field to display the proper field value.

The UpdateValue method overrides the UpdateValue method of the TcxCustomWebDataSource class.


TcxWebDBDataSource
 TcxWebDBDataSource Object

Hierarchy          Properties          Methods          Events          See Also

Provides an interface between a dataset component and data aware web controls on a form and performs extended data manipulations with dataset data.

Unit

cxWebExtData

TcxWebDBDataSource = class(TcxExtWebDataSource)

Description

The TcxWebDBDataSource class represents an extended data source component that provides a conduit between a dataset component and data-aware web controls that enable display, navigation, editing, sorting and grouping of the data underlying the dataset.

Since the TcxWebDBDataSource class is a direct descendant of the TcxExtWebDataSource class, it also performs row sorting, grouping and expansion for the corresponding dataset.  Like its ancestor (the TcxExtWebDataSource class) the TcxWebDBDataSource class uses a specially designed data controller object to manage such enhanced data manipulations.  This data controller is accessed via the DataController property of the TcxWebDBDataSource class.

Being a descendant of the TcxCustomWebDataSource and TcxExtWebDataSource classes the TcxWebDBDataSource class supports the IcxCodeProvider, IcxWebActions, and IcxWebValues interfaces.  Thus it provides functionality for rendering HTML and Java script code, handling specific server-side events, manipulating values for a web data source component, and enhanced data manipulations.

Use a TcxWebDBDataSource component if you want to allow a user at the client side to perform grouping and sorting of records in a physical database accessed via a dataset component.  If you need to access data from a memory dataset, you can use the TcxWebDataSource component.  In both instances, you should use data aware web controls (i.e. TcxWebDBGrid component) that enable a user to perform all extended data manipulations.

If you do not intend to group or sort dataset data, you can make use of the TcxStdWebdataSource component.

All datasets must be associated with a data source component if their data is to be displayed and manipulated in data aware controls.  Similarly, each data aware web control needs to be associated with a data source component in order for the control to receive and manipulate data.

The TcxWebDBDataSource component supports a set of custom events for client side processing.  These event types are specified by the TcxWebDataSourceEvent type.


TcxWebDBDataSource Hierarchy
Hierarchy

TComponent

     |

TcxCustomWebDataSource

     |

TcxExtWebDataSource

     |

TcxWebComponent


Properties for TcxWebDBDataSource
TcxWebDBDataSource Properties

TcxWebDBDataSource          Legend

In TcxWebDBDataSource

DataController

DataSet

DataSource

Fields

Derived from TcxExtWebDataSource

AllowExpanding

AllowGrouping

AllowSorting

Derived from TcxCustomWebDataSource

ActionName

AllowEditing

ClientCount

Clients

DisplayTexts

FocusedRowIndex

FullName

KeyFieldName

LoadAllRecords

RecordCount

RowCount

Values

WebActionsHelper

WebRenderHelper

WebValuesHelper

Derived from TcxWebComponent

CustomEvents

Styles

WebComponentState

WebEventsHelper

WebRendererClasses

WebScriptsHelper


Methods for TcxWebDBDataSource
TcxWebDBDataSource Methods

TcxWebDBDataSource          Legend

In TcxWebDBDataSource

CancelEdit

Create

DataNotification

DeleteRecord

Destroy

GetDataController

GetDataSet

GetFields

GetItemField

GetItemHelperClass

InsertRecord

NeedUpdateFields

RegisterRenderers

SetDataController

SetDataSet

SetFields

UpdateDefaultFields

UpdateValue

Derived from TcxExtWebDataSource

ClearGrouping

ClearSorting

DoSetValues

EditRecord

Expand

FullCollapse

FullExpand

GetAllowExpanding

GetAllowGrouping

GetAllowSorting

GetDisplayText

GetFocusedRowIndex

GetGroupingItemCount

GetGroupingItemIndex

GetItemGroupIndex

GetItemSortOrder

GetRecordCount

GetRowCount

GetRowDisplayText

GetRowExpanded

GetRowLevel

GetRowRecord

GetRowValue

GetSortingItemCount

GetSortingItemIndex

GetValue

Group

PostEdit

RegisterActions

RegisterValues

SetEditValue

SetFocusedRowIndex

SetValue

Sort

UnGroup

WebExpand

WebGroup

WebSort

WebUnGroup

Derived from TcxCustomWebDataSource

CanEdit

CanSetValues

ChangedData

DefineProperties

FieldByName

GetAllowEditing

GetWebActionsHelper

GetWebRenderHelper

GetWebValuesHelper

Loaded

ReadActionName

ReadFocusedRowIndex

Refresh

RegisterClient

SetRecordCount

UnRegisterClient

UpdateDataLayout

WebCancelEdit

WebDelete

WebInsert

WebMoveBy

WebMoveTo

WebPostEdit

WebRefresh

WebStartEdit

WriteActionName

WriteFocusedRowIndex

Derived from TcxWebComponent

GetProviders

GetState

GetVariableName

GetWebEventsHelper

GetWebScriptsHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterEvents

ScriptsSubscription

SetState

StyleChanged

ValidateContainer


Events for TcxWebDBDataSource
TcxWebDBDataSource Events

TcxWebDBDataSource          Legend

Derived from TcxExtWebDataSource

OnExpanded

OnExpanding

OnGrouped

OnGrouping

OnSorted

OnSorting

Derived from TcxCustomWebDataSource

OnAfterPost

OnBeforePost

OnCancelEdit

OnDeleted

OnDeleting

OnInserted

OnInserting

OnScrolled

OnScrolling

OnSetEditValue

OnSetInsertValue

OnStartEdit

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebDBDataSource.DataController

TcxWebDBDataSource          See Also

Specifies a specially designed data controller object.

property DataController: TcxWebDBDataController;

Description

The DataController property is used internally to specify a data controller object that implements the necessary functionality for data sorting, grouping, and row expansion/collapse.


TcxWebDBDataSource.DataSet

TcxWebDBDataSource          See Also

Specifies the dataset component to which the data source is bound.

property DataSet: TDataSet;

Description

Use the DataSet property to bind the TcxWebDBDataSource component to a dataset component in order to provide data.  The DataSet property value can be any TDataSet descendant object.

Set the DataSet property to an existing dataset component either at design time, or at runtime.  By changing the value of the DataSet property at runtime an application can effectively use the same data aware web controls to display and edit data for different datasets.


TcxWebDBDataSource.DataSource

TcxWebDBDataSource          See Also

Represents a standard data source object used to provide internal interactions.

property DataSource: TDataSource;

Description

The DataSource property is used internally to provide interaction between the underlying dataset (specified by the DataSet property) and the specially designed data controller object, which manages data sorting, grouping, and row expansion.  The data controller object is specified by the DataController property.

ReadOnly Property


TcxWebDBDataSource.Fields

TcxWebDBDataSource          See Also

Represents a collection of fields available for data aware web controls.

property Fields: TcxWebDBDataControllerFields;

Description

Use the Fields property to access field components at the data source level.

A data source component implements the Fields property to provide access to its own field collection specified by the TcxWebDBDataControllerFields class.  This collection contains field components (the TcxWebDBDataControllerField object accessed via the Items property).  Field components provide data aware controls access to the data of a particular field of an associated dataset.  If dataset fields are generated dynamically at runtime, the order of field components in the Fields collection corresponds directly to the order of columns in the table (or tables) underlying a dataset.  If a dataset uses persistent fields, then the order of field components in the Fields collection corresponds to the order of fields specified in the Fields Editor at design time.

Accessing fields with the Fields property is useful for applications that:

•	Iterate over some or all fields in a dataset.

•	Perform additional operations with dataset data (such as grouping and sorting) based upon the value of a specific field from the Fields collection.

•	Work with underlying tables (represented by a dataset) whose internal data structure is unknown at runtime.

The Fields property of the TcxWebDBDataSource class redeclares the Fields property of the TcxCustomWebDataSource class.


TcxWebDBDataSource.CancelEdit

TcxWebDBDataSource          See Also

Cancels un-posted changes to the current record.

procedure CancelEdit; override;

Description

Call the CancelEdit method to undo modifications made to one or more fields belonging to the active record of the associated dataset.  As long as those changes are not already posted, the CancelEdit method returns the record to its previous state.

As implemented in the TcxWebDBDataSource class, the CancelEdit method performs the following actions.

•	Checks whether the last performed action is a new record insert  (the ActionName property value equals ‘INSERT‘) and if so deletes the newly created record from the corresponding dataset.

•	Sets the ActionName property to ‘CANCELEDIT‘specified by the scxCancelEditAction constant.

•	Invokes the OnCancelEdit event (if its handler is assigned) and passes the index of the focused row as one of its parameters.

Typically, the CancelEdit method is used to back out of changes in response to user requests, or in field validation routines that back out illegal field values.

The CancelEdit method of the TcxWebDBDataSource class overrides the CancelEdit method of the TcxExtWebDataSource class.


TcxWebDBDataSource.Create

TcxWebDBDataSource          See Also

Creates an instance of the TcxWebDBDataSource class.

constructor Create(AOwner: TComponent); override;

Description

Use the Create method to instantiate a data source component at runtime.  Data source components added to a form at design time are automatically created.

The Create method calls its inherited constructor and initializes the Fields , DataSource, and DataController properties.  Then it initializes certain data controller object properties.


TcxWebDBDataSource.DataNotification

TcxWebDBDataSource          See Also

Responds to notifications that data is being modified (in the dataset).

procedure DataNotification(AUpdateType: TcxUpdateType); override;

Description

The DataNotification method of the TcxWebDBDataSource class performs specific actions in response to data changes in the corresponding dataset. The AUpdateType parameter specifies the manner in which data is changed in the associated dataset.

The DataNotification method overrides the DataNotification method of the TcxCustomWebDataSource class.


TcxWebDBDataSource.DeleteRecord

TcxWebDBDataSource          See Also

Deletes the specified record from the corresponding dataset.

procedure DeleteRecord(ARowIndex: Integer); override;

Description

The DeleteRecord method removes the specified record from the corresponding dataset.  The record is specified by its index via the ARowIndex parameter.

Note: The ARowIndex parameter is zero-based (it is assumed that the first dataset record is specified by the ARowIndex parameter which equals 0).  Standard Delphi dataset components assume their first record index to be 1.

The DeleteRecord method performs the following actions:

•	Checks the value returned by the CanEdit method to determine whether dataset data can be edited.  If it cannot (the return value is False), the DeleteRecord method performs nothing and sets the ActionName property to 'CANCELEDIT' specified by the scxCancelEditAction constant.

•	Invokes the OnDeleting event handler (if it is assigned) and passes a value of the ARowIndex parameter to it.

•	Forces the corresponding dataset to delete a record specified by the ARowIndex parameter.

•	Sets the ActionName property to 'DELETE' specified by the scxDeleteAction constant.

•	Invokes the OnDeleted event handler (if it is assigned) and passes a value of the ARowIndex parameter to it.

The DeleteRecord method overrides the DeleteRecord method of the TcxExtWebDataSource class.


TcxWebDBDataSource.Destroy

TcxWebDBDataSource          See Also

Destroys the TcxWebDBDataSource component.

destructor Destroy; override;

Description

Do not call the Destroy method directly.  Instead, call the Free method, which checks that the data source reference is not nil before calling the Destroy method.

The Destroy method frees the Fields and DataController properties before calling the inherited destructor for the component.


TcxWebDBDataSource.GetDataController

TcxWebDBDataSource          See Also

Returns the DataController property value.

function GetDataController: TcxWebDBDataController;

Description

The GetDataController method returns the data controller object which implements the necessary functionality for data sorting, grouping, and row expansion/collapse.

The GetDataController method calls the inherited method with the same name and performs type casting of the obtained value to a proper type.


TcxWebDBDataSource.GetDataSet

TcxWebDBDataSource          See Also

Returns the DataSet property value.

function GetDataSet: TDataSet;

Description

The GetDataSet method returns a dataset component to which the TcxWebDBDataSource component is bound.  The value returned by the GetDataSet method is any TDataSet descendant object.


TcxWebDBDataSource.GetFields

TcxWebDBDataSource          See Also

Returns the Fields property value.

function GetFields: TcxWebDBDataControllerFields;

Description

The GetFields method overrides the GetFields method of the TcxCustomWebDataSource class to perform a checked typecast and to return the Fields property value represented by the TcxWebDBDataControllerFields class.


TcxWebDBDataSource.GetItemField

TcxWebDBDataSource          See Also

Returns the dataset field specified by the name of the corresponding data source field.

function GetItemField(AItemName: string): TField;

Description

The GetItemField method is used to retrieve the dataset field that is specified by the name of the corresponding field from the Fields collection of the data source component.

The AItemName parameter is the name (the Name property value) of an existing field from the Fields collection. The GetItemField method returns the TField component that represents a specified field.  If the specified field does not exist, the GetItemField method raises an exception.


TcxWebDBDataSource.GetItemHelperClass

TcxWebDBDataSource          See Also

Returns the specified field’s helper object type

function GetItemHelperClass(AItemIndex: Integer): TcxDataFieldHelperClass; override;

Description

Each field-representing object (accessed via the Fields property) delegates this part of its functionality to a specially designed helper object.  The GetItemHelperClass method returns this object type.  The reference can point to any descendant of the TcxDataFieldHelper class.  There are a number of descendants specifically designed for different field types.  These classes are TcxStringFieldHelper, TcxIntegerFieldHelper, TcxFloatFieldHelper, TcxDateTimeFieldHelper, TcxBooleanFieldHelper and TcxImageFieldHelper.


TcxWebDBDataSource.InsertRecord

TcxWebDBDataSource          See Also

Inserts a new record to the associated dataset.

procedure InsertRecord(ARowIndex: Integer); override;

Description

The InsertRecord method is used to create a new, empty record in the dataset and make this record active.  The ARowIndex parameter specifies the index of the newly created record.

Generally, the InsertRecord method performs the following actions:

•	Checks the value returned by the CanEdit method to determine whether the dataset can be edited.  If it cannot (the return value is False), the InsertRecord method performs nothing and sets the ActionName property to 'CANCELEDIT' specified by the scxCancelEditAction constant.

•	Invokes the OnInserting event (if its handler is assigned) and passes the value of ARowIndex to it.

•	Forces the corresponding data controller object to change the index of the focused row (the FocusedRowIndex property).  Then forces the corresponding dataset component to insert a new record and post changes.

•	Sets the ActionName property to 'INSERT' specified by the scxInsertAction constant.

•	Invokes the OnInserted event (if its handler is assigned) and passes the value of the ARowIndex to it.

The InsertRecord method overrides the InsertRecord method of the TcxExtWebDataSource class.


TcxWebDBDataSource.NeedUpdateFields

TcxWebDBDataSource          See Also

Returns a value indicating whether the Fields list should be updated.

function NeedUpdateFields: Boolean; override;

Description

The NeedUpdateFields method is used to verify whether the Fields list of the data source component properly represents a collection of fields in the corresponding dataset. The NeedUpdateFields method returns True if the Fields list of the data source component should be updated due to the changes within the corresponding dataset.

The NeedUpdateFields method overrides the NeedUpdateFields method of the TcxCustomWebDataSource class.


TcxWebDBDataSource.RegisterRenderers

TcxWebDBDataSource

Registers renderer classes, which render the HTML code representing a data source component for a particular browser.

procedure RegisterRenderers; override;

Description

This method is used internally to register renderer classes (TcxWebRenderer descendants), which render the HTML code representing the data source component for different browsers.  Registering a renderer class implies calling the RegisterRenderer method of the TcxWebRenderHelper object (WebRenderHelper property).

The RegisterRenderers method for the TcxWebDBDataSource class registers two classes which render HTML code for Internet Explorer and Netscape Navigator 4.0. The RegisterRenderers method overrides the RegisterRenderers method of the TcxExtWebDataSource class.

Do not call the inherited RegisterRenderers in the overridden method.


TcxWebDBDataSource.SetDataController

TcxWebDBDataSource          See Also

Sets the DataController property value.

procedure SetDataController(Value: TcxWebDBDataController);

Description

The SetDataController method sets the DataController property to the value specified by the Value parameter.  The Value parameter represents a data controller object that implements the necessary functionality for extended data processing (data sorting, grouping, and row expanding/collapsing).


TcxWebDBDataSource.SetDataSet

TcxWebDBDataSource          See Also

Sets the DataSet property value.

procedure SetDataSet(Value: TDataSet);

Description

The SetDataSet method sets the DataSet property to the value specified by the Value parameter.  The Value parameter represents a dataset component to which a TcxWebDBDataSource component is bound in order to provide data.


TcxWebDBDataSource.SetFields

TcxWebDBDataSource          See Also

Sets the Fields property value.

procedure SetFields(Value: TcxWebDBDataControllerFields);

Description

The SetFields method calls the inherited SetFields method of the TcxCustomWebDataSource class and passes the Value parameter to it.  The Value parameter specifies the data source field collection represented by the TcxWebDBDataControllerFields object.


TcxWebDBDataSource.UpdateDefaultFields

TcxWebDBDataSource          See Also

Updates dynamically generated field-representing objects of the data source.

procedure UpdateDefaultFields; override;

Description

A data source component implements the Fields property to provide access to a collection of specific fields corresponding to dataset fields.  By default, fields of the corresponding dataset are dynamic (dataset uses default fields).  So in turn, the Fields property refers to a set of dynamic field components created automatically based on the current structure of the dataset fields.

The UpdateDefaultFields method is used internally to update field-representing objects specified by the Fields property in response to changes to dataset fields (if the corresponding dataset uses default fields).

The UpdateDefaultFields method overrides the UpdateDefaultFields method of the TcxCustomWebDataSource class.


TcxWebDBDataSource.UpdateValue

TcxWebDBDataSource          See Also

Updates the value of the specified field.

procedure UpdateValue(AItem: TcxCustomWebDataField; AValue: Variant); override;

Description

The UpdateValue method is used to assign the specified value to the dataset field within the focused record of the associated dataset.  The assigned value is specified by the AValue parameter.  The field is specified by the object representing it via the AItem parameter.

This method is called when the value of a specific field from the Fields collection should be updated as a result of dataset changes.  This allows data aware web controls that are bound to this field to display the proper field value.

The UpdateValue method overrides the UpdateValue method of the TcxCustomWebDataSource class.


TcxCustomWebDataModule
TcxCustomWebDataModule Object

Hierarchy          Properties          Methods          Events          See Also

Serves as the base class for all EWF modules in a web application.

Unit

cxWebModule

TcxCustomWebDataModule = class(TDataModule, IcxWebModule)

Description

The TCustomWebDataModule class is the common base class for EWF modules that can be used in a web application.  This class introduces properties for the current HTTP request and response objects (the Request and Response properties), a property to hold the current session object (the Session property), and events that let you respond when the web module is activated and deactivated (the OnActivate and OnDeactivate events).  The TCustomWebDataModule class also introduces a ModuleHelper property to which it delegates the IcxWebModule interface implementation to control a particular web module’s active state.

Do not create instances of the TCustomWebDataModule class.  It is designed only as a base class.  Instead, use descendant component classes (such as TcxWebHomeDataModule, TcxWebPageModule, and TcxWebDataModule classes) to add a specific web module to your application.


TcxCustomWebDataModule Hierarchy
Hierarchy

TDataModule


Properties for TcxCustomWebDataModule
TcxCustomWebDataModule Properties

TcxCustomWebDataModule          Legend

In TcxCustomWebDataModule

ModuleHelper

Request

Response

Session


Methods for TcxCustomWebDataModule
TcxCustomWebDataModule Methods

TcxCustomWebDataModule          Legend

In TcxCustomWebDataModule

Create

CreateNew

Destroy

GetModuleHelper

GetModuleHelperClass


Events for TcxCustomWebDataModule
TcxCustomWebDataModule Events

TcxCustomWebDataModule          Legend

In TcxCustomWebDataModule

OnActivate

OnDeactivate


TcxCustomWebDataModule.ModuleHelper

TcxCustomWebDataModule          See Also

Returns a helper object that manages web module state and generates OnActivate and OnDeactivate events.

property ModuleHelper: TcxWebModuleHelper;

Description

The TcxCustomWebDataModule class delegates web module state management and specific events generating the TcxWebModuleHelper object.  This object is retrieved via the ModuleHelper property, which implements the IcxWebModule interface.  The TcxWebModuleHelper object fires the OnActivate and OnDeactivate events when the web module is activated and deactivated.

ReadOnly Property


TcxCustomWebDataModule.OnActivate

TcxCustomWebDataModule          See Also

Fires after the web module has been activated.

property OnActivate: TNotifyEvent;

Description

Write an OnActivate event handler to perform any initializations immediately after a web module is first activated.

The TcxCustomWebDataModule class delegates firing of the OnActivate event and storing its handler to a specially designed helper object (the ModuleHelper property).  This is implemented via the OnActivate event of the TcxWebModuleHelper class.

Thus you should use the OnActivate event property of a particular web module (a TcxCustomWebDataModule descendant) to assign a desired event handler.

The order in which events fire is described in The Order of Web Modules Events topic.


TcxCustomWebDataModule.OnDeactivate

TcxCustomWebDataModule          See Also

Fires before the web module is deactivated.

property OnDeactivate: TNotifyEvent;

Description

Write an OnDeactivate event handler to perform any final cleanup immediately before the web module is deactivated.

The TcxCustomWebDataModule class delegates firing of the OnDeactivate event and storing its handler to a specially designed helper object (the ModuleHelper property).  This is implemented via the OnDeactivate event of the TcxWebModuleHelper class.

Thus you should use the OnDeactivate event property of a particular web module (a TcxCustomWebDataModule descendant) to assign a desired event handler.

The order in which events fire is described in The Order of Web Modules Events topic.


TcxCustomWebDataModule.Request

TcxCustomWebDataModule          See Also

Provides access to the current request object.

property Request: TWebRequest;

Description

Read the Request property to obtain information about the current HTTP request message.  The request object provides access to the headers of the request message, as well as the content of the message.

ReadOnly Property


TcxCustomWebDataModule.Response

TcxCustomWebDataModule          See Also

Provides access to the current response object.

property Response: TWebResponse;

Description

Read the Response property to manipulate the response message that the application builds as a reply to the message that the Request property specifies.  The response object provides access to the headers of the response message, as well as the content of the message.

ReadOnly Property


TcxCustomWebDataModule.Session

TcxCustomWebDataModule          See Also

Provides access to the current web session.

property Session: TAbstractWebSession;

Description

Read the Session property to manipulate current web session information.  Web sessions persist over multiple calls from the same end user until they are terminated (for example, when the user logs out or when a timeout period elapses).

ReadOnly Property


TcxCustomWebDataModule.Create

TcxCustomWebDataModule          See Also

Creates an instance of the TcxCustomWebDataModule object.

constructor Create(AOwner: TComponent); override;

Description

The Create method is used to create a new instance of the TcxCustomWebDataModule object.  The AOwner parameter specifies the owner of the web module (usually the application).

Do not create instances of the TcxCustomWebDataModule object in applications.  Instead, use a descendant of the TcxCustomWebDataModule class such as TcxWebPageModule or TcxWebDataModule class.


TcxCustomWebDataModule.CreateNew

TcxCustomWebDataModule          See Also

Creates and initializes an instance of TcxCustomWebDataModule object without using an associated .DFM file.

constructor CreateNew(AOwner: TComponent; Dummy: Integer = 0); override;

Description

The CreateNew method can be used instead of the Create method to create a web module without using the associated .DFM file to initialize it.  The AOwner parameter specifies the owner of the web module (usually the application,).

The Dummy parameter defaults to 0 and is not used by this constructor.  It is inherited from the base class constructor’s definition.

The CreateNew method calls its inherited constructor and then initializes the ModuleHelper property by a newly created TcxWebModuleHelper class.


TcxCustomWebDataModule.Destroy

TcxCustomWebDataModule          See Also

Destroys an instance of the TcxCustomWebDataModule object.

destructor Destroy; override;

Description

The Destroy method is used to destroy an instance of the TcxCustomWebDataModule object and to free any allocated memory.

Typically, EWF applications do not explicitly free web module instances.  Instead, the FinishContext method of the web application service object deactivates web modules automatically when the application has finished processing an HTTP request.

The Destroy method frees the ModuleHelper property before calling the inherited destructor.


TcxCustomWebDataModule.GetModuleHelper

TcxCustomWebDataModule          See Also

Returns the value of the ModuleHelper property.

function GetModuleHelper: TcxWebModuleHelper; virtual;

Description

The GetModuleHelper method is used internally to read the value of the ModuleHelper property.  This method returns a module helper object (TcxWebModuleHelper type) that controls web module’s state and generates OnActivate and OnDeactivate events.


TcxCustomWebDataModule.GetModuleHelperClass

TcxCustomWebDataModule          See Also

Returns the type of helper object accessed via the ModuleHelper property.

function GetModuleHelperClass: TcxWebModuleHelperClass; virtual;

Description

The GetModuleHelperClass method is used internally to return a class-reference type that holds a reference to a module helper class.

This method is used by the CreateNew method when creating an instance of a module helper object to initialize the ModuleHelper property.  Descendant classes override this method in order to return a proper helper object type they use.


TcxCustomWebHomeDataModule
TcxCustomWebHomeDataModule Object

Hierarchy          Properties          Methods          Events          See Also

Represents the base class from which the TcxWebHomeDataModule class is derived.

Unit

cxWebModule

TcxCustomWebHomeDataModule = class(TcxCustomWebDataModule, IGetWebAppServices)

Description

The TcxCustomWebHomeDataModule class is the base class for the EWF web home data module (represented by the TcxWebHomeDataModule class).  Every EWF application has a single home data module (descendant of the TcxCustomWebHomeDataModule class).  This home data module is created automatically when you create a new EWF web application.

The TcxCustomWebHomeDataModule class introduces specific properties which are designed to set basic parameters for the entire EWF web application.  Such parameters are:

•	the name of the default page module (the DefaultPage property),

•	the maximum number and the timeout period for sessions in the EWF application (the MaxSessions and DefaultTimeOut properties),

•	availability of a specific web dispatcher object for the EWF web application (the DispatchActions property),

•	ability to use "cookie" strings provided in the web client request (the UseCookie property).

Additionally, the TcxCustomWebHomeDataModule class introduces a number of events which allow you to perform specific operations within the EWF web application.

Properties, methods, and events introduced in the TcxCustomWebHomeDataModule class fully implement the functionality of a web home data module.


TcxCustomWebHomeDataModule Hierarchy
Hierarchy

TDataModule

     |

TcxCustomWebDataModule


Properties for TcxCustomWebHomeDataModule
TcxCustomWebHomeDataModule Properties

TcxCustomWebHomeDataModule          Legend

In TcxCustomWebHomeDataModule

DefaultPage

DefaultTimeout

DispatchActions

MaxSessions

UseCookie

Derived from TcxCustomWebDataModule

ModuleHelper

Request

Response

Session


Methods for TcxCustomWebHomeDataModule
TcxCustomWebHomeDataModule Methods

TcxCustomWebHomeDataModule          Legend

In TcxCustomWebHomeDataModule

Create

CreateNew

GetWebAppServices

RedirectToPage

Derived from TcxCustomWebDataModule

Destroy

GetModuleHelper

GetModuleHelperClass


Events for TcxCustomWebHomeDataModule
TcxCustomWebHomeDataModule Events

TcxCustomWebHomeDataModule          Legend

In TcxCustomWebHomeDataModule

OnAfterDispatch

OnAfterDispatchPage

OnAfterRedirectToPage

OnBeforeDispatch

OnBeforeDispatchPage

OnBeforeRedirectToPage

OnCanViewPage

OnException

OnGetFileStream

OnLocateFile

OnPageLoginRequired

OnPageNotFound

OnSessionEnd

OnSessionStart

Derived from TcxCustomWebDataModule

OnActivate

OnDeactivate


TcxCustomWebHomeDataModule.DefaultPage

TcxCustomWebHomeDataModule          See Also

Indicates the web page module that should handle requests that do not include a web page module name in their target URL.

property DefaultPage: string;

Description

The DefaultPage property is the name of the registered web page module (the TcxWebPageModule object) that should handle incoming request messages that do not specify the page name in their target URL.  The name of the page coincides with the Name property of the corresponding web page module.

If the DefaultPage property is not set (it is an empty string) the page dispatcher uses the first page within the Pages collection of the WebContext as a default web page module.


TcxCustomWebHomeDataModule.DefaultTimeout

TcxCustomWebHomeDataModule

Specifies the number of minutes a session can persist without being accessed.

property DefaultTimeout: Integer;

Description

Each session managed by the web home data module has a timeout period.  When a session is not accessed within this timeout period, the home data module automatically terminates the session, discarding its session ID and name/value pairs.

Set the DefaultTimeout property to specify the timeout period, in minutes, for sessions in EWF applications.

The default value of the DefaultTimeout property is 20.


TcxCustomWebHomeDataModule.DispatchActions

TcxCustomWebHomeDataModule

Provides access to an action-based web dispatcher.

property DispatchActions: IWebDispatchActions;

Description

The DispatchActions property is used to determine whether the EWF application contains a web dispatcher.  A web dispatcher maintains a list of action items that respond to incoming request messages.

The IWebDispatchActions interface that is the value of the DispatchActions property does nothing special other than identify its component as a web dispatcher.  You can, however, use this interface to obtain other interfaces that belong to the web dispatcher.

If the EWF application does not include a component that implements the IWebDispatchActions interface, the value of this property is nil.

Reference the description of the IWebDispatchActions interface for more details.


TcxCustomWebHomeDataModule.MaxSessions

TcxCustomWebHomeDataModule

Indicates the maximum number of sessions that can be kept in memory.

property MaxSessions: Integer;

Description

Set the MaxSessions property to limit the number of sessions that the sessions service stores in memory.  If the MaxSessions property is –1, then there is no limit to the number of sessions, and the application can continue creating sessions until it runs out of memory.

When the MaxSessions property is greater than or equal to zero, any attempt to create a new session when the sessions service has MaxSessions already stored in memory causes an exception.

Note:	When the application terminates sessions, it frees up memory for new sessions.  Thus, after reaching the limit imposed by the MaxSessions property, the application can add subsequent sessions after explicitly terminating a session or waiting for one to time out.

The default value of the MaxSessions property is -1.


TcxCustomWebHomeDataModule.OnAfterDispatch

TcxCustomWebHomeDataModule          See Also

Occurs after the EWF automatically processes a request message.

property OnAfterDispatch: THTTPMethodEvent;

Description

Write an OnAfterDispatch event handler to perform any final action before sending a response back to the client web browser.  The OnAfterDispatch event occurs after all components in the EWF application have attempted to generate a response for the current request.  It does not occur if the response message has already been sent back to the caller.  It can be sent manually, for instance, by handling the OnBeforeRender and OnAfterRender events of components.

The TcxCustomWebHomeDataModule class delegates OnAfterDispatch event firing to a specific object (type TcxWebAppServices) that centralizes the dispatching of requests.

You should use the OnAfterDispatch event of a specific web home data module (a TcxCustomWebHomeDataModule descendant) to assign a desired event handler at design time.

The order in which events fire is described in The Order of Web Modules Events topic.


TcxCustomWebHomeDataModule.OnAfterDispatchPage

TcxCustomWebHomeDataModule          See Also

Fires after a page is dispatched.

type

  TcxWebPageEvent = procedure(Sender: TObject; const APageName: string) of object;

property OnAfterDispatchPage: TcxWebPageEvent;

Description

Write an OnAfterDispatchPage event handler to perform specific actions each time a page has been dispatched.  The APageName parameter specifies the name of the dispatched web page.  The Sender parameter specifies the sender of the event.

The TcxCustomWebHomeDataModule class delegates OnAfterDispatchPage event firing to a specific page dispatcher object (type TcxPageDispatchService).

You should use the OnAfterDispatchPage event property of a specific web home data module (a TcxCustomWebHomeDataModule descendant) to assign a desired event handler at design time.

The order in which events fire is described in The Order of Web Modules Events topic.


TcxCustomWebHomeDataModule.OnAfterRedirectToPage

TcxCustomWebHomeDataModule          See Also

Occurs after a request message is dispatched in response to an internal redirection request.

type

  TcxWebPageEvent = procedure(Sender: TObject; const APageName: string) of object;

property OnAfterRedirectToPage: TcxWebPageEvent;

Description

Write an OnAfterRedirectToPage event handler to perform required actions after an end user has been redirected to another web page.  The APageName parameter specifies the name of the web page to which the request should be redirected.  The Sender parameter specifies the sender of the event.

The TcxCustomWebHomeDataModule class delegates OnAfterRedirectToPage event firing to a specific page dispatcher object (type TcxPageDispatchService).

You should use the OnAfterRedirectToPage event property of a specific web home data module (a TcxCustomWebHomeDataModule descendant) to assign a desired event handler at design time.

The order in which events fire is described in The Order of Web Modules Events topic.


TcxCustomWebHomeDataModule.OnBeforeDispatch

TcxCustomWebHomeDataModule          See Also

Fires before EWF processes a request message.

type

 THTTPMethodEvent = procedure (Sender: TObject; Request: TWebRequest; Response: TWebResponse; var Handled: Boolean) of object;

property OnBeforeDispatch: THTTPMethodEvent;

Description

Write an OnBeforeDispatch event handler to perform specific actions before automatic request handling proceeds.  The possible actions are to initialize the response to an HTTP request or to handle any messages that cannot be handled by other components in the application.  You can also handle the request manually using the Request and Response parameters transmitted to the event handler.  If the Handled parameter is set to True within the handler, request processing completes and the response is sent to the client.

The TcxCustomWebHomeDataModule class delegates OnBeforeDispatch event firing to a specific object (type TcxWebAppServices) that centralizes the dispatching of requests.

You should use the OnBeforeDispatch event of a specific web homee data module (a TcxCustomWebHomeDataModule descendant) to assign a desired event handler at design time.

The order in which events fire is described in The Order of Web Modules Events topic.


TcxCustomWebHomeDataModule.OnBeforeDispatchPage

TcxCustomWebHomeDataModule          See Also

Fires before a page is dispatched.

type

  TcxWebPageHandledEvent = procedure(Sender: TObject; const APageName: string; var AHandled: Boolean) of object;

property OnBeforeDispatchPage: TcxWebPageHandledEvent;

Description

Write an OnBeforeDispatchPage event handler to implement custom dispatching for specific pages.  The APageName parameter specifies the name of a page that is about to be dispatched.  Setting the Handled parameter to True results in sending the response to the client browser.

The TcxCustomWebHomeDataModule class delegates OnBeforeDispatchPage event firing to a specific page dispatcher object (type TcxPageDispatchService).

You should use the OnBeforeDispatchPage event property of a specific web home data module (a TcxCustomWebHomeDataModule descendant) to assign a desired event handler at design time.

The order in which events fire is described in The Order of Web Modules Events topic.


TcxCustomWebHomeDataModule.OnBeforeRedirectToPage

TcxCustomWebHomeDataModule          See Also

Occurs before the page dispatcher dispatches a request message in response to a redirect request.

type

  TcxWebPageParamsHandledEvent = procedure(Sender: TObject; const APageName: string; const AParams: string; var AHandled: Boolean) of object;

property OnBeforeRedirectToPage: TcxWebPageParamsHandledEvent;

Description

Write an OnBeforeRedirectToPage event handler to perform required actions before an end user is redirected to another web page.  The APageName parameter specifies the name of the web page to which the redirect is performed.  The AParams parameter represents a string containing application-defined name-value pairs.  These name-value pairs supply the query fields of the redirected request message, and are added to the URL that is the target of the redirection.

If the event handler sets the AHandled parameter to True, the page dispatcher assumes it has handled the request and performs no further processing except calling the OnAfterRedirectToPage event handler (if it is assigned).

Tip:	To access the web request and response objects from within an OnBeforeRedirectToPage event handler, call the global WebContext function to access the web context and read its Request and Response properties.

The TcxCustomWebHomeDataModule class delegates OnBeforeRedirectToPage event firing to a specific page dispatcher object (type TcxPageDispatchService).

You should use the OnBeforeRedirectToPage event property of a specific web homee data module (a TcxCustomWebHomeDataModule descendant) to assign a desired event handler at design time.

The order in which events fire is described in The Order of Web Modules Events topic.


TcxCustomWebHomeDataModule.OnCanViewPage

TcxCustomWebHomeDataModule

Reserved for future use.

property OnCanViewPage: TcxCanViewPageEvent;

Description

Reserved for future use.


TcxCustomWebHomeDataModule.OnException

TcxCustomWebHomeDataModule

Occurs when an unhandled exception arises during processing of a request message.

type

  TWebExceptionEvent = procedure (Sender: TObject; E: Exception; var Handled: Boolean) of object;

property OnException: TWebExceptionEvent;

Description

Write an OnException event handler to perform specific actions each time an unhandled exception arises.  The Sender parameter is the dispatcher component that caught the exception.  The E parameter is the exception object for the exception that arose.

Handled should return True if the event handler took care of the exception.  If the event handler returns False for Handled parameter, the web server application performs its default response to exceptions.  This default response varies, depending on the dispatcher.

The TcxCustomWebHomeDataModule class delegates OnException event firing to a specific object (type TcxWebAppServices) that centralizes the dispatching of requests.

You should use the OnException event property of a specific web home data module (a TcxCustomWebHomeDataModule descendant) to assign a desired event handler at design time.


TcxCustomWebHomeDataModule.OnGetFileStream

TcxCustomWebHomeDataModule          See Also

Occurs when an EWF application tries to locate a template file.

type

  TcxWebGetFileStreamEvent = procedure(ASender: TObject; const AFileName: string; var AStream: TStream; var AOwned: Boolean) of object;

property OnGetFileStream: TcxWebGetFileStreamEvent;

Description

Write an OnGetFileStream event handler to supply the EWF application with the contents of a template file.  This event is particularly useful for applications that use "logical" files that do not exist physically on disk.  When the EWF application tries to locate a template file, the locate file service generates this event, along with the OnLocateFile event.  You can write one of these event handlers in order for the application to use your custom template file.

The ASender parameter is the object that asks to locate the file.  The AFileName parameter is the name of the file to locate.  This is the name that the EWF application uses to refer to the desired file.  Typically, it is the name of a web page.  The AStream parameter returns a stream object from which the EWF application can read the contents of the requested file.

The AOwned parameter indicates whether the caller should free AStream after reading file contents.  When the AOwned parameter returns True, the caller should free the stream object.  When the AOwned parameter returns False, the caller should not free the stream object.

The TcxCustomWebHomeDataModule class delegates OnGetFileStream event firing to a specific file location service (type TcxWebLocateFileService) that controls access to the templates that are used while processing requests.

You should use the OnGetFileStream event property of a specific web home data module (a TcxCustomWebHomeDataModule descendant) to assign a desired event handler at design time.

The order in which events fire is described in The Order of Web Modules Events topic.


TcxCustomWebHomeDataModule.OnLocateFile

TcxCustomWebHomeDataModule          See Also

Occurs when an EWF application attempts to locate the template file.

type

  TcxWebLocateFileEvent = procedure(ASender: TObject; const AFileName: string; var AFoundFile: string) of object;

property OnLocateFile: TcxWebLocateFileEvent;

Description

Write an OnLocateFile event handler to perform specific actions when the EWF application tries to locate the template file used by a content producer to generate HTML code for a page.

When the EWF application attempts to locate the template file, the locate file service generates this event, along with the OnGetFileStream event.  You can write one of these event handlers in order for the application to use your custom template file.

The ASender parameter is the component that is asked to locate a file.  The AFileName parameter specifies the name of the file to locate.  This is the name that the EWF application uses to refer to the desired file.  Typically, it is the name of the web page that the file is used to produce.  The AFoundFile parameter should return the fully-qualified file name where the requested file can be found.

The TcxCustomWebHomeDataModule class delegates OnLocateFile event firing to a specific file location service (type TcxWebLocateFileService) that controls access to the templates that are used while processing requests.

You should use the OnLocateFile event property of a specific web home data module (a TcxCustomWebHomeDataModule descendant) to assign a desired event handler at design time.

The order in which events fire is described in The Order of Web Modules Events topic.


TcxCustomWebHomeDataModule.OnPageLoginRequired

TcxCustomWebHomeDataModule

Reserved for future use.

property OnPageLoginRequired: TcxWebLoginRequiredEvent;

Description

Reserved for future use.


TcxCustomWebHomeDataModule.OnPageNotFound

TcxCustomWebHomeDataModule

Occurs when the page dispatcher cannot locate a registered web page module with the name specified in a request message.

type

  TcxWebPageHandledEvent = procedure(Sender: TObject; const APageName: string; var AHandled: Boolean) of object;

property OnPageNotFound: TcxWebPageHandledEvent;

Description

Write an OnPageNotFound event handler to generate a response when the dispatcher cannot locate the web page module to which a request message is addressed.  For instance, an OnPageNotFound event handler can provide the response object with content that indicates that the requested page does not exist or that represents simple content for a page that does not have an associated web page module.

The APageName parameter specifies the name of the web page which cannot be located by the page dispatcher object.

If the OnPageNotFound event handler sets its AHandled parameter to True, the page dispatcher assumes it has updated the response message and returns it.  If the OnPageNotFound leaves the AHandled parameter set to False, the dispatcher raises a ‘Web Page not found’ exception after the event handler exits.

Tip:	To access web request and response objects from within an OnPageNotFound event handler, call the global WebContext function to access the web context and read its Request and Response properties.

The TcxCustomWebHomeDataModule class delegates OnPageNotFound event firing to a specific page dispatcher object (type TcxPageDispatchService).

You should use the OnPageNotFound event property of a specific web home data module (a TcxCustomWebHomeDataModule descendant) to assign a desired event handler at design time.


TcxCustomWebHomeDataModule.OnSessionEnd

TcxCustomWebHomeDataModule          See Also

Fires when a session is terminated.

type

  TcxWebSessionEvent = procedure(ASender: TObject; ASession: TAbstractWebSession) of object;

property OnSessionEnd: TcxWebSessionEvent;

Description

Write an OnSessionEnd event handler to perform required actions in response to HTTP session termination.  The ASession parameter specifies the session that is about to be terminated.  The ASender parameter specifies the sender of the event.

The TcxCustomWebHomeDataModule class delegates OnSessionEnd event firing to a specific sessions service (type TcxWebSessionsService) that stores end user data in memory between requests.

You should use the OnSessionEnd event property of a specific web home data module (a TcxCustomWebHomeDataModule descendant) to assign a desired event handler at design time.

The order in which events fire is described in The Order of Web Modules Events topic.


TcxCustomWebHomeDataModule.OnSessionStart

TcxCustomWebHomeDataModule          See Also

Fires when a new session is created.

type

  TcxWebSessionEvent = procedure(ASender: TObject; ASession: TAbstractWebSession) of object;

property OnSessionStart: TcxWebSessionEvent;

Description

Write an OnSessionStart event handler to perform required actions in response to the creation of a new HTTP session.  The ASession parameter specifies a started session.  The ASender parameter specifies the sender of the event.

The TcxCustomWebHomeDataModule class delegates OnSessionStart event firing to a specific sessions service (the TcxWebSessionsService type) that stores end user data in memory between requests.

You should use the OnSessionStart event property of a specific web home data module (a TcxCustomWebHomeDataModule descendant) to assign a desired event handler at design time.

The order in which events fire is described in The Order of Web Modules Events topic.


TcxCustomWebHomeDataModule.UseCookie

TcxCustomWebHomeDataModule

Specifies whether client-side cookies or fat URLs are used to store session identifiers.

property UseCookie: Boolean;

Description

EWF uses a combination of cookies or fat URLs together with hidden fields to store session information.  By default cookies are used, but fat URLs can be used in place of cookies by setting the UseCookie property to False on the application's HomeDataModule.

The cookie/URL stores a unique ID that is used to associate each individual user with their request.  When an EWF application receives a request, it checks for the unique ID in the cookie or URL (depending upon the UseCookie property of the HomeDataModule).  If the value exists, it's used to find the session object which represents the user's session.  If the value doesn't exist, or doesn't correspond to any known session object, a new session is created and a new cookie is set, or the user is redirected to a new fat URL, containing the new unique ID.

When dealing with session information, values are stored in the session object.  EWF automatically tracks and manages the session object, cookies, and fat URLs.  Information stored in the session object is available to any module that needs information about the user for which it is handling a request.

The default value of the UseCookie property is True.


TcxCustomWebHomeDataModule.Create

TcxCustomWebHomeDataModule          See Also

Creates an instance of the TcxCustomWebHomeDataModule class.

constructor Create(AOwner: TComponent); override;

Description

The Create method is used to create an instance of the TcxCustomWebHomeDataModule object.  The AOwner parameter specifies the owner of the web module (usually the application).

Do not create instances of the TcxCustomWebHomeDataModule in applications.  It’s descendant, the TcxWebHomeDataModule class is instantiated automatically when the application is created.


TcxCustomWebHomeDataModule.CreateNew

TcxCustomWebHomeDataModule          See Also

Creates an instance of TcxCustomWebHomeDataModule object without using an associated .DFM file.

constructor CreateNew(AOwner: TComponent; Dummy: Integer=0); override;

Description

The CreateNew method can be used instead of the Create method to create a web home module without using the associated .DFM file to initialize it.

The AOwner parameter specifies the owner of the web home data module (usually the application).  The Dummy parameter defaults to 0 and is not used by this constructor.


TcxCustomWebHomeDataModule.GetWebAppServices

TcxCustomWebHomeDataModule          See Also

Returns the IWebAppServices interface of the object that centralizes the dispatching of requests.

function GetWebAppServices: IWebAppServices;

Description

This method implements the GetWebAppServices method of the standard IGetWebAppServices interface.  The GetWebAppServices method is used to return the IWebAppServices interface that is implemented by a specific object (type TcxWebAppServices) that centralizes the dispatching of requests.  This object can be accessed via the internal FAppServices field of the TcxCustomWebHomeDataModule class.


TcxCustomWebHomeDataModule.RedirectToPage

TcxCustomWebHomeDataModule

Completes the response message so that it redirects the caller to another page in your application.

function RedirectToPage(const APageName: string; const AParams: string): Boolean;

Description

Use the RedirectToPage method to redirect your application to the page specified by the APageName parameter.

The AParams parameter specifies the string containing request parameters.  These parameters are in Name=Value format.

The RedirectToPage method returns True if the redirection was completed successfully.  Otherwise, it returns False.


TcxCustomWebPageModule
TcxCustomWebPageModule Object

Hierarchy          Properties          Methods          Events          See Also

Represents the base class for EWF web page modules that generate a web page.

Unit

cxWebModule

TcxCustomWebPageModule = class(TcxCustomWebDataModule, IcxContainerCodeProvider, IcxWebClientData, IcxWebContainerControl, IcxWebDesignerPageModule, IcxWebModule, IcxWebModuleComponentPersistent, IcxWebPage, IcxWebPageModule, IWebVariablesContainer)

Description

The TcxCustomWebPageModule is the common base class for web modules that generate a web page for EWF applications.

Being the direct descendant of the TcxCustomWebDataModule class, the TcxCustomWebPageModule class inherits all its properties, methods, and events and supports corresponding interfaces.  Additionally the TcxCustomWebPageModule class supports a variety of interfaces which declare methods and properties required for web page module functionality.  The TcxCustomWebPageModule class introduces a number of properties and methods providing web page module functionality (most of them implement the necessary methods and properties of supported interfaces).  The TcxCustomWebPageModule class also introduces events that occur when the EWF application calls on the web page module to generate its page or when it generates a redirect message to redirect a request to the associated page.


TcxCustomWebPageModule Hierarchy
Hierarchy

TDataModule

     |

TcxCustomWebDataModule


Properties for TcxCustomWebPageModule
TcxCustomWebPageModule Properties

TcxCustomWebPageModule          Legend

In TcxCustomWebPageModule

ComponentPersistent

ContainerControlHelper

DesignerID

EncodingType

IsFirstRequest

LeftPos

ModuleHelper

ModuleRenderHelper

PositioningType

ScrollLeft

ScrollTop

TopPos

Values

Derived from TcxCustomWebDataModule

ModuleHelper

Request

Response

Session


Methods for TcxCustomWebPageModule
TcxCustomWebPageModule Methods

TcxCustomWebPageModule          Legend

In TcxCustomWebPageModule

Create

CreateNew

Destroy

FindVariable

FindVariableContainer

GetActiveControl

GetAsString

GetBrowser

GetDesignerID

GetEncoding

GetIsFirstRequest

GetLeftPos

GetModuleHelper

GetModuleHelperClass

GetModuleRenderHelper

GetPositioningType

GetReferer

GetScrollLeft

GetScrollTop

GetShiftState

GetTopPos

GetValues

GetVariable

GetVariableCount

IsComponentPersistent

LoadState

PerformScript

ReadState

RedirectToPage

SetActiveControl

SetAsString

SetDesignerID

SetIsDesignerPreviewModule

SetLeftPos

SetShiftState

SetTopPos


Events for TcxCustomWebPageModule
TcxCustomWebPageModule Events

TcxCustomWebPageModule          Legend

In TcxCustomWebPageModule

OnAfterGenerateContent

OnAfterGenerateRedirectedContent

OnAfterGetValues

OnAfterProcessAction

OnAfterRender

OnBeforeGenerateContent

OnBeforeGenerateRedirectedContent

OnBeforeGetValues

OnBeforeProcessAction

OnBeforeRender

OnHTMLTag

Derived from TcxCustomWebDataModule

OnActivate

OnDeactivate


TcxCustomWebPageModule.ComponentPersistent

TcxCustomWebPageModule          See Also

Specifies which of the components should persist its state.

property ComponentPersistent: TcxWebComponentsPersistent;

Description

The ComponentPersistent property is used to provide access to a specific object (the TcxWebComponentsPersistent class) that stores the collection of web controls whose state should or should not be saved depending upon the DefaultMode property value.  If the DefaultMode property of the object specified by the ComponentPersistent property is set to pmSave, its ExceptedComponents property contains the controls for which you do not want to save state.  Conversely, when the DefaultMode property is set to pmReset, the ExceptedComponents property of the TcxWebComponentsPersistent object contains only the controls for which you do want to save their state.


TcxCustomWebPageModule.ContainerControlHelper

TcxCustomWebPageModule          See Also

Specifies an object to which the implementation of the IcxWebContainerControl interface is delegated.

property ContainerControlHelper: TcxWebPageModuleContainerHelper;

Description

The ContainterControlHelper property returns an object to which the TcxCustomWebPageModule class delegates the IcxWebContainerControl interface implementation.  The ContainterControlHelper property is used to gain access to the TcxWebPageModuleContainerHelper class which declares and implements all the methods of the IcxWebContainerControl interface.

ReadOnly Property


TcxCustomWebPageModule.DesignerID

TcxCustomWebPageModule

Specifies the mode in which an EWF web page works at design-time.

property DesignerID: Integer;

Description

Use the DesignerID property to specify whether EWF web pages work at design-time in HTML or Form mode.  Setting the DesignerID property affects the manner in which the designer displays the page within the IDE.

When the web page module has its DesignerID property set to HTML (the default), the form displays Designer toolbars at the top.  These toolbars provide full HTML editing at design-time.  Additionally you can make use of EWF HTML elements in this mode.  These are the primary differences between HTML and Form modes.

Although HTML mode provides numerous capabilities, there are times when Form mode may be required:

•	you want to keep everything generated by the form and not permit any changes,

•	you do not have Internet Explorer 5.5 (or higher).

The last point concerns the developer, not the deployed application.  IE is required in order to provide HTML handling within the IDE when in HTML mode.


TcxCustomWebPageModule.EncodingType

TcxCustomWebPageModule

Specifies the type of encoding used for transmitting form data.

type

  TcxWebEncodingType = (wetApplication, wetMultipart, wetText);

property EncodingType: TcxWebEncodingType;

Description

Use the EncodingType property to specify the encoding type for the form data.  The value of this property is used to set the ENCTYPE attribute of the FORM tag when rendering a web page.

Note:  The body of the HTML document contains a FORM tag that  holds all page elements (i.e. controls and fields).  This tag enables data transmission between the client page and the server script.

The default EncodingType property value is wetApplication, which sets the ENCTYPE attribute to "application/x-www-form-urlencoded".  This is the value you will want most of the time, as it transmits the information contained in the form elements to the server script.

wetMultipart sets the ENCTYPE attribute to "multipart/form-data", which you will want to use when your application uploads files to the server.

Finally, wetText sets the attribute to "text/plain" and you will use this when using the mailto protocol (i.e. if it sends e-mail messages based on data from form elements).


TcxCustomWebPageModule.IsFirstRequest

TcxCustomWebPageModule

Indicates whether the same page was generated within the previous request.

property IsFirstRequest: Boolean;

Description

The IsFirstRequest property is used by the LoadState method of the web page module to determine whether there is a need and ability to load the form state.

The IsFirstRequest property is set to True in one of the following instances:

•	the page module is processed at design-time,

•	the request is the first one for the web page module.

In the last instance, in order to ascertain whether the request is the first, the value of the __FORMNAME hidden field is retrieved from the WebContext and compared to the ClassName property of the web page module object.  If these values are not the same, it becomes evident that a user requests a page different from the previous (this is the first request for the web page module) or this is the first request for the entire application.  In both instances there is no need nor possibility to load the form state.

ReadOnly Property


TcxCustomWebPageModule.LeftPos

TcxCustomWebPageModule          See Also

Specifies the left position of the form within a web page.

property LeftPos: Integer;

Description

Use the LeftPos property to specify the left position of the form which can contain different web controls within a web page.  The LeftPos property is in effect only when you use the absolute positioning for the page module (the PositioningType property is set to cxptAbsolute).  In this instance, all web controls placed on the form are displayed with a left offset which is equal to the LeftPos property value.

Set the LeftPos property to an appropriate value if you intend to place in the HTML template a specific object/objects (for instance, an image) with a fixed width at the left side of your web page.


TcxCustomWebPageModule.ModuleHelper

TcxCustomWebPageModule          See Also

Specifies an object that implements the delegated IcxWebModule and IcxWebPage interfaces.

property ModuleHelper: TcxWebPageModuleHelper;

Description

The ModuleHelper property returns the TcxWebPageModuleHelper object to which the implementation of the IcxWebModule and IcxWebPage interfaces is delegated.

ReadOnly Property


TcxCustomWebPageModule.ModuleRenderHelper

TcxCustomWebPageModule          See Also

Specifies an object that implements the delegated IcxContainerCodeProvider interface.

property ModuleRenderHelper: TcxWebModuleRenderHelper;

Description

The ModuleRenderHelper property returns the object to which the TcxCustomWebPageModule class delegates the IcxContainerCodeProvider interface implementation.  The ModuleRenderHelper property is used to gain access to the TcxWebModuleRenderHelper class whose methods fully implement methods declared in the IcxContainerCodeProvider interface.  These methods are designed to render the web page module which is the container for web controls.

ReadOnly Property


TcxCustomWebPageModule.OnAfterGenerateContent

TcxCustomWebPageModule          See Also

Fires after the requested page’s content has been generated.

type

  TcxWebPageEvent = procedure(Sender: TObject; const APageName: string) of object;

property OnAfterGenerateContent: TcxWebPageEvent;

Description

Write an OnAfterGenerateContent event handler for the page module in order to perform specific actions each time the content of the requested page has been generated. The Sender parameter specifies the web module that invoked the event.  The APageName parameter allows you to determine the name of a web page whose content has been generated.

The TcxCustomWebPageModule class delegates OnAfterGenerateContent event firing to a specific module helper object (the TcxWebPageModuleHelper class).

You should use the OnAfterGenerateContent event property of a particular web page module (a TcxCustomWebPageModule descendant) to assign a desired event handler at design time. The referenced OnAfterGenerateContent event is invoked by the ImplDispatchPage method of the module helper object.

The order in which events fire is described in The Order of Web Modules Events topic.


TcxCustomWebPageModule.OnAfterGenerateRedirectedContent

TcxCustomWebPageModule          See Also

Fires after the content of the page, to which redirection was performed, has been generated.

type

  TcxWebPageEvent = procedure(Sender: TObject; const APageName: string) of object;

property OnAfterGenerateRedirectedContent: TcxWebPageEvent;

Description

Write an OnAfterGenerateRedirectedContent event handler to perform specific actions each time the content of the page, to which redirection was performed, has been generated. The Sender parameter specifies the web module that invoked the event.  The APageName parameter allows you to determine the name of the web page whose content has been generated.

The TcxCustomWebPageModule class delegates OnAfterGenerateRedirectedContent event firing to a specific module helper object (type TcxWebPageModuleHelper).

You should use the OnAfterGenerateRedirectedContent event property of a particular web page module (a TcxCustomWebPageModule descendant) to assign a desired event handler at design time.

The referenced OnAfterGenerateRedirectedContent event is invoked by the ImplRedirectToPage method of the module helper object.


TcxCustomWebPageModule.OnAfterGetValues

TcxCustomWebPageModule          See Also

Occurs after components contained within the page module update their values using the information from the request.

property OnAfterGetValues: TNotifyEvent;

Description

Write an OnAfterGetValues event handler to perform specific actions after all control data is updated using the information contained within the request.

Requests contain data represented by HTML elements (e.g. INPUT and SELECT tags) residing within the submitted form and the IDs of these elements.  Once the request is received, the page module consecutively calls the RegisterValues and the DoSetValues methods for each contained control (TcxWebComponent descendant) that supports the IcxWebValues interface.  These methods must be implemented by every control in their own manner in order to register every HTML element containing control’s data and set this values to control’s properties.  This process is used so as not to loose the data entered by a user when the page is reloaded.

The order in which events fire is described in The Order of Web Modules Events topic.


TcxCustomWebPageModule.OnAfterProcessAction

TcxCustomWebPageModule          See Also

Fires after a server side event is handled.

property OnAfterProcessAction: TNotifyEvent;

Description

Write an OnAfterProcessAction event handler to perform specific actions each time a server side event has been handled.

Once the event requiring server side handling fires, the __ACTIONNAME, __TARGETNAME and __SHIFTSTATE hidden inputs are populated with proper values and the form is submitted.  The server script finds the component specified by the __TARGETNAME value.  The __ACTIONNAME value is used to retrieve the handler from the collection of registered event handlers.  If found, the handler is executed.  __SHIFTSTATE is used to determine the parameters.

Server side events (actions) are registered for a component via the RegisterActions method implemented by each component in its own manner.

The order in which events fire is described in The Order of Web Modules Events topic.


TcxCustomWebPageModule.OnAfterRender

TcxCustomWebPageModule          See Also

Fires after a web page has been rendered.

property OnAfterRender: TNotifyEvent;

Description

Write an OnAfterRender event handler to perform specific actions each time a web page has been rendered.

The TcxCustomWebPageModule class delegates OnAfterRender event firing to a specific module helper object (TcxWebPageModuleHelper type).

You should use the OnAfterRender event property of a particular web page module (a TcxCustomWebPageModule descendant) to assign a desired event handler at design time.

The referenced OnAfterRender event is invoked by the ImplDispatchPage method of the module helper object.

The order in which events fire is described in The Order of Web Modules Events topic.


TcxCustomWebPageModule.OnBeforeGenerateContent

TcxCustomWebPageModule          See Also

Fires before the requested page’s content is generated.

type

  TcxWebPageHandledEvent = procedure(Sender: TObject; const APageName: string; var AHandled: Boolean) of object;

property OnBeforeGenerateContent: TcxWebPageHandledEvent;

Description

Write an OnBeforeGenerateContent event handler to perform specific actions before the content of the requested page is generated. The Sender parameter specifies the web module that invoked the event.  The APageName parameter allows you to determine the name of the web page whose content is about to be generated.  The AHandled parameter specifies whether generating the content of the page should continue.  Set this parameter to True to prohibit the continuation of content generation.

The TcxCustomWebPageModule class delegates OnBeforeGenerateContent event firing to a specific module helper object (TcxWebPageModuleHelper type).

You should use the OnBeforeGenerateContent event property of a particular web page module (a TcxCustomWebPageModule descendant) to assign a desired event handler at design time.

The referenced OnBeforeGenerateContent event is invoked by the ImplDispatchPage method of the module helper object.

The order in which events fire is described in The Order of Web Modules Events topic.


TcxCustomWebPageModule.OnBeforeGenerateRedirectedContent

TcxCustomWebPageModule          See Also

Fires before the content of the page, to which redirection was performed, is generated.

type

  TcxWebPageParamsHandledEvent = procedure(Sender: TObject; const APageName: string; const AParams: string; var AHandled: Boolean) of object;

property OnBeforeGenerateRedirectedContent: TcxWebPageParamsHandledEvent;

Description

Write an OnBeforeGenerateRedirectedContent event handler to perform specific actions each time the content of the page, to which redirection was performed, is generated.

The Sender parameter specifies the web module that invoked the event.  The APageName parameter allows you to determine the name of the web page whose content is about to be generated.  The AParams parameter transmits the string containing request parameters.  The AHandled parameter specifies whether generating the content of the page should be continued.  Set this parameter to True to prohibit the continuation of content generation.

The TcxCustomWebPageModule class delegates OnBeforeGenerateRedirectedContent event firing to a specific module helper object (TcxWebPageModuleHelper type).

You should use the OnBeforeGenerateRedirectedContent event property of a particular web page module (a TcxCustomWebPageModule descendant) to assign a desired event handler at design time.

The referenced OnBeforeGenerateRedirectedContent event is invoked by the ImplRedirectToPage method of the module helper object.


TcxCustomWebPageModule.OnBeforeGetValues

TcxCustomWebPageModule          See Also

Occurs before controls contained within the page module update their values using the information from the request.

property OnBeforeGetValues: TNotifyEvent;

Description

Write an OnBeforeGetValues event handler to perform specific actions before the data of all controls contained within the page module is updated using the information from the request.

Requests contain data represented by HTML elements (e.g. INPUT and SELECT tags) residing within the submitted form and the IDs of these elements.  Once the request is received, the page module consecutively calls the RegisterValues and the DoSetValues methods of each contained control (TcxWebComponent descendant) that supports the IcxWebValues interface.  These methods must be implemented by every control in their own manner in order to register each HTML element containing control data and set this values to control’s properties.  This process is used so as not to loose the data entered by a user when the page is reloaded.

The order in which events fire is described in The Order of Web Modules Events topic.


TcxCustomWebPageModule.OnBeforeProcessAction

TcxCustomWebPageModule          See Also

Fires before the page module handles a server side event.

property OnBeforeProcessAction: TNotifyEvent;

Description

Write an OnBeforeProcessAction event handler to perform specific actions each time a server side event is about to be handled.

Once the event requiring server side handling fires the __ACTIONNAME, __TARGETNAME and __SHIFTSTATE, hidden inputs are populated with proper values and the form is submitted.  The server script finds the component specified by the __TARGETNAME value.  The __ACTIONNAME value is used to retrieve the handler from the collection of registered event handlers.  If found, the handler is executed.  __SHIFTSTATE is used to determine the parameters.

Server side events (actions) are registered for a component via the RegisterActions method implemented by each component in its own manner.

The order in which events fire is described in The Order of Web Modules Events topic.


TcxCustomWebPageModule.OnBeforeRender

TcxCustomWebPageModule          See Also

Fires before a web page is rendered.

property OnBeforeRender: TNotifyEvent;

Description

Write an OnBeforeRender event handler to perform specific actions each time a web page is rendered.

The TcxCustomWebPageModule class delegates OnBeforeRender event firing to a specific module helper object (type TcxWebPageModuleHelper).

You should use the OnBeforeRender event property of a particular web page module (a TcxCustomWebPageModule descendant) to assign a desired event handler at design time.  The referenced OnBeforeRender event is invoked by the ImplDispatchPage method of the module helper object.

The order in which events fire is described in The Order of Web Modules Events topic.


TcxCustomWebPageModule.OnHTMLTag

TcxCustomWebPageModule

Occurs when the page producer needs to interpret the value of an HTML-transparent tag in the HTML template.

type

  TTag = (tgCustom, tgLink, tgImage, tgTable, tgImageMap, tgObject, tgEmbed);

  THTMLTagEvent = procedure (Sender: TObject; Tag: TTag; const TagString: string; TagParams: TStrings; var ReplaceText: string) of object;

property OnHTMLTag: THTMLTagEvent;

Description

Write an OnHTMLTag event handler to convert an HTML-transparent tag into corresponding HTML commands that can be interpreted by a web browser.  If an OnHTMLTag event is not supplied, the HTML-transparent tags in the HTML template will be replaced by empty strings.

The Tag parameter indicates the type of HTML-transparent tag that was encountered in the HTML template.  It can have one of the following values

Value	Meaning
tgLink	The TagString parameter is LINK.  The TagParams describes a hypertext link.  The event handler should return a sequence of HTML commands beginning with an <A> tag and ending with an </A> tag.
tgImage	The TagString parameter is IMAGE.  The TagParams describe a graphic image.  The event handler should return an HTML <IMG> tag.
tgTable	The TagString parameter is TABLE.  The TagParams describe a table.  The event handler should return a sequence of HTML commands beginning with a <TABLE> tag and ending with a </TABLE> tag.
tgImageMap	The TagString parameter is IMAGEMAP.  The TagParams describe a graphic image with associated hot zones.  The event handler should return a sequence of HTML commands beginning with a <MAP> tag and ending with a </MAP> tag.
tgObject	The TagString parameter is OBJECT.  The TagParams contains a reference to an ActiveX control.  The event handler should return a sequence of HTML commands beginning with an <OBJECT> tag and ending with an </OBJECT> tag.
tgEmbed	The TagString parameter is EMBED.  The TagParams contain a reference to a Netscape-compliant add-in DLL.  The event handler should return a sequence of HTML commands beginning with an <EMBED> tag and ending with an </EMBED> tag.
tgCustom	The TagString parameter is an application-defined string.  The event handler can convert the HTML-transparent tag in an application-specific manner.

The TagString parameter is the tag name of the HTML-transparent tag.  If the Tag parameter is tgCustom, TagString should be used to determine what conversion to perform.  The TagParams parameter gives the parameter portion of the HTML-transparent tag.  Each string in the TStrings object has ParamName=Value format.  Use the Names and Values properties of the TStrings object to parse these parameters.


TcxCustomWebPageModule.PositioningType

TcxCustomWebPageModule          See Also

Specifies positioning type for the web page module.

type

  TcxWebPositioningType = (cxptGrid, cxptAbsolute, cxptFlow);

property PositioningType: TcxWebPositioningType;

Description

Use the PositioningType property to specify the manner in which web controls are arranged on the page.  The PositioningType property is tightly bound to the DesignerID property value.  If the DesignerID property is set to 'Form', the PositioningType property cannot be set to cxptFlow (it needs the new Designer and the two-way html editing capabilities of our HTML designer).

The following values are available:

Value	Description
cxptGrid	Web controls are positioned within table cells on the page.
cxptAbsolute	Web controls use absolute positioning on the page.
cxptFlow	Web controls are positioned one after another based upon creation order.

If the PositioningType property is set to cxptGrid, the table is used to position the controls within the page.  The table structure is rather complicated and the only thing that must be mentioned is that all the controls are positioned within TD tags.  This type of positioning provides the best layout compatibility with older browsers.  It is also useful when you want to keep your controls together, rather than having them interspersed with tags from the html template.

In absolute positioning mode (the PositioningType property is set to cxptAbsolute), all web controls on the page are placed at the exact location specified by their Top and Left properties which are relative to the top left corner of the container form.  The top left corner of the form which contains all the web controls is specified by the TopPos and LeftPos properties of the web page module.  The advantage of absolute positioning is reduced HTML code (you will avoid huge amounts of TR and TD tags in the resulting page).  On the other hand, absolute positioning is not quite correctly supported by certain browsers, including Netscape 4.X.

If the PositioningType property is set to cxptFlow there isn't any actual positioning - the controls are merely placed on the page one after another.  When you add a new control to the page, it always appears following any existing control.  In this mode, you are only able to change the order of the controls.

Note:  The form within the IDE displays differently based upon the current DesignerID and PositioningType property settings.


TcxCustomWebPageModule.ScrollLeft

TcxCustomWebPageModule          See Also

Specifies the position to which the page is scrolled horizontally.

property ScrollLeft: Integer;

Description

The ScrollLeft property is used internally to specify the position in pixels to which the web page module is scrolled horizontally.  When handling a request message, the value of the ScrollLeft property is obtained from the __LEFTPOS hidden input which stores the position to which the page is scrolled at the client side.  Then, the ScrollLeft property value is used within specific client-side script which scrolls the window to the desired position at start-up.  Thus, each time the page is reloaded (the server script sends a response), the position within the page is restored.


TcxCustomWebPageModule.ScrollTop

TcxCustomWebPageModule          See Also

Specifies the position to which the page is scrolled vertically.

property ScrollTop: Integer;

Description

The ScrollTop property is used internally to specify the position in pixels to which the web page module is scrolled vertically.  When handling a request message, the value of the ScrollTop property is obtained from the __TOPPOS hidden input which stores the position to which the page is scrolled at the client side.  Then, the ScrollTop property value is used within specific client-side script taht scrolls the window to the desired position at start-up.  Thus, each time the page is reloaded (the server script sends a response), the position within the page is restored.


TcxCustomWebPageModule.TopPos

TcxCustomWebPageModule          See Also

Specifies the top position of the form within a web page.

property TopPos: Integer;

Description

Use the TopPos property to specify the top position of the form that can contain different web controls within a web page.  The TopPos property is in effect only when you use absolute positioning for the page module (the PositioningType property is set to cxptAbsolute).  In this instance, all web controls placed on the form are displayed with a top offset which is equal to the TopPos property value.  In other words, the TopPos property value is added to the value of a web control’s Top property.

Set the TopPos property to an appropriate value if you intend to place a specific object/objects (for instance, an image) in the HTML template, with a fixed height at the top side of your web page.


TcxCustomWebPageModule.Values

TcxCustomWebPageModule          See Also

Represents a list of web page module values.

property Values: TStrings;

Description

Initially, the Values list contains the names (IDs) of the HTML elements whose values should be read from the fields of an HTTP request message.  These component names (IDs) are written to the Values property by the RegisterValues method of a component.

When an HTTP request message is received by the server, its content is parsed..  Then the values of the registered HTML elements are retrieved from the fields of the HTTP request message into the Values property using the previously added name as the index.  These values are written to the Values collection in "Name = Value" format.  Once all the controls are scanned, each of them contains a list of properties and their values, which must be set.  This allows a control not to loose the entered value when reloading a page.

Finally the values of the Values collection should be assigned to the corresponding control’s property(s).  For this purpose, the DoSetValues method is used.


TcxCustomWebPageModule.Create

TcxCustomWebPageModule          See Also

Creates a new instance of the TcxCustomWebPageModule class.

constructor Create(AOwner: TComponent); override;

Description

The Create method is used to instantiate a web page module.  The Create method calls the CreateNew method first.  Then the Create method initializes the Values property.  Then, the constructor checks whether a web page module is created at run time.  If so, the Create constructor calls the SetAsString method to compose the form state (if the request is the first one for the page, the form state is blank).  Then if OldCreateOrder is True, the Create method calls the OnCreate event handler for the web page module if one is assigned to it.


TcxCustomWebPageModule.CreateNew

TcxCustomWebPageModule          See Also

Creates an instance of the TcxCustomWebPageModule class.

constructor CreateNew(AOwner: TComponent; Dummy: Integer=0); override;

Description

The CreateNew method is used to create a web page module without using the associated .DFM file to initialize it.

The first argument, AOwner, is the owner of the web page module (usually the application).  The second argument, Dummy, defaults to 0 and is not used by this constructor.

The CreateNew method calls the inherited constructor, and then initializes the properties of a web page module.


TcxCustomWebPageModule.Destroy

TcxCustomWebPageModule          See Also

Destroys the TcxCustomWebPageModule object.

destructor Destroy; override;

Description

The Destroy method is used to destroy an instance of the web page module object.

Before calling the inherited destructor, the Destroy method release any allocated memory – it frees properties initialized by the Create and CreateNew methods.


TcxCustomWebPageModule.FindVariable

TcxCustomWebPageModule          See Also

Implements the FindVariable method of the IWebVariablesContainer interface.

function FindVariable(const AName: string): TComponent;

Description

This method implements the corresponding FindVariable method which is a part of the IWebVariablesContainer interface.  EWF page modules implements this interface for internal needs.

Reference Delphi’s WebBroker documentation for more details.


TcxCustomWebPageModule.FindVariableContainer

TcxCustomWebPageModule          See Also

Implements the FindVariableContainer method of the IWebVariablesContainer interface.

function FindVariableContainer(const AName: string): TComponent;

Description

This method implements the corresponding FindVariableContainer method which is a part of the IWebVariablesContainer interface.  EWF page modules implements this interface for internal needs.

Reference Delphi’s Web Broker documentation for more details.


TcxCustomWebPageModule.GetActiveControl

TcxCustomWebPageModule

Returns an interface representing the active web control on the web page.

function GetActiveControl: IcxWebControl;

Description

The GetActiveControl method implements the GetActiveControl method declared by the IcxWebClientData interface.

GetActiveControl provides information about the focused web control.  This method returns a reference to the IcxWebControl interface implemented by the active web control.

When an end user selects a control on a web page, the name of the control is written to a special hidden input (named __ACTIVECONTROLNAME).  This allows the server side of the application to determine the currently active control.


TcxCustomWebPageModule.GetAsString

TcxCustomWebPageModule

Returns string representation of the current web page module.

function GetAsString: string;

Description

The GetAsString method implements the GetAsString method declared by the IcxWebPageModule interface.

The GetAsString method of the TcxCustomWebPageModule class returns string representations of the current page module’s persistent state.  This method is used to fill the form state – its return value is written into a special hidden input (named __FORMSTATE) when generating a response.


TcxCustomWebPageModule.GetBrowser

TcxCustomWebPageModule          See Also

Returns client browser type.

function GetBrowser: TcxWebBrowserClass;

Description

The GetBrowser method implements the GetBrowser method declared by the IcxWebClientData interface.

Because your end users may be using different browsers, the HTML code generated to represent code on these varying browsers differs.  The GetBrowser method provides information about browser type being used.

The client browser type is retrieved from the request string.


TcxCustomWebPageModule.GetDesignerID

TcxCustomWebPageModule          See Also

Returns the value of the DesignerID property.

function GetDesignerID: Integer;

Description

The GetDesignerID method implements the GetDesignerID method declared by the IcxWebPageModule interface.

The GetDesignerID method is used to return the value of the DesignerID property that specifies the mode in which EWF web pages work at design-time: HTML or Form mode.  The value returned by the GetDesignerID method affects how the designer displays the page within the IDE.


TcxCustomWebPageModule.GetEncoding

TcxCustomWebPageModule          See Also

Returns the text representation of encoding type for the current web page module.

function GetEncoding: string;

Description

The GetEncoding method implements the GetEncoding method of the IcxWebPageModule interface.

The GetEncoding method returns a proper text representation for the current web page module’s encoding type specified by the EncodingType property.  The string returned by the GetEncoding method is used as the value for the ‘ENCTYPE’ attribute of the ‘FORM’ tag when generating HTML code for the form.

The table below shows available encoding types that can be set via the EncodingType property and their HTML equivalents:

The EncodingType property value	HTML Equivalent
wetApplication	application/x-www-form-urlencoded
wetMultipart	multipart/form-data
wetText	text/plain


TcxCustomWebPageModule.GetIsFirstRequest

TcxCustomWebPageModule          See Also

Returns the value of the IsFirstRequest property.

function GetIsFirstRequest: Boolean;

Description

The GetIsFirstRequest method implements the GetIsFirstRequest method of the IcxWebClientData interface.

The GetIsFirstRequest method is used to return the value of the IsFirstRequest property which indicates whether the same page was requested by a user the last time.  It should return True if the page module is processed at design time or the requested page is the same as the previous.  Otherwise False should be returned.

This method allows the server script to determine whether the form state should be loaded.  If the same page was requested the last time (the repeated request), the changes made by an end user should be applied to the page.  Otherwise, the requested page is loaded in its initial state (retrieved from the DFM file).


TcxCustomWebPageModule.GetLeftPos

TcxCustomWebPageModule          See Also

Returns the value of the LeftPos property.

function GetLeftPos: Integer;

Description

The GetLeftPos method implements the GetLeftPos method of the IcxWebClientData interface.

The GetLeftPos method returns the value of the LeftPos property that specifies horizontal position at the left side of the form - which serves as the container for different web controls.

Note: The LeftPos property is in effect only when you use absolute positioning for the page module (the PositioningType property is set to cxptAbsolute).

The value returned by the GetLeftPos method is added to the value of web a control’s Left property in order to position web controls with a specific offset within the page.


TcxCustomWebPageModule.GetModuleHelper

TcxCustomWebPageModule          See Also

Returns the value of the ModuleHelper property.

function GetModuleHelper: TcxWebPageModuleHelper;

Description

The GetModuleHelper method is used to return the value of the ModuleHelper property that represents an object which implements the delegated IcxWebModule and IcxWebPage interfaces.

The GetModuleHelper method calls the inherited GetModuleHelper method and casts the returned type to TcxWebPageModuleHelper.

Thus, the GetModuleHelper method returns the TcxWebPageModuleHelper object whose methods fully implement methods declared in the IcxWebModule and IcxWebPage interfaces.  These methods are designed to control web page active state and content.


TcxCustomWebPageModule.GetModuleHelperClass

TcxCustomWebPageModule          See Also

Returns a class-reference to a specific module helper object.

function GetModuleHelperClass: TcxWebModuleHelperClass; override;

Description

The GetModuleHelperClass method is used internally to return a class-reference type which holds a reference to a module helper class.


TcxCustomWebPageModule.GetModuleRenderHelper

TcxCustomWebPageModule          See Also

Returns the value of the ModuleRenderHelper property.

function GetModuleRenderHelper: TcxWebModuleRenderHelper; virtual;

Description

The GetModuleRenderHelper method is used to return the value of the ModuleRenderHelper property that represents an object which implements the delegated IcxContainerCodeProvider interface.  If the ModuleRenderHelper property is nil,  the GetModuleRenderHelper method initializes it by creating a new instance of the TcxWebModuleRenderHelper object.

Thus, the GetModuleRenderHelper method returns the TcxWebModuleRenderHelper object whose methods fully implement methods declared in the IcxContainerCodeProvider interface.  These methods are designed to render the web page module that is a container for web controls.


TcxCustomWebPageModule.GetPositioningType

TcxCustomWebPageModule          See Also

Returns the value of the PositioningType property.

function GetPositioningType: TcxWebPositioningType;

Description

The GetPositioningType method implements the GetPositioningType method declared by the IcxWebPageModule interface.

The GetPositioningType method returns the appropriate value for the PositioningType property depending upon the browser used at the client side of the application.

The value returned by the GetPositioningType method specifies the manner in which web controls are arranged on the page.

Note:  If the client uses Netscape 4, the PositioningType property cannot be set to cxptAbsolute -  in this instance, the GetPositioningType method automatically returns cxptGrid.


TcxCustomWebPageModule.GetReferer

TcxCustomWebPageModule

Returns the information identifying the destination of the request message.

function GetReferer: string;

Description

The GetReferer method implements the GetReferer method of the IcxWebClientData inteface.

The GetReferer method returns information including the internal module’s name, which specifies the name of the web server application aggregated with the path info portion of the URL identifying the destination of the message.

If the request equals nil, the GetReferer method returns an empty string.


TcxCustomWebPageModule.GetScrollLeft

TcxCustomWebPageModule          See Also

Returns the value of the ScrollLeft property.

function GetScrollLeft: Integer;

Description

The GetScrollLeft method implements the GetScrollLeft method declared by the IcxWebClientData interface.

The GetScrollLeft method is used to return the value of the ScrollLeft property that specifies the horizontal scrolling offset for the current page.  This horizontal scrolling offset is written to a special hidden input (named __LEFTPOS) each time the form is submitted.

The value returned by the GetScrollLeft method is used within specific client-side scripts to scroll the window to a desired position at start-up.  Thus, each time the page is reloaded (the server script sends a response) the position to which the web page module is scrolled horizontally is restored.


TcxCustomWebPageModule.GetScrollTop

TcxCustomWebPageModule          See Also

Returns the value of the ScrollTop property.

function GetScrollTop: Integer;

Description

The GetScrollTop method implements the GetScrollTop method declared by the IcxWebClientData interface.

The GetScrollTop method is used to return the value of the ScrollTop property which specifies the vertical scrolling offset for the current page.  This vertical scrolling offset is written to a special hidden input (named __TOPPOS) each time the form is submitted.

The value returned by the GetScrollTop method is used within specific client-side script for scrolling the window to a desired position at start-up.  Thus, each time the page is reloaded (the server script sends a response) the position to which the web page module is scrolled vertically is restored.


TcxCustomWebPageModule.GetShiftState

TcxCustomWebPageModule

Returns a value that indicates which of the SHIFT, ALT and CTRL keys were pressed on post back.

function GetShiftState: Integer;

Description

The GetShiftState method implements the GetShiftState method declared by the IcxWebClientData interface.

The GetShiftState method is used to return a value that determines which of the SHIFT, ALT and CTRL keys were pressed on post back.  The result should be an integer value representing the bit mask of shift states.  The following table contains bit masks and their string representations.

Bit Mask	String representation	Explanation
1	wssAlt	The Alt key was pressed on post back.
2	wssCtrl	The Ctrl key was pressed on post back.
4	wssShift	The Shift key was pressed on post back.

If several keys were pressed on post back, the return value is the sum of the corresponding bit masks.  For instance, if the ALT and CTRL keys were pressed, the GetShiftState method returns 3.

The information on keys pressed is written to a special hidden input field each time the form is submitted.


TcxCustomWebPageModule.GetTopPos

TcxCustomWebPageModule          See Also

Returns the value of the TopPos property.

function GetTopPos: Integer;

Description

The GetTopPos method implements the GetTopPos method declared by the IcxWebClientData interface.

The GetTopPos method returns the value of the TopPos property which specifies the vertical position of the form which serves as a container for different web controls.

Note:  The TopPos property is in effect only when you use absolute positioning for the page module (the PositioningType property is set to cxptAbsolute).

The value returned by the GetTopPos method is added to the value of a web control’s Top property in order to position web controls with a specific offset within the page.


TcxCustomWebPageModule.GetValues

TcxCustomWebPageModule          See Also

Returns the value of the Values property.

function GetValues: TStrings;

Description

The GetValues method implements the corresponding GetValues method declared by the IcxWebClientData interface.

The GetValues method is used to return the value of the Values property that contains values retrieved from auxiliary hidden inputs contained within the page.


TcxCustomWebPageModule.GetVariable

TcxCustomWebPageModule          See Also

Implements the GetVariable method of the IWebVariablesContainer interface.

function GetVariable(I: Integer): TComponent;

Description

This method implements the corresponding GetVariable method which is a part of the IWebVariablesContainer interface.  EWF page modules implements this interface for internal needs.

See Delphi’s WebBroker documentation for more information.


TcxCustomWebPageModule.GetVariableCount

TcxCustomWebPageModule          See Also

Implements the GetVariableCount method of the IWebVariablesContainer interface.

function GetVariableCount: Integer;

Description

This method implements the corresponding GetVariableCount method that is a part of the IWebVariablesContainer interface.  EWF page modules implements this interface for internal needs.

See Delphi’s WebBroker documentation for more information.


TcxCustomWebPageModule.IsComponentPersistent

TcxCustomWebPageModule          See Also

Returns a value that indicates whether a specific component is to be persisted.

function IsComponentPersistent(AComponent: TComponent): Boolean;

Description

The IsComponentPersistent method implements the IsComponentPersistent method declared by the IcxWebModuleComponentPersistent interface.

The IsComponentPersistent method is used to indicate whether a state of a component specified by the AComponent parameter should be saved.  If the component state is to be saved this method returns True; otherwise, False.

A component is persisted in the following cases.

•	The DefaultMode property (accessed through the ComponentPersistent property of the web page module) is set to pmSave and the component is not stored within the ExceptedComponents collection,

•	The DefaultMode property (accessed through the ComponentPersistent property of the web page module) is set to pmReset and the component is stored within the ExceptedComponents collection.

The IsComponentPersistent method returns True if the AComponent parameter represents the current web page module.  If the web page module is not the component owner specified by the AComponent parameter the IsComponentPersistent method returns False.


TcxCustomWebPageModule.LoadState

TcxCustomWebPageModule

Loads a component’s state from the form state.

procedure LoadState;

Description

The LoadState method is used to load a component’s state from the form state.  LoadState is executed in all but the very first request to the same page module.

If the request is not the first, the LoadState method assigns values to the registered properties of all the components within the page module and retrieves the values of auxiliary hidden inputs into specific page module properties.  Then the LoadState method runs event handlers processed by the server script.


TcxCustomWebPageModule.PerformScript

TcxCustomWebPageModule          See Also

Performs a specific server script.

function PerformScript(const Value: string): string;

Description

The PerformScript method implements the PerformScript method declared by the IcxWebPageModule interface.

The PerformScript method is used to perform a particular server script whose context is determined by the Value parameter.

Currently EWF uses the MS Script engine to implement server scripts.  You can use VCL objects in scripts as well.  All published properties of VCL objects are available in scripts.  For instance, you can use published properties of the current EWF module or methods of dataset objects.


TcxCustomWebPageModule.ReadState

TcxCustomWebPageModule

Reads the web page module’s data from a stream.

procedure ReadState(Reader: TReader); override;

Description

The ReadState method is part of a sequence of calls used by the streaming system that loads and saves VCL components.  It reads the values of all component published properties, stored data, and owned components from the reader object passed in the Reader parameter.  Do not call the ReadState method directly.


TcxCustomWebPageModule.RedirectToPage

TcxCustomWebPageModule

Redirects an end user to another page in the application.

function RedirectToPage(const APageName: string; const AParams: string): Boolean;

Description

Use the RedirectToPage method to redirect the application to the page specified by the APageName parameter.

The AParams parameter specifies the string containing request parameters.  The parameters are in Name=Value format.

The RedirectToPage method returns True if the redirection was completed successfully.  Otherwise it returns False.


TcxCustomWebPageModule.SetActiveControl

TcxCustomWebPageModule

Makes a control - specified by its interface - active.

procedure SetActiveControl(const Value: IcxWebControl);

Description

The SetActiveControl method implements the SetActiveControl method declared by the IcxWebClientData interface.

The SetActiveControl method makes a specific web control active within the web page.  The web control is specified by its supported IcxWebControl interface.

The name of the active control is written to a special hidden input (named __ACTIVECONTROLNAME).  This provides synchronization between the server and client sides of the application in order to determine the current active control.


TcxCustomWebPageModule.SetAsString

TcxCustomWebPageModule

Reads page module related information from the form state.

procedure SetAsString(const Value: string);

Description

The SetAsString method implements the SetAsString method declared by the IcxWebPageModule interface.  The SetAsString method is used to read a particular page module from the form state.  The form state is stored within a special hidden input named __FORMSTATE.

The Value parameter determines string representation of the form state.


TcxCustomWebPageModule.SetDesignerID

TcxCustomWebPageModule          See Also

Sets the value of the DesignerID property.

procedure SetDesignerID(Value: Integer);

Description

The SetDesignerID method implements the SetDesignerID method declared by the IcxWebPageModule interface.

The SetDesignerID method is used to set the value of the DesignerID property that specifies the designer mode (HTML or Form mode) via which the EWF web page appear at design time.

The Value parameter specifies a specific designer mode.  It affects how the designer displays the page within the IDE at design time.


TcxCustomWebPageModule.SetIsDesignerPreviewModule

TcxCustomWebPageModule

Sets a value that indicates whether the designer previews the page module.

procedure SetIsDesignerPreviewModule(Value: Boolean);

Description

The SetIsDesignerPreviewModule method is used to set an internal variable to the value specified Value parameter.  The Value parameter specifies whether the designer previews the page module.


TcxCustomWebPageModule.SetLeftPos

TcxCustomWebPageModule          See Also

Sets the value of the LeftPos property.

procedure SetLeftPos(const Value: Integer);

Description

The SetLeftPos method implements the SetLeftPos method of the IcxWebClientData interface.

The SetLeftPos method is used to set the value of the LeftPos property.

The Value parameter specifies the horizontal position of the left side of the form that serves as a container for different web controls.

Note:  The LeftPos property is in effect only when you use absolute positioning for the page module (the PositioningType property is set to cxptAbsolute).

The value set by the SetLeftPos method for the LeftPos property is added to the value of a web control’s Left property in order to position web controls with a specific offset within the page.


TcxCustomWebPageModule.SetShiftState

TcxCustomWebPageModule

Sets a value that indicates which of the SHIFT, ALT and CTRL keys were pressed on post back.

procedure SetShiftState(const Value: Integer);

Description

The SetShiftState method implements the SetShiftState method declared by the IcxWebClientData interface.

The SetShiftState method is used to set an internal variable that indicates which of the SHIFT, ALT and CTRL keys were pressed on post back.  This method uses the __SHIFTSTATE hidden input value obtained from the request, in order to set the value for this property.

The Value parameter is an integer value, which represents the bit mask of shift states.  The following table contains the relationships between bit masks and their string representations.

Bit Mask	String representation	Explanation
1	wssAlt	The Alt key was pressed on post back.
2	wssCtrl	The Ctrl key was pressed on post back.
4	wssShift	The Shift key was pressed on post back.

If several keys were pressed on post back, the Value parameter should be the sum of the corresponding bit masks.  For instance, if the ALT and CTRL keys were pressed, the Value parameter equals 3.

The information on keys pressed is stored within a special hidden input.  Thus, the server side of the application can obtain which of the SHIFT, ALT and CTRL keys were pressed on post back.


TcxCustomWebPageModule.SetTopPos

TcxCustomWebPageModule          See Also

Sets the value of the ToptPos property.

procedure SetTopPos(const Value: Integer);

Description

The SetTopPos method implements the SetTopPos method declared by the IcxWebClientData interface.

The SetTopPos method is used to set the value of the TopPos property.

The Value parameter specifies the vertical position of the form that serves as a container for different web controls.

Note:  The TopPos property is in effect only when you use absolute positioning for the page module (the PositioningType property is set to cxptAbsolute).

The value set by the SetTopPos method for the TopPos property is added to the value of a web control’s Top property in order to position web controls with a specific offset within the page.


TcxWebComponentsPersistent
TcxWebComponentsPersistent Object

Hierarchy          Properties          Methods          See Also

Represents an object used by a web page module to persist component states.

Unit

cxWebModule

TcxWebComponentsPersistent = class(TPersistent)

Description

The TcxWebComponentsPersistent object is accessed via the ComponentPersistent property of a web page module.  The TcxWebComponentsPersistent object is used to manage the persistence of all EWF components contained within the page module.

The TcxWebComponentsPersistent class provides two basic properties: DefaultMode property which specifies whether the page module saves or resets component states, and ExceptedComponents property representing a collection of components whose states are to be or not to be saved.  Additionally, the TcxWebComponentsPersistent class implements a number of methods which help to control component states.


TcxWebComponentsPersistent Hierarchy
Hierarchy

TPersistent


Properties for TcxWebComponentsPersistent
TcxWebComponentsPersistent Properties

TcxWebComponentsPersistent          Legend

In TcxWebComponentsPersistent

DefaultMode

ExceptedComponents


Methods for TcxWebComponentsPersistent
TcxWebComponentsPersistent Methods

TcxWebComponentsPersistent          Legend

In TcxWebComponentsPersistent

Assign

ComponentRemoved

Create

Destroy

GetOwner

HasComponent


TcxWebComponentsPersistent.DefaultMode

TcxWebComponentsPersistent          See Also

Specifies whether the page module saves or resets component states.

type

  TcxWebDefaultPersistentMode = (pmSave, pmReset);

property DefaultMode: TcxWebDefaultPersistentMode;

Description

Use the DefaultMode property to specify how the web page module manages the states of all the components it contains.

By default, the page module persists all the contained controls.

Set the DefaultMode property of the web page module to pmReset, so as not to persist the states of all contained components except components referenced by the ExceptedComponents property.

When the DefaultMode property is set to pmSave, the web page module saves states of all its components except those stored within the ExceptedComponents collection.


TcxWebComponentsPersistent.ExceptedComponents

TcxWebComponentsPersistent          See Also

Represents a collection of components whose states are to be persisted.

property ExceptedComponents: TcxWebComponentsPersistentItems;

Description

The ExceptedComponents property is used to provide access to a specific collection of components whose states are to be saved depending upon the DefaultMode property value.

When the DefaultMode property is set to pmSave, the ExceptedComponents property contains components which are not to be persisted.  Conversely, when the DefaultMode property is set to pmReset, the ExceptedComponents property contains only components which are to be persisted.


TcxWebComponentsPersistent.Assign

TcxWebComponentsPersistent

Assigns the contents of one TcxWebComponentsPersistent object to another.

procedure Assign(Source: TPersistent); override;

Description

Use the Assign method to assign the contents of one TcxWebComponentsPersistent object to another.  This method should be used instead of direct assignment.  The Source parameter specifies the source object.  The TcxWebComponentsPersistent object whose Assign method is called is the destination object.


TcxWebComponentsPersistent.ComponentRemoved

TcxWebComponentsPersistent          See Also

Removes a specific component form the ExceptedComponents collection.

procedure ComponentRemoved(const AComponent: TComponent);

Description

The ComponentRemoved method is called internally by the Notification method of a TcxCustomWebPageModule object in order to respond to deleting a component specified by the AComponent parameter from the web page module.

As implemented in the TcxWebComponentsPersistent class, the ComponentRemoved method calls the ComponentRemoved method of the TcxWebComponentsPersistentItems class to remove the specified component from the collection of components which are to be persisted.


TcxWebComponentsPersistent.Create

TcxWebComponentsPersistent          See Also

Creates a new instance of the TcxWebComponentsPersistent class.

constructor Create;

Description

The Create method is used to create an instance of the TcxWebComponentsPersistent class.  After calling the inherited constructor, the Create method initializes the ExceptedComponents property.


TcxWebComponentsPersistent.Destroy

TcxWebComponentsPersistent          See Also

Destroys the TcxWebComponentsPersistent object

destructor Destroy; override;

Description

The Destroy method is used to destroy an instance of the TcxWebComponentsPersistent object and release any allocated memory.  Before calling the inherited destructor, the Destroy method frees the ExceptedComponents property.


TcxWebComponentsPersistent.GetOwner

TcxWebComponentsPersistent

Returns the owner of an object.

function GetOwner: TPersistent; override;

Description

The GetOwner method is used internally to find the owner (typically, a web page module) of a persistent object.


TcxWebComponentsPersistent.HasComponent

TcxWebComponentsPersistent          See Also

Returns a value indicating whether the ExceptedComponents collection contains a specific component.

function HasComponent(const AComponent: TComponent): Boolean;

Description

The HasComponent method is used to ascertain whether a component specified by the AComponent parameter is contained within the ExceptedComponents collection.

If a specified component is stored within the ExceptedComponents collection, the HasComponent method returns True; otherwise, False. As implemented in the TcxWebComponentsPersistent class, the HasComponent method simply calls the HasComponent method of the TcxWebComponentsPersistentItems class.


TcxWebComponentsPersistentItem
TcxWebComponentsPersistentItem Object

Hierarchy          Properties          Methods          See Also

Represents an item in a TcxWebComponentsPersistentItems collection.

Unit

cxWebModule

TcxWebComponentsPersistentItem = class(TCollectionItem)

Description

The TcxWebComponentsPersistentItem class represents an item in a TcxWebComponentsPersistentItems collection.

As the direct descendant of the TCollectionItem class, the TcxWebComponentsPersistentItem class inherits all the properties and methods of a standard collection item.  Additionally, it implements its own Component property and ComponentsPersistent method, and overrides the Assign method.


TcxWebComponentsPersistentItem Hierarchy
Hierarchy

TCollectionItem


Properties for TcxWebComponentsPersistentItem
TcxWebComponentsPersistentItem Properties

TcxWebComponentsPersistentItem          Legend

In TcxWebComponentsPersistentItem

Component


Methods for TcxWebComponentsPersistentItem
TcxWebComponentsPersistentItem Methods

TcxWebComponentsPersistentItem          Legend

In TcxWebComponentsPersistentItem

Assign

ComponentsPersistent


TcxWebComponentsPersistentItem.Component

TcxWebComponentsPersistentItem

Specifies the EWF component that is to be stored within the ExceptedComponents collection.

property Component: TComponent;

Description

Use the Component property to specify a web component you want to store within the ExceptedComponents collection.

When the DefaultMode property is set to pmSave, the ExceptedComponents property contains components for which you do not want to save state.  Conversely, when the DefaultMode property is set to pmReset, the ExceptedComponents property contains only components for which you do want to save their state.


TcxWebComponentsPersistentItem.Assign

TcxWebComponentsPersistentItem

Assigns the contents of one TcxWebComponentsPersistentItem object to another.

procedure Assign(Source: TPersistent); override;

Description

Use the Assign method to assign the contents of one TcxWebComponentsPersistentItem object to another.  This method should be used instead of direct assignment.  The Source parameter specifies the source object.  The TcxWebComponentsPersistentItem object whose Assign method is called is the destination object.


TcxWebComponentsPersistentItem.ComponentsPersistent

TcxWebComponentsPersistentItem          See Also

Returns a collection object to which the item belongs.

function ComponentsPersistent: TcxWebComponentsPersistent;

Description

The ComponentsPersistent method is used internally to return a TcxWebComponentsPersistent object which owns the given collection item.


TcxWebComponentsPersistentItems
TcxWebComponentsPersistentItems Object

Hierarchy          Methods          See Also

Represents a collection of items referring to EWF components whose states are to be saved.

Unit

cxWebModule

TcxWebComponentsPersistentItems = class(TCollection)

Description

The TcxWebComponentsPersistentItems class is the direct descendant of the TCollection class and thus it inherits all the properties and methods of a standard collection object.  It represents a collection of items each of which refers to a specific EWF component.  Thus the TcxWebComponentsPersistentItems class is designed to store a specific collection of components whose states are to be saved depending upon the DefaultMode property setting.

When the DefaultMode property is set to pmSave, items of the TcxWebComponentsPersistentItems collection refer to components for which you do not want to save state.  Conversely, when the DefaultMode property is set to pmReset, items of the TcxWebComponentsPersistentItems collection refer to components for which you do want to save their state.


TcxWebComponentsPersistentItems Hierarchy
Hierarchy

TCollection


Methods for TcxWebComponentsPersistentItems
TcxWebComponentsPersistentItems Methods

TcxWebComponentsPersistentItems          Legend

In TcxWebComponentsPersistentItems

ComponentRemoved

HasComponent


TcxWebComponentsPersistentItems.ComponentRemoved

TcxWebComponentsPersistentItems          See Also

Removes the specified component from the TcxWebComponentsPersistentItems collection.

procedure ComponentRemoved(const AComponent: TComponent);

Description

The ComponentRemoved method is called in order to respond to component deletion -  specified by the AComponent parameter - from the web page module.

As implemented in the TcxWebComponentsPersistentItems class, the ComponentRemoved method scans all items of the collection for the one whose Component property is equal to the AComponent parameter and frees that item (if it is found).

Thus the ComponentRemoved method removes a specified component from the collection of components which are to be persisted.


TcxWebComponentsPersistentItems.HasComponent

TcxWebComponentsPersistentItems          See Also

Returns a value indicating whether the TcxWebComponentsPersistentItems collection contains the specified component.

function HasComponent(const AComponent: TComponent): Boolean;

Description

The HasComponent method is used to ascertain whether a component specified by the AComponent parameter is contained within the TcxWebComponentsPersistentItems collection.

If a specified component is stored within the TcxWebComponentsPersistentItems collection, the HasComponent method returns True; otherwise, False.


cxWebRender Unit Overview
cxWebRender Unit

Classes

TcxHTMLTag

TcxHTMLTextBuilder

TcxWebBrowser

TcxWebBrowserFactory

TcxWebRenderer

Other Types

TcxHTMLAttribute

TcxHTMLAttributes

TcxWebBrowserClass

TcxHTMLEvent

TcxHTMLEvents

TcxHTMLStyleAttribute

TcxHTMLStyleAttributes

TcxHTMLTagClass

TcxWebRendererClass

Global Functions

WebBrowserFactory


TcxHTMLTag
TcxHTMLTag Object

Hierarchy          Methods          See Also

Serves as the base class for classes representing HTML tags.

Unit

cxWebRender

TcxHTMLTag = class(TObject)

Description

Web pages are rendered using TcxHTMLTextBuilder object methods.  These methods provide a way to render tags, their attributes and text contents.  Rendered tags are represented by specially designed objects.  This provides a way to unify tag rendering and determine browsers and attributes supported by this tag.

The TcxHTMLTag class is the base class for objects representing tags.  Each descendant of this class should override its methods in order to provide correct rendering of the tag it represents. Descendants of the TcxHTMLTag class serve as parameters for the WriteBeginTag, WriteEndTag and WriteSingleTag methods of the TcxHTMLTextBuilder class.


TcxHTMLTag Hierarchy
Hierarchy

TObject


Methods for TcxHTMLTag
TcxHTMLTag Methods

TcxHTMLTag          Legend

In TcxHTMLTag

Name

SupportedAttributes

SupportedEvents

SupportedStyleAttributes


TcxHTMLTag.Name

TcxHTMLTag

Returns the tag name.

function Name: string; virtual; abstract;

Description

Derived classes override the Name method in order to return the name of the tag.  For instance, the TcxHTMLTagDiv class, which is the TcxHTMLTag descendant class, overrides this method to return ‘div’.


TcxHTMLTag.SupportedAttributes

TcxHTMLTag          See Also

Returns a set of attributes supported by the tag.

TcxHTMLAttributes = set of TcxHTMLAttribute;

class function SupportedAttributes: TcxHTMLAttributes;

Description

Derived classes override the SupportedAttributes method in order to return a set of attributes supported by the tag.  This method’s return value is used to determine whether an attribute can be rendered within the tag.  Such a determination takes place when calling the WriteAttribute method of the TcxHTMLTextBuilder class.


TcxHTMLTag.SupportedEvents

TcxHTMLTag          See Also

Returns a set of events supported by the tag.

TcxHTMLEvents = set of TcxHTMLEvent;

class function SupportedEvents: TcxHTMLEvents;

Description

Derived classes override the SupportedEvents method in order to return a set of events supported by the tag.  This method’s return value is used to determine whether an event attribute can be rendered within the tag.  Such determination takes place when calling the WriteEventAttribute method of the TcxHTMLTextBuilder class.


TcxHTMLTag.SupportedStyleAttributes

TcxHTMLTag          See Also

Returns a set of style attributes supported by the tag.

TcxHTMLStyleAttributes = set of TcxHTMLStyleAttribute;

class function SupportedStyleAttributes: TcxHTMLStyleAttributes;

Description

Derived classes override the SupportedStyleAttributes method in order to return a set of style attributes supported by the tag.  This method’s return value is used to determine whether a style attribute can be rendered within the STYLE attribute.  Such determination takes place when calling the WriteStyleAttribute method of the TcxHTMLTextBuilder class.


TcxHTMLTextBuilder
TcxHTMLTextBuilder Object

Hierarchy          Properties          Methods

Provides a means to render HTML code.

Unit

cxWebRender

TcxHTMLTextBuilder = class(TObject)

Description

The TcxHTMLTextBuilder class provides a number of methods designed to render HTML code.  Each method writes text to an internal buffer.  This buffer is accessed via the Text property.  EWF uses the TcxHTMLTextBuilder object in order to render HTML code of the requested web page.  The same object is transmitted to objects supporting the IcxCodeProvider, IcxContainerCodeProvider and IcxStylesProvider interfaces.  In other words it is transmitted to objects that can provide HTML code by which they are represented on a web page.  These objects use the TcxHTMLTextBuilder object methods to write the code they provide.  After each provider object has written its code, the TcxHTMLTextBuilder object contains a complete code of the generated web page in its Text property.

The TcxHTMLTextBuilder class contains a number of properties specifying characters used to render HTML code.  These properties get their default values when the object is initialized.  You will find it unnecessary to change these property values.


TcxHTMLTextBuilder Hierarchy
Hierarchy

TObject


Properties for TcxHTMLTextBuilder
TcxHTMLTextBuilder Properties

TcxHTMLTextBuilder          Legend

In TcxHTMLTextBuilder

Browser

ColonChar

DoubleQuoteChar

EqualsChar

Indent

NewLine

SemicolonChar

SlashChar

TagLeftChar

TagRightChar

Text

UseFormatting


Methods for TcxHTMLTextBuilder
TcxHTMLTextBuilder Methods

TcxHTMLTextBuilder          Legend

In TcxHTMLTextBuilder

Create

Destroy

WriteAttribute

WriteBeginTag

WriteEndTag

WriteEventAttribute

WriteSingleTag

WriteStyle

WriteStyleAttribute

WriteText

WriteUnknownAttribute

WriteUnknownStyleAttribute


TcxHTMLTextBuilder.Browser

TcxHTMLTextBuilder          See Also

Returns client browser type.

property Browser: TcxWebBrowserClass;

Description

The Browser property is used to determine the type of browser for which HTML code is being rendered.  The value of this property is initialized within the constructor of the TcxHTMLTextBuilder class.

ReadOnly Property


TcxHTMLTextBuilder.ColonChar

TcxHTMLTextBuilder

Specifies the colon character.

property ColonChar: Char;

Description

The ColonChar property value is used to render style attributes of HTML tags.  This character separates styles attributes from their values.  The value of the ColonChar property is set to ‘:’ within the constructor.


TcxHTMLTextBuilder.DoubleQuoteChar

TcxHTMLTextBuilder

Specifies the double quote character.

property DoubleQuoteChar: Char;

Description

The DoubleQuoteChar property value is used to render attributes of HTML tags.  Values of tag attributes are enclosed in characters specified by this property.  The value of the DoubleQuoteChar property is set to ‘"’ within the constructor.


TcxHTMLTextBuilder.EqualsChar

TcxHTMLTextBuilder

Specifies the equal sign character.

property EqualsChar: Char;

Description

The EqualsChar property value is used to render attributes of HTML tags.  This character separates attributes from their values.  The value of the EqualsChar property is set to ‘=’ within the constructor.


TcxHTMLTextBuilder.Indent

TcxHTMLTextBuilder          See Also

Specifies the indent of an enclosed tag with respect to its parent.

property Indent: string;

Description

Enclosed tags can be shifted right relative to their parent tags in order to improve readability of the generated HTML code.  The Indent property specifies the string containing the number of space characters, which is used to shift child tags relatively to their parents.  The constructor sets the value of this property to a string containing two spaces.

Note that if the UseFormatting property value is False, the Indent property is considered to be an empty string.


TcxHTMLTextBuilder.NewLine

TcxHTMLTextBuilder

Specifies the carriage return character.

property NewLine: string;

Description

The NewLine property value is used to format generated HTML code.  This character separates text lines from each other.  The value of the NewLine property is set to ‘#13#10’ within the constructor.

Note that if the UseFormatting property value is False, the NewLine property is considered to be an empty string.


TcxHTMLTextBuilder.SemicolonChar

TcxHTMLTextBuilder

Specifies the semicolon character.

property SemicolonChar: Char;

Description

The SemicolonChar property value is used to render style attributes of HTML tags.  This character separates style attributes from each other.  The value of the SemicolonChar property is set to ‘;’ within the constructor.


TcxHTMLTextBuilder.SlashChar

TcxHTMLTextBuilder

Specifies the slash character.

property SlashChar: Char;

Description

The SlashChar property value is used to render HTML tags.  This character is written after the ‘less than’ character to indicate closing tags.  It is also written before the ‘greater than’ character when rendering single tags.  The value of the SlashChar property is set to ‘/’ within the constructor.


TcxHTMLTextBuilder.TagLeftChar

TcxHTMLTextBuilder

Specifies the ‘less than’ character.

property TagLeftChar: Char;

Description

The TagLeftChar property value is used to render HTML tags.  This character is written before the tag name.  The value of the TagLeftChar property is set to ‘<’ within the constructor.


TcxHTMLTextBuilder.TagRightChar

TcxHTMLTextBuilder

Specifies the ‘greater than’ character.

property TagRightChar: Char;

Description

The TagRightChar property value is used to render HTML tags.  This character is always the last one in a string representing a tag.  The value of the TagRightChar property is set to ‘>’ within the constructor.


TcxHTMLTextBuilder.Text

TcxHTMLTextBuilder

Stores the contents of a web page being generated.

property Text: string;

Description

Web pages are rendered via TcxHTMLTextBuilder object methods.  Methods of this object write generated code to the internal buffer accessed via the Text property.  This property provides access to the complete code of the web page after rendering is finished.

ReadOnly Property


TcxHTMLTextBuilder.UseFormatting

TcxHTMLTextBuilder          See Also

Specifies whether formatting should be applied to the generated HTML code.

property UseFormating: Boolean;

Description

The UseFormatting property specifies whether line breaks and indents are applied to the generated code.  If it is set to True, the code is formatted.  Otherwise the generated code is not formatted.

The UseFormatting property is set to True within the constructor.


TcxHTMLTextBuilder.Create

TcxHTMLTextBuilder          See Also

Creates an instance of the TcxHTMLTextBuilder class.

constructor Create(ABrowser: TcxWebBrowserClass);

Description

The Create method is used to instantiate the TcxHTMLTextBuilder class.  The ABrowser parameter specifies the type of client browser for which the code is to be generated.  The value of the parameter is assigned to the Browser property.


TcxHTMLTextBuilder.Destroy

TcxHTMLTextBuilder          See Also

Destroys the TcxHTMLTextBuilder object.

destructor Destroy; override;

Description

The Destroy method is used to dispose of the TcxHTMLTextBuilder object and free any allocated memory.


TcxHTMLTextBuilder.WriteAttribute

TcxHTMLTextBuilder          See Also

Writes a specified attribute to the current tag.

Overloaded Variants

procedure WriteAttribute(Attrbute: TcxHTMLAttribute);

procedure WriteAttribute(Attrbute: TcxHTMLAttribute; Value: string);

procedure WriteAttribute(Attrbute: TcxHTMLAttribute; Value: Integer);

procedure WriteAttribute(Attrbute: TcxHTMLAttribute; Value: Double);

procedure WriteAttribute(Attrbute: TcxHTMLAttribute; Value: Boolean);

Description

The WriteAttribute method is used to write a specified attribute with or without its value to the current tag.  The Attribute parameter specifies the attribute to be written.  This parameter is present in all overloaded variants of the WriteAttribute method.  These overloads differ in the second parameter only.  This is the Value parameter, which specifies the value of the attribute being written.  Most of the overloaded variants differ in the type of Value parameter only.  This allows you to transmit attribute values of type string, integer, double and Boolean.  The WriteAttribute method with a single Attribute parameter is used to render attributes that do not require values.

HTML tags can contain user-defined attributes.  The WriteUnknownAttribute method is used instead of WriteAttribute to render such attributes.

Note that attributes can be written right after opening or single tags only.  Otherwise calling the WriteAttribute method is not in effect.  Opening and single tags are written via the WriteBeginTag and WriteSingleTag methods.


TcxHTMLTextBuilder.WriteBeginTag

TcxHTMLTextBuilder          See Also

Writes a specified opening tag.

procedure WriteBeginTag(ATag: TcxHTMLTagClass; AUseIndent: Boolean = True; ANewLine: Boolean = True);

Description

The WriteBeginTag method is used to write a string representing the specified opening tag to the contents of a generated page.  The tag being written is specified via the ATag parameter.  The AUseIndent parameter specifies whether the indent string should be written before the tag.  Note that each time the WriteBeginTag method is called, the Indent property value is added to the indent string. The ANewLine parameter specifies whether a line break should be inserted after the written tag.  The last two parameters are in effect only if the UseFormatting property is set to True.

After an opening tag has been written, its attributes can be rendered.  This is performed via the WriteAttribute and WriteUnknownAttribute methods.


TcxHTMLTextBuilder.WriteEndTag

TcxHTMLTextBuilder          See Also

Writes a specified closing tag.

procedure WriteEndTag(ATag: TcxHTMLTagClass; AUseIndent: Boolean = True; ANewLine: Boolean = True);

Description

The WriteEndTag method is used to write a string representing the specified closing tag to the contents of a generated page.  The tag being written is specified via the ATag parameter.  The AUseIndent parameter specifies whether the indent string should be written before the tag.  Note that each time the WriteEndTag method is called, the indent string is shortened by the length of the Indent property value.  The ANewLine parameter specifies whether a line break should be inserted after the written tag.  The last two parameters are in effect only if the UseFormatting property is set to True.

Before writing a specified tag to the contents of a generated web page, it is validated.  This tag should be the same as the last written opening tag.  Otherwise the tag is ignored.


TcxHTMLTextBuilder.WriteEventAttribute

TcxHTMLTextBuilder          See Also

Writes a specified event attribute to the current tag.

procedure WriteEventAttribute(Event: TcxHTMLEvent; Value: string);

Description

The WriteEventAttribute method is used to write a specified event attribute together with its handler to the current tag.  The event attribute is specified by the Event parameter.  The Value parameter specifies text of the event handler.

You should use the WriteUnknownAttribute method to write event attributes, which are not defined in the TcxHTMLEvent type.

Note that attributes including events, can be written right after opening or single tags only.  Otherwise calling the WriteEventAttribute method is not in effect.  Opening and single tags are written via the WriteBeginTag and WriteSingleTag methods.


TcxHTMLTextBuilder.WriteSingleTag

TcxHTMLTextBuilder          See Also

Writes a specified single tag.

procedure WriteSingleTag(ATag: TcxHTMLTagClass; AUseIndent: Boolean = True; ANewLine: Boolean = True);

Description

The WriteSingleTag method is used to write a string representing the specified tag to the contents of a generated page.  This method writes tags, which don’t require closing tags.  The tag being written is specified via the ATag parameter.  The AUseIndent parameter specifies whether the indent string should be written before the tag.  The ANewLine parameter specifies whether a line break should be inserted after the written tag.  The last two parameters are in effect only if the UseFormatting property is set to True.

After a tag has been written, its attributes can be rendered.  This is performed via the WriteAttribute and WriteUnknownAttribute methods.


TcxHTMLTextBuilder.WriteStyle

TcxHTMLTextBuilder          See Also

Writes an inner skeleton of the element’s style definition tag.

procedure WriteStyle(Name: string; AUseIndent: Boolean = True; ANewLine: Boolean = True);

Description

The WriteStyle method is used to render an inner skeleton of the element’s style definition tag.  This skeleton is used in the STYLE tag or CSS.  It consists of a dot, the name of the style being rendered, and opening and closing braces.  The style name is specified via the Name parameter.  The AUseIndent parameter specifies whether the indent string should be written before the skeleton.  The ANewLine parameter specifies whether a line break should be inserted after the written string.

After the skeleton has been written, it is possible to render style attributes.  The WriteStyleAttribute and WriteUnknownStyleAttribute methods are used for this purpose.


TcxHTMLTextBuilder.WriteStyleAttribute

TcxHTMLTextBuilder          See Also

Writes a specified style attribute.

Overloaded Variants

procedure WriteStyleAttribute(Attrbute: TcxHTMLStyleAttribute; AValue: string);

procedure WriteStyleAttribute(Attrbute: TcxHTMLStyleAttribute; AValue: Integer);

procedure WriteStyleAttribute(Attrbute: TcxHTMLStyleAttribute; AValue: Double);

Description

The WriteStyleAttribute method is used to render style attributed with their values.  The Attribute parameter specifies the style attribute to be written.  This parameter is the same in all overloaded variants of the WriteStyleAttribute method.  These overloads differ in the type of AValue parameter only.  This parameter specifies the value of the rendered attribute.  The WriteStyleAttribute method is overloaded in order to allow string, integer and double values to be transmitted as this parameter.

The WriteUnknownStyleAttribute method is used to render style attributes, which are not defined in the TcxHTMLStyleAttribute type. Style attributes can be written right after opening and single tags or within STYLE tags.  Otherwise calling the WriteStyleAttribute method is not in effect.  Opening, single and STYLE tags are written via the WriteBeginTag, WriteSingleTag, and WriteStyle methods.


TcxHTMLTextBuilder.WriteText

TcxHTMLTextBuilder

Writes custom text to the contents of a generated web page.

procedure WriteText(AText: string; AUseIndent: Boolean = True; ANewLine: Boolean = True);

Description

The WriteText method is used to render the specified text to the contents of the web page being rendered.  The text to be written is specified via the AText parameter.  The AUseIndent parameter specifies whether the indent string should be written before the text.  The ANewLine parameter specifies whether a line break should be inserted after the written string.

Before adding the specified text to the contents of a web page, all line breaks are replaced with indent strings followed by line breaks.

The WriteText method is used to write the inner text contents of a tag.  This can be done after the WriteBeginTag or WriteSingleTag method is called.  Note that you cannot write any attributes to a tag after the WriteText method is called.  Attributes are written via the WriteAttribute, WriteEventAttribute and WriteStyleAttribute methods.


TcxHTMLTextBuilder.WriteUnknownAttribute

TcxHTMLTextBuilder          See Also

Writes a custom attribute.

procedure WriteUnknownAttribute(Attrbute: string);

Description

The WriteUnknownAttribute method is used to write a specified attribute with or without its value to the current tag.  The Attribute parameter specifies the attribute to be written together with its value, if required. The WriteUnknownAttribute method is only used to render attributes, which are not defined in the TcxHTMLAttribute type.  Otherwise the WriteAttribute method is used.

Note that attributes can be written right after opening or single tags only.  Otherwise calling the WriteUnknownAttribute method is not in effect.  Opening and single tags are written via the WriteBeginTag and WriteSingleTag methods.

It is undesirable to use this method.  Use the WriteAttribute or WriteEventAttribute method instead.


TcxHTMLTextBuilder.WriteUnknownStyleAttribute

TcxHTMLTextBuilder          See Also

Writes a custom style attribute.

procedure WriteUnknownStyleAttribute(Attrbute: string);

Description

The WriteUnknownStyleAttribute method is used to write a specified style attribute with or without its value to the current tag.  The Attribute parameter specifies the attribute to be written together with its value. The WriteUnknownStyleAttribute method is only used to render attributes, which are not defined in the TcxHTMLStyleAttribute type.  Otherwise the WriteStyleAttribute method is used.

Style attributes can be written right after opening and single tags or within STYLE tags.  Otherwise calling the WriteStyleAttribute method is not in effect.  Opening, single and STYLE tags are written via the WriteBeginTag, WriteSingleTag, and WriteStyle methods.

It is undesirable to use this method.  Use the WriteStyleAttribute method instead if possible.


TcxWebRenderer
TcxWebRenderer Object

Hierarchy          Properties          Methods          See Also

Represents the base class for all renderers.

Unit

cxWebRender

TcxWebRenderer = class(TObject)

Description

Each component can have a number of renderer classes associated with it.  Renderer classes are used to generate HTML code representing a component within specific browsers.  This technique provides multi browser support.  The proper class of a renderer object is retrieved via the GetRendererClass method of the IcxCodeProvider interface implemented by a component.  The TcxWebRenderer class serves as the base class for all renderer objects.

The TcxWebRenderer class duplicates all the methods of the IcxCodeProvider and IcxContainerCodeProvider interfaces designed to render code.  Thus implemented methods of these interfaces should simply call the same method of the corresponding renderer object.  Namely this is performed by methods of the TcxWebRenderHelper class, implementing the mentioned interface methods.

The TcxWebRenderer class methods are declared in order to be overridden in derived classes.


TcxWebRenderer Hierarchy
Hierarchy

TObject


Properties for TcxWebRenderer
TcxWebRenderer Properties

TcxWebRenderer          Legend

In TcxWebRenderer

Component

HTMLTextBuilder


Methods for TcxWebRenderer
TcxWebRenderer Methods

TcxWebRenderer          Legend

In TcxWebRenderer

Create

Destroy

GetScriptFiles

WriteBeginHTML

WriteClassHTML

WriteClassOutOfFormHTML

WriteClassScripts

WriteEndHTML

WriteHiddenField

WriteHiddenFormElements

WriteHTML

WriteInvisibleImage

WriteOutOfFormHTML

WriteScripts

WriteStyles

WriteXML


TcxWebRenderer.Component

TcxWebRenderer

Returns the component for which code is rendered.

property Component: TComponent;

Description

The Component property provides access to the component being rendered.  This allows the renderer class to access the properties and methods of the component it renders.

The Component property is initialized in the constructor of the TcxWebRenderer class.

ReadOnly Property


TcxWebRenderer.HTMLTextBuilder

TcxWebRenderer

Provides access to the object used for code rendering.

property HTMLTextBuilder: TcxHTMLTextBuilder;

Description

A web page is rendered by rendering all the components which exists within it.  Each component instantiates the appropriate renderer object (the TcxWebRenderer descendant) for this purpose.  The same variable of the TcxHTMLTextBuilder type is transmitted to constructors of these objects.  Constructors assign the transmitted value to the HTMLTextBuilder property.  Methods of renderer classes are designed to write HTML and JScript code to the inner buffer of the object, represented by this property.  This is done via the TcxHTMLTextBuilder class methods.  As a result, the mentioned variable contains the complete code of the rendered web page at the end of rendering.

ReadOnly Property


TcxWebRenderer.Create

TcxWebRenderer          See Also

Creates an instance of the TcxWebRenderer object.

constructor Create(AComponent: TComponent; AHTMLTextBuilder: TcxHTMLTextBuilder);

Description

The Create method is used to instantiate the TcxWebRenderer class (and its descendants unless they override it).  This method assigns the values of the AComponent and AHTMLTextBuilder parameter values to the Component and HTMLTextBuilder properties respectively.


TcxWebRenderer.Destroy

TcxWebRenderer          See Also

Destroys the TcxWebRenderer object.

destructor Destroy; override;

Description

The Destroy method is used to dispose the TcxWebRenderer object and free any allocated memory.


TcxWebRenderer.GetScriptFiles

TcxWebRenderer          See Also

Designed to specify external script files used by a component.

class procedure GetScriptFiles(AList: TStrings); virtual;

Description

The GetScriptFiles method is designed to specify the names of JScript external files used by a component.  Strings specifying file names should be added to the AList parameter.  This can be performed via the Add method of the TStrings class.

This method is called once for a component class to avoid multiple inclusions of JScript files.  The GetScriptFiles method is sequentially called for each component class available on a web page.  The same variable is transmitted to each method call as the AList parameter.  Thus, the variable contains a complete list of files to include after all component classes are scanned.

As implemented in the TcxWebRenderer class, the GetScriptFiles method performs nothing.  Derived classes override it to provide proper code rendering for the associated component. This method is called by the GetScriptFiles method of the TcxWebRenderHelper class.


TcxWebRenderer.IsBrowserSupported

TcxWebRenderer          See Also

Returns a value indicating whether the renderer is capable of producing code for a specific browser.

function IsBrowserSupported(AWebBrowser: TcxWebBrowserClass): Boolean; virtual;

Description

Different controls can be rendered in a number of ways to represent themselves under different browsers.  Several renderers are registered for controls in order to provide multi-browser support.  When a control is about to be rendered, the IsBrowserSupported method of each registered renderer is called.  The user’s browser type is transmitted via the AWebBrowser parameter.  The first renderer (working back from last to first registered) whose IsBrowserSupported method returns True is used to generate the control’s code.

If none of the renderers registered for a control returns True, the corresponding control is not rendered.  Thus it is recommended to register one renderer whose IsBrowserSupported method always returns True.  This renderer must be registered first since renderers are scanned from the last registered.

Note: Renderer classes are registered via the RegisterRenderer method call.  You should override the RegisterRenderers method for this purpose.


TcxWebRenderer.WriteBeginHTML

TcxWebRenderer          See Also

Designed to render HTML code which precedes code that represents child controls and contained HTML code.

procedure WriteBeginHTML; virtual;

Description

Container controls can have a number of child controls and custom HTML code placed within it.  The BeginHTMLRender method is designed to render HTML code preceding the code, which represents child controls and custom HTML.  The code should be written using the TcxHTMLTextBuilder object methods, represented by the HTMLTextBuilder property.

As implemented in the TcxWebRenderer class, the WriteBeginHTML method performs nothing.  Derived classes override it to provide proper code rendering for the associated component. This method is called by the WriteBeginHTML method of the TcxWebRenderHelper class.


TcxWebRenderer.WriteClassHTML

TcxWebRenderer          See Also

Designed to render HTML code, placed within the form, used by all components of a particular class.

class procedure WriteClassHTML(AHTMLTextBuilder: TcxHTMLTextBuilder); virtual;

Description

The WriteClassHTML method is designed to render HTML code common for all components of a particular class.  The rendered code is placed within the form (the FORM tag).  The code should be written using methods of the TcxHTMLTextBuilder object, represented by the HTMLTextBuilder property.

As implemented in the TcxWebRenderer class, the WriteClassHTML method performs nothing.  Derived classes override it to provide proper code rendering for the associated component. This method is called by the WriteClassHTML method of the TcxWebRenderHelper class.


TcxWebRenderer.WriteClassOutOfFormHTML

TcxWebRenderer          See Also

Designed to render HTML code, placed outside the form, used by all components of a particular class.

class procedure WriteClassOutOfFormHTML(AHTMLTextBuilder: TcxHTMLTextBuilder); virtual;

Description

The WriteClassHTML method is designed to render HTML code common for all components of a particular class.  The rendered code is placed outside the form (the FORM tag).  The code should be written using methods of the TcxHTMLTextBuilder object, represented by the HTMLTextBuilder property.

This method can be implemented to render HTML elements whose values shouldn’t be transmitted to the server script.  This allows you to speed up client-server data transmission.

As implemented in the TcxWebRenderer class, the WriteClassOutOfFormHTML method performs nothing.  Derived classes can override it to provide proper code rendering for the associated component. This method is called by the WriteClassOutOfFormHTML method of the TcxWebRenderHelper class.


TcxWebRenderer.WriteClassScripts

TcxWebRenderer          See Also

Designed to render JScript code used by all components of a particular class.

class procedure WriteClassScripts(AHTMLTextBuilder: TcxHTMLTextBuilder); virtual;

Description

The WriteClassScripts method is designed to render JScript code used by all components of a particular class.  The rendered code is placed within the SCRIPT tag.  The code should be written using the WriteText method of the TcxHTMLTextBuilder object, represented by the HTMLTextBuilder property.

As implemented in the TcxWebRenderer class, the WriteClassScripts method performs nothing.  Derived classes can override it to provide proper code rendering for the associated component. This method is called by the WriteClassScripts method of the TcxWebRenderHelper class.


TcxWebRenderer.WriteEndHTML

TcxWebRenderer          See Also

Designed to render the HTML code that follows code, which represents child controls and contained HTML code.

procedure WriteEndHTML; virtual;

Description

Container controls can have a number of child controls and custom HTML code placed within them.  The WriteEndHTML method is designed to render HTML code following the code, which represents child controls and custom HTML.  The code should be written using methods of the TcxHTMLTextBuilder object, represented by the HTMLTextBuilder property.

As implemented in the TcxWebRenderer class, the WriteEndHTML method performs nothing.  Derived classes can override it to provide proper code rendering for the associated component.

This method is called by the WriteEndHTML method of the TcxWebRenderHelper class.


TcxWebRenderer.WriteHiddenField

TcxWebRenderer          See Also

Renders a hidden input with a specified name and value.

procedure WriteHiddenField(FieldName, FieldValue: string); virtual;

Description

The WriteHiddenField method writes a hidden input to the contents of the HTMLTextBuilder property.  The FieldName parameter specifies the value of the ID and NAME attributes of the rendered input field.  The input value is specified via the FieldValue parameter.


TcxWebRenderer.WriteHiddenFormElements

TcxWebRenderer          See Also

Designed to write hidden form elements for a particular component.

procedure WriteHiddenFormElements; virtual;

Description

The WriteHiddenFormElements method is designed to render hidden inputs used by components to transmit information between the client browser and the server script.  The code should be written using the WriteHiddenField method of the TcxHTMLTextBuilder object, represented by the HTMLTextBuilder property.

As implemented in the TcxWebRenderer class, the WriteHiddenFormElements method performs nothing.  Derived classes can override it to provide proper code rendering for the associated component.

This method is called by the WriteHiddenFormElements method of the TcxWebRenderHelper class.


TcxWebRenderer.WriteHTML

TcxWebRenderer          See Also

Designed to render HTML code representing a component.

procedure WriteHTML; virtual;

Description

The WriteHTML method is designed to write HTML code representing a component on a web page.  The rendering of the component’s appearance should be implemented in this method.  The code should be written using methods of the TcxHTMLTextBuilder object, represented by the HTMLTextBuilder property.

As implemented in the TcxWebRenderer class, the WriteHTML method performs nothing.  Derived classes can override it to provide proper code rendering for the associated component. This method is called by the WriteHTML method of the TcxWebRenderHelper class.


TcxWebRenderer.WriteInvisibleImage

TcxWebRenderer

Renders a transparent image of a specified size.

procedure WriteInvisibleImage(Width, Height: Integer); virtual;

Description

The WriteInvisibleImage method is used to render a transparent image.  The Width and Height parameters specify the width and height of the rendered image.

Transparent images are used to specify the bounds of table cells.  This technique is required for Netscape browsers.


TcxWebRenderer.WriteOutOfFormHTML

TcxWebRenderer          See Also

Designed to render HTML code, placed outside the form, for a component.

procedure WriteOutOfFormHTML; virtual;

Description

The WriteOutOfFormHTML method is designed to write HTML code for the associated component.  The rendered code is placed outside the form.  The code should be written using methods of the TcxHTMLTextBuilder object, represented by the HTMLTextBuilder property.

As implemented in the TcxWebRenderer class, the WriteOutOfFormHTML method performs nothing.  Derived classes can override it to provide proper code rendering for the associated component. This method is called by the WriteOutOfFormHTML method of the TcxWebRenderHelper class.


TcxWebRenderer.WriteScripts

TcxWebRenderer          See Also

Designed to render JScript code for a particular component.

procedure WriteScripts; virtual;

Description

The WriteScripts method is used to render JScript code required for proper functioning of the associated component.  The code should be written using the WriteText method of the TcxHTMLTextBuilder object, represented by the HTMLTextBuilder property.

As implemented in the TcxWebRenderer class, the WriteScripts method performs nothing.  Derived classes can override it to provide proper code rendering for the associated component. This method is called by the WriteScripts method of the TcxWebRenderHelper class.


TcxWebRenderer.WriteStyles

TcxWebRenderer

Designed to generate HTML code representing styles used by the component class.

class procedure WriteStyles; virtual;

Description

The WriteStyles method is designed to write HTML code representing styles provided by the component and used by components of this class.  This feature is used to change the default look and feel of components. The code should be written using methods of the TcxHTMLTextBuilder object, represented by the HTMLTextBuilder property.

As implemented in the TcxWebRenderer class, the WriteStyles method performs nothing.  Derived classes can override it to provide proper code rendering for the associated component. This method is called by the WriteStyles method of the TcxWebRenderHelper class.


TcxWebRenderer.WriteXML

TcxWebRenderer

Reserved for future use.

procedure WriteXML; virtual;

Description

Reserved for future use.


TcxWebBrowser
TcxWebBrowser Object

Hierarchy          Methods          See Also

Provides information on a specific browser.

Unit

cxWebRender

TcxWebBrowser = class(TObject)

Description

The HTML code required for a web page can differ for the various browsers.  The reason is that browsers may not support some of the tags, attributes, etc.  Thus, it is necessary to distinguish between client browser types.

Browsers are represented by TcxWebBrowser class descendants in the EWF.  Each descendant overrides the base class methods in order to provide information specific to the browser type it represents.  This information includes the browser name and the positioning type it supports.  These values are returned by the Name and GetPositioningType class functions. Each TcxWebBrowser descendant must also be capable of determining whether the current user uses it.  The IsMyUserAgent class function is implemented for this purpose.

Each browser type must be registered in the browser factory.  If this has been done for a particular browser, the EWF takes the browser into consideration when determining which browser type to use.  Browsers are registered by calling the RegisterBrowser method of the TcxWebBrowserFactory object.  You can access a TcxWebBrowserFactory instance via the WebBrowserFactory global function call.

When a page is rendered, the appropriate renderer class (a TcxWebRenderer descendant) is obtained via the GetRendererClass method of the IcxCodeProvider interface, and this interface is implemented by the EWF components.  The browser class (a value of the TcxWebBrowserClass type) is passed to the method as a parameter.

The following TcxWebBrowser descendants are available:

Value	Description
TcxWebBrowserIE4	The browser is Internet Explorer 4.0.
TcxWebBrowserIE	The browser is Internet Explorer version 5 and higher.
TcxWebBrowserNS4	The browser is Netscape Navigator 4.0.
TcxWebBrowserNS6	The browser is Netscape Navigator 6.0.
TcxWebBrowserOpera	The browser is Opera.

All listed browser types are registered by default.


TcxWebBrowser Hierarchy
Hierarchy

TObject


Methods for TcxWebBrowser
TcxWebBrowser Methods

TcxWebBrowser          Legend

In TcxWebBrowser

 GetPositioningType

 IsMyUserAgent

 Name


TcxWebBrowser.GetPositioningType

TcxWebBrowser

Returns the positioning type actually used by the browser as this may differ from the one specified.

class function GetPositioningType(APosType: TcxWebPositioningType): TcxWebPositioningType; virtual;

Description

Different browsers may not support some of positioning types.  Thus the positioning type specified by the PositioningType property of a page module must be changed in such instances.  The GetPositioningType class function is used to implement this substitution.

The APosType parameter specifies the positioning type to be substituted, if necessary.  If the browser type supports the specified positioning, the GetPositioningType class function should return the same value.  Otherwise, it should return the positioning type it can use instead of the specified one.

As implemented in the TcxWebBrowser class, the GetPositioningType method returns the value specified by the parameter, thus there is no substitution performed.  Descendant classes override this method, if necessary.


TcxWebBrowser.IsMyUserAgent

TcxWebBrowser

Determines whether a TcxWebBrowser descendant represents the user’s browser.

class function IsMyUserAgent(const AUserAgent: string): Boolean; virtual; abstract;

Description

When a user requests a page, the user agent string is transmitted to the server side of the application.  This string is used to determine the type of the browser, for which the code must be rendered.  The IsMyUserAgent class function uses this string to determine whether a browser object represents the current user’s browser.

The AUserAgent parameter specifies the user agent string used to determine the user’s browser type.  If a TcxWebBrowser descendant identifies itself by this value, the IsMyUserAgent method must return True.  Otherwise, it must return False.

The IsMyUserAgent class function is declared abstract in the TcxWebBrowser class, so it doesn’t have an implementation.  Descendant classes override this method as necessary.


TcxWebBrowser.Name

TcxWebBrowser

Returns the browser name.

class function Name: string; virtual; abstract;

Description

The Name function is declared abstract in the TcxWebBrowser type and thus doesn’t have an implementation.  Descendants override this method to return the name of the browser they represent.


TcxWebBrowserFactory
TcxWebBrowserFactory Object

Hierarchy          Properties          Methods          See Also

Stores registered browser types.

Unit

cxWebRender

TcxWebBrowserFactory = class(TObject)

Description

The HTML code of a web page can differ in various browsers.  The reason is that browsers may not support some of the tags, attributes, etc.  Thus it is necessary to distinguish between client browser types.

Browsers are represented by TcxWebBrowser class descendants in the EWF.  Each browser type must be registered in the browsers factory.  If this has been done for a particular browser, the EWF takes the browser into consideration when determining which browser type to use.  Browsers are registered by calling the RegisterBrowser method of the TcxWebBrowserFactory object.  You can access a TcxWebBrowserFactory instance via the WebBrowserFactory global function call.

The TcxWebBrowserFactory class also allows you to specify the default web browser.  It is used when the user’s browser doesn’t match any of the registered ones.


TcxWebBrowserFactory Hierarchy
Hierarchy

TObject


Properties for TcxWebBrowserFactory
TcxWebBrowserFactory Properties

TcxWebBrowserFactory          Legend

In TcxWebBrowserFactory

DefaultWebBrowser

Items


Methods for TcxWebBrowserFactory
TcxWebBrowserFactory Methods

TcxWebBrowserFactory          Legend

In TcxWebBrowserFactory

 Count

 Create

 Destroy

 GetWebBrowserByUserAgent

 RegisterBrowser


TcxWebBrowserFactory.DefaultWebBrowser

TcxWebBrowserFactory          See Also

Specifies the web browser class used when the user’s browser is not registered.

property DefaultWebBrowser: TcxWebBrowserClass;

Description

When users request a page, the browser type they use is determined.  It is used to obtain the class of the TcxWebBrowser descendant corresponding to the desired browser.  Component renderers are chosen by the obtained value.  The IsBrowserSupported method of TcxWebRenderer descendants is used for this purpose.

If there are no registered browser classes corresponding to the obtained browser type, then the default browser class is used.  This is specified by the DefaultWebBrowser property and this is set to the TcxWebBrowserIE class by default.


TcxWebBrowserFactory.Items

TcxWebBrowserFactory          See Also

Provides indexed access to registered browser classes.

property Items[Index:Integer]: TcxWebBrowserClass;

Description

The Items property allows you to access registered browser classes by their indexes within the collection.  Classes indexing is zero-based.  The last index corresponds to the last registered browser class.  The total number of registered browsers can be obtained via the Count property.

Registered browser classes can also be accessed via the GetWebBrowserByUserAgent method. It uses the user agent string to determine the browser.

ReadOnly Property


TcxWebBrowserFactory.Count

TcxWebBrowserFactory          See Also

Returns the number of registered browser classes.

function Count: Integer;

Description

The Count method is used to obtain the total number of registered browser classes.  The returned value is always one greater than the last item’s index.  Browser classes can be obtained by their indexes within the collection via the Items property.


TcxWebBrowserFactory.Create

TcxWebBrowserFactory

Raises an exception.

constructor Create;

Description

Do not use the Create method.  A TcxWebBrowserFactory instance is created automatically and can be accessed via the WebBrowserFactory global function call.  Trying to instantiate this class via the Create method results in raising an exception.


TcxWebBrowserFactory.Destroy

TcxWebBrowserFactory

Destroys the TcxWebBrowserFactory object.

destructor Destroy; override;

Description

The Destroy method is used to dispose the TcxWebBrowserFactory object and free any allocated memory.  Do not use this method in applications.  A TcxWebBrowserFactory instance is destroyed automatically.


TcxWebBrowserFactory.GetWebBrowserByUserAgent

TcxWebBrowserFactory

Returns the registered browser class corresponding to the specified user agent string.

function GetWebBrowserByUserAgent(const AUserAgent: string): TcxWebBrowserClass;

Description

The GetWebBrowserByUserAgent method is used to obtain the registered browser class by the user agent string.  This method scans through the registered classes and uses their IsMyUserAgent method to perform the task.

The AUserAgent parameter specifies the user agent string by which the user’s browser is identified and it is passed to the IsMyUserAgent method as a parameter.


TcxWebBrowserFactory.RegisterBrowser

TcxWebBrowserFactory          See Also

Registers a specific browser type.

procedure RegisterBrowser(ABrowser: TcxWebBrowserClass);

Description

The HTML code of a web page can differ in various browsers.  The reason is that browsers may not support some of the tags, attributes, etc.  Thus it is necessary to distinguish between client browser types.

Browsers are represented by TcxWebBrowser class descendants in EWF.  Each browser type must be registered in the browsers factory.  If a particular browser has been registered, EWF takes it into consideration when determining which browser type to use.  Browsers are registered via calling the RegisterBrowser method of the TcxWebBrowserFactory object.  You can access a TcxWebBrowserFactory instance via the WebBrowserFactory global function call.


TcxWebBrowserClass
TcxWebBrowserClass type

Represents a reference to the TcxWebBrowser class.

Unit

cxWebRender

TcxWebBrowserClass = class of TcxWebBrowser;

Description

Browser types are represented by TcxWebBrowser class descendants.  Each browser type must be registered in the browser factory.  If a particular browser has been registered, EWF takes it into consideration when determining which browser type to use.

Browsers are registered via the RegisterBrowser method of the TcxWebBrowserFactory object.  This method requires the browser class (a value of the TcxWebBrowserClass) as a parameter.

Note that you should use the WebBrowserFactory global function call to access the TcxWebBrowserFactory object.


WebBrowserFactory
WebBrowserFactory Function

Returns the registered browsers collection.

Unit

cxWebRender

function WebBrowserFactory: TcxWebBrowserFactory;

Description

Use the WebBrowserFactory global function to obtain the TcxWebBrowserFactory object.  This object is used to register and store a collection of browsers.  Registered browsers are taken into consideration when it is required to determine which component renderers are to be used for a specific user’s browser type.  The IsBrowserSupported method of a renderer is used to identify whether it can produce HTML code for the specified browser type.

You should use the RegisterBrowser method of the obtained TcxWebBrowserFactory object in order to register the browser type.  This method requires a parameter of the TcxWebBrowserClass type.


TcxHTMLAttribute
TcxHTMLAttribute type

Contains values corresponding to the tag attributes.

Unit

cxWebRender

TcxHTMLAttribute = (aAccesskey, aAction, aAlign, aAlt, aBackground, aBgcolor, aBorder, aBordercolor, aCellpadding, aCellspacing, aChecked, aClass, aCols, aColspan, aDisabled, aEnctype, aFor, aHeight, aHref, aHspace, aId, aLanguage, aMaxlength, aMethod, aMultiple, aName, aNowrap, aReadOnly, aRows, aRowspan, aRules, aSelected, aSize, aSrc, aStyle, aTabindex, aTarget, aTitle, aType, aValign, aValue, aVisibility, aVspace, aWidth, aWrap);

Description

The TcxHTMLAttribute type contains values corresponding to HTML tag attributes.  They are used to specify the attribute when writing it via the WriteAttribute method of the TcxHTMLTextBuilder class.  TcxHTMLAttributes represents a set of values defined by the TcxHTMLAttribute type.  A set of attributes can be used to specify the attributes supported by a tag via the SupportedAttributes class function of the TcxHTMLTag descendants.

The following values are available in the TcxHTMLAttribute type:

Value	Description
aAccesskey	Corresponds to the accesskey attribute.
aAction	Corresponds to the action attribute.
aAlign	Corresponds to the align attribute.
aAlt	Corresponds to the alt attribute.
aBackground	Corresponds to the background attribute.
aBgcolor	Corresponds to the bgcolor attribute.
aBorder	Corresponds to the border attribute.
aBordercolor	Corresponds to the bordercolor attribute.
aCellpadding	Corresponds to the cellpadding attribute.
aCellspacing	Corresponds to the cellspacing attribute.
aChecked	Corresponds to the checked attribute.
aClass	Corresponds to the class attribute.
aCols	Corresponds to the cols attribute.
aColspan	Corresponds to the colspan attribute.
aDisabled	Corresponds to the disabled attribute.
aEnctype	Corresponds to the enctype attribute.
aFor	Corresponds to the for attribute.
aHeight	Corresponds to the height attribute.
aHref	Corresponds to the href attribute.
aHspace	Corresponds to the hspace attribute.
aId	Corresponds to the id attribute.
aLanguage	Corresponds to the language attribute.
aMaxlength	Corresponds to the maxlength attribute.
aMethod	Corresponds to the method attribute.
aMultiple	Corresponds to the multiple attribute.
aName	Corresponds to the name attribute.
aNowrap	Corresponds to the nowrap attribute.
aReadOnly	Corresponds to the readonly attribute.
aRows	Corresponds to the rows attribute.
aRowspan	Corresponds to the rowspan attribute.
aRules	Corresponds to the rules attribute.
aSelected	Corresponds to the selected attribute.
aSize	Corresponds to the size attribute.
aSrc	Corresponds to the src attribute.
aStyle	Corresponds to the style attribute.
aTabindex	Corresponds to the tabindex attribute.
aTarget	Corresponds to the target attribute.
aTitle	Corresponds to the title attribute.
aType	Corresponds to the type attribute.
aValign	Corresponds to the valign attribute.
aValue	Corresponds to the value attribute.
aVisibility	Corresponds to the visibility attribute.
aVspace	Corresponds to the vspace attribute.
aWidth	Corresponds to the width attribute.
aWrap	Corresponds to the wrap attribute.


TcxHTMLAttributes
TcxHTMLAttributes type

Represents a set of HTML attributes.

Unit

cxWebRender

TcxHTMLAttributes = set of TcxHTMLAttribute;

Description

The TcxHTMLAttributes type represents a set of values corresponding to HTML tag attributes.  This type is used to specify a set of attributes supported by a tag via the SupportedAttributes class function of the TcxHTMLTag class.

The values defining attributes are listed in the TcxHTMLAttribute type.


TcxHTMLStyleAttribute
TcxHTMLStyleAttribute type

Contains values corresponding to HTML style attributes.

Unit

cxWebRender

TcxHTMLStyleAttribute = (saBackgroundColor, saBackgroundImage, saBorderBottomColor, saBorderBottomStyle, saBorderBottomWidth, saBorderCollapse, saBorderColor, saBorderLeftColor, saBorderLeftStyle, saBorderLeftWidth, saBorderRightColor, saBorderRightStyle, saBorderRightWidth, saBorderStyle, saBorderTopColor, saBorderTopStyle, saBorderTopWidth, saBorderWidth, saColor, saCursor, saDisplay, saFont, saFontFamily, saFontSize, saFontStyle, saFontVariant, saFontWeight, saHeight, saLeft, saListStyleImage, saListStylePosition, saListStyleType, saMarginBottom, saMarginLeft, saMarginRight, saMarginTop, saOverflow, saPosition, saTextDecoration, saTextTransform, saTop, saVisibility, saWidth, saZIndex);

Description

The TcxHTMLStyleAttribute type contains values corresponding to HTML style attributes.  They are used to specify the attribute when writing it via the WriteStyleAttribute method of the TcxHTMLTextBuilder class.  The TcxHTMLStyleAttributes type represents a set of values defined by the TcxHTMLStyleAttribute type.  A set of style attributes can be used to specify style attributes supported by a tag via the SupportedStyleAttributes class function of the TcxHTMLTag descendants.

The following values are available in the TcxHTMLStyleAttribute type:

Value	Description
saBackgroundColor	Corresponds to the background-color attribute.
saBackgroundImage	Corresponds to the background-image attribute.
saBorderBottomColor	Corresponds to the border-bottom-color attribute.
saBorderBottomStyle	Corresponds to the border-bottom-style attribute.
saBorderBottomWidth	Corresponds to the border-bottom-width attribute.
saBorderCollapse	Corresponds to the border-collapse attribute.
saBorderColor	Corresponds to the border-color attribute.
saBorderLeftColor	Corresponds to the border-left-color attribute.
saBorderLeftStyle	Corresponds to the border-left-style attribute.
saBorderLeftWidth	Corresponds to the border-left-width attribute.
saBorderRightColor	Corresponds to the border-right-color attribute.
saBorderRightStyle	Corresponds to the border-right-style attribute.
saBorderRightWidth	Corresponds to the border-right-width attribute.
saBorderStyle	Corresponds to the border-style attribute.
saBorderTopColor	Corresponds to the border-top-color attribute.
saBorderTopStyle	Corresponds to the border-top-style attribute.
saBorderTopWidth	Corresponds to the border-top-width attribute.
saBorderWidth	Corresponds to the border-width attribute.
saColor	Corresponds to the color attribute.
saCursor	Corresponds to the cursor attribute.
saDisplay	Corresponds to the display attribute.
SaFont	Corresponds to the font attribute.
saFontFamily	Corresponds to the font-family attribute.
saFontSize	Corresponds to the font-size attribute.
saFontStyle	Corresponds to the font-style attribute.
saFontVariant	Corresponds to the font-variant attribute.
saFontWeight	Corresponds to the font-weight attribute.
saHeight	Corresponds to the height attribute.
SaLeft	Corresponds to the left attribute.
saListStyleImage	Corresponds to the list-style-image attribute.
saListStylePosition	Corresponds to the list-style-position attribute.
saListStyleType	Corresponds to the list-style-type attribute.
saMarginBottom	Corresponds to the margin-bottom attribute.
saMarginLeft	Corresponds to the margin-left attribute.
saMarginRight	Corresponds to the margin-right attribute.
saMarginTop	Corresponds to the margin-top attribute.
saOverflow	Corresponds to the overflow attribute.
saPosition	Corresponds to the position attribute.
saTextDecoration	Corresponds to the text-decoration attribute.
saTextTransform	Corresponds to the text-transform attribute.
SaTop	Corresponds to the top attribute.
saVisibility	Corresponds to the visibility attribute.
saWidth	Corresponds to the width attribute.
saZIndex	Corresponds to the z-index attribute.


TcxHTMLStyleAttributes
TcxHTMLStyleAttributes type

Represents a set of HTML style attributes.

Unit

cxWebRender

TcxHTMLStyleAttributes = set of TcxHTMLStyleAttribute;

Description

The TcxHTMLStyleAttributes type represents a set of values corresponding to HTML style attributes.  This type is used to specify a set of style attributes supported by a tag via the SupportedStyleAttributes class function of the TcxHTMLTag class.

The values defining attributes are listed in the TcxHTMLStyleAttribute type.


TcxHTMLTagClass
TcxHTMLTagClass type

Represents a reference to the TcxHTMLTag type.

Unit

cxWebRender

TcxHTMLTagClass = class of TcxHTMLTag;

Description

The TcxHTMLTagClass type represents a class-reference type which refers to the TcxHTMLTag class.  This type is used to call class functions of TcxHTMLTag descendants, since generally, the type of descendant is unknown at compile-time.


TcxWebRendererClass
TcxWebRendererClass type

Represents a reference to the TcxWebRenderer type.

Unit

cxWebRender

TcxWebRendererClass = class of TcxWebRenderer;

Description

The TcxWebRendererClass type represents a class-reference type which refers to the TcxWebRenderer class.  This type is used to manipulate descendants of the TcxWebRenderer class when the descendant is unknown at compile time.  For instance, the GetRendererClass method of the IcxCodeProvider interface is designed to return the value of the TcxWebRendererClass type.


TcxHTMLEvent
TcxHTMLEvent type

Contains values corresponding to HTML event attributes.

Unit

cxWebRender

type

  TcxHTMLEvent = (eOnBlur, eOnChange, eOnClick, eOnDblClick, eOnDragStart, eOnDragEnd, eOnFocus, eOnKeyPress, eOnLoad, eOnMouseDown, eOnMouseMove, eOnMouseOver, eOnMouseOut, eOnMouseUp, eOnSelect, eOnSelectStart, eOnUnload);

  TcxHTMLEvents = set of TcxHTMLEvent;

Description

The TcxHTMLEvent type contains values corresponding to HTML event attributes.  They are used to specify the attribute when writing it via the WriteEventAttribute method of the TcxHTMLTextBuilder class.

The TcxHTMLEvents type represents a set of values defined by the TcxHTMLEvent type.  A set of event attributes can be used to specify event attributes supported by a tag.  This is performed via the SupportedEvents class function of the TcxHTMLTag descendants.

The following values are available in the TcxHTMLEvent type:

Value	Description
eOnBlur	Corresponds to the onblur event attribute.
eOnChange	Corresponds to the onchange event attribute.
eOnClick	Corresponds to the onclick event attribute.
eOnDblClick	Corresponds to the ondblclick event attribute.
eOnDragStart	Corresponds to the ondragstart event attribute.
eOnDragEnd	Corresponds to the ondragend event attribute.
eOnFocus	Corresponds to the onfocus attribute.
OnKeyPress	Corresponds to the onkeypress attribute.
eOnLoad	Corresponds to the onload attribute.
eOnMouseDown	Corresponds to the onmousedown attribute.
eOnMouseMove	Corresponds to the onmousemove attribute.
eOnMouseOver	Corresponds to the onmouseover attribute.
eOnMouseOut	Corresponds to the onmouseout attribute.
eOnMouseUp	Corresponds to the onmouseup attribute.
eOnSelect	Corresponds to the onselect attribute.
eOnSelectStart	Corresponds to the onselectstart attribute.
eOnUnload	Corresponds to the onunload attribute.


TcxHTMLEvents
TcxHTMLEvents type

Represents a set of values corresponding to the TcxHTMLEvents type.

Unit

cxWebRender

TcxHTMLEvents = set of TcxHTMLEvent;

Description

The TcxHTMLEvents type represents a set of values corresponding to HTML event attributes.  This type is used to specify event attributes supported by a tag.  This is performed via the SupportedEvents class function of TcxHTMLTag descendants.

The values defining attributes are listed in the TcxHTMLEvent type.


cxWebCalendar Unit Overview
cxWebCalendar Unit

Classes

TcxWebCalendar

Other Types

TcxChangeMonthEvent

TcxSelectDayEvent

TcxWebCalendarEvent

TcxWebDayNameFormat

TcxWebMonthNameFormat


TcxWebCalendarEvent
TcxWebCalendarEvent type

Contains values specifying custom event types for the web calendar.

Unit

cxWebCalendar

TcxWebCalendarEvent = (ceOnSelectDay, ceOnShiftMonth);

Description

The TcxWebCalendarEvent type specifies the types of custom client-side events supported by the web calendar control.  These values are used to set the EventType property of the calendar control’s custom events, if any.

The following values are available in the TcxWebCalendarEvent type:

Value	Description
ceOnSelectDay	Fires when selecting a day within a web calendar.
ceOnShiftMonth	Fires when changing a month within a web calendar.


TcxWebCalendar
 TcxWebCalendar Object

Hierarchy          Properties          Methods          Events

Represents a calendar control.

Unit

cxWebCalendar

TcxWebCalendar = class(TcxCustomWebCalendar)

Description

Use the TcxWebCalendar control to place a calendar within your web page.  This control displays a monthly calendar providing a means of navigating through months and selecting individual dates.

The TcxWebCalendar control consists of three elements.  The top section is the header displaying month name and year.  The year is displayed only if the ShowYear property is set to True.  The header also contains buttons used to navigate through individual months.  The ShowMonthPictures property specifies whether these buttons are represented by images or text strings.

The middle section displays the days of the week.  The styles of these two headers are specified by the TitleStyle and DayHeaderStyle properties.

The bottom section of the control is represented by a calendar sheet of dates.  Dates can be selected by clicking the appropriate date within the calendar sheet.  The selected date can be also obtained and set at runtime via the SelectedDate property.  Calendar style is controlled via the Styles, SelectedStyle and OtherMonthDayStyle properties.

If you want the calendar control to display dataset field values, use the TcxWebDBCalendar instead.

The TcxWebCalendar control supports a set of custom events for client side processing.  These event types are specified by the TcxWebCalendarEvent type.


TcxWebCalendar Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxCustomWebCalendar


Properties for TcxWebCalendar
TcxWebCalendar Properties

TcxWebCalendar          Legend

Derived from TcxCustomWebCalendar

CellPadding

CellSpacing

DayHeaderAlignment

DayHeaderStyle

DayNameFormat

DaysOfWeekNames

FirstDayOfWeek

ForcePostBack

Height

Images

MonthNames

MonthNameFormat

NextMonthImageIndex

NextMonthText

OtherMonthDayStyle

PrevMonthImageIndex

PrevMonthText

SelectedDate

SelectedStyle

ShowMonthPictures

ShowTodayLink

ShowYear

TitleStyle

TodayPanelStyle

Width

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebCalendar
TcxWebCalendar Methods

TcxWebCalendar          Legend

Derived from TcxCustomWebCalendar

 Create

 DateToWebString

 Destroy

 DoSetValues

 RegisterActions

 RegisterRenderers

 RegisterValues

 ScriptsSubscription

 WebStringToDate

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterEvents

SetState

ValidateContainer


Events for TcxWebCalendar
TcxWebCalendar Events

TcxWebCalendar          Legend

Derived from TcxCustomWebCalendar

OnNextMonthSelect

OnPrevMonthSelect

OnSelectDay

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxCustomWebCalendar
TcxCustomWebCalendar Object

Hierarchy          Properties          Methods          Events

Serves as the base class for calendar controls.

Unit

cxWebCalendar

TcxCustomWebCalendar = class(TcxWebControl)

Description

Calendar sheets which are part of calendar controls are used to display dates.  These controls display a monthly calendar and enable you to navigate through months and select individual dates.

Calendar sheets consist of three elements.  The top section is the header displaying month name and year.  Year is displayed only if the ShowYear property is set to True.  This header also contains buttons used to navigate through individual months.  The ShowMonthPictures property specifies whether these buttons are represented by images or text strings.

The middle section displays the days of the week.  The styles of these two headers are specified by the TitleStyle and DayHeaderStyle properties.

The bottom section of the control displays dates.  Dates can be selected by clicking the appropriate date.  The selected date can be also obtained and set at runtime via the SelectedDate property.  Calendar style is controlled via the Styles, SelectedStyle and OtherMonthDayStyle properties.

The available descendant controls are: TcxWebCalendar, TcxWebDBCalendar, TcxWebDateEdit and TcxWebDBDateEdit.


TcxCustomWebCalendar Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl


Properties for TcxCustomWebCalendar
TcxCustomWebCalendar Properties

TcxCustomWebCalendar          Legend

In TcxCustomWebCalendar

CellPadding

CellSpacing

DayHeaderAlignment

DayHeaderStyle

DayNameFormat

DaysOfWeekNames

FirstDayOfWeek

ForcePostBack

Height

Images

MonthNames

MonthNameFormat

NextMonthImageIndex

NextMonthText

OtherMonthDayStyle

PrevMonthImageIndex

PrevMonthText

SelectedDate

SelectedStyle

ShowMonthPictures

ShowTodayLink

ShowYear

TitleStyle

TodayPanelStyle

Width

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxCustomWebCalendar
TcxCustomWebCalendar Methods

TcxCustomWebCalendar          Legend

In TcxCustomWebCalendar

 Create

 DateToWebString

 Destroy

 DoSetValues

 RegisterActions

 RegisterRenderers

 RegisterValues

 ScriptsSubscription

 WebStringToDate

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterEvents

SetState

ValidateContainer


Events for TcxCustomWebCalendar
TcxCustomWebCalendar Events

TcxCustomWebCalendar          Legend

In TcxCustomWebCalendar

OnNextMonthSelect

OnPrevMonthSelect

OnSelectDay

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxCustomWebCalendar.CellPadding

TcxCustomWebCalendar          See Also

Specifies the distance between cell borders and its data in pixels.

property CellPadding: Integer;

Description

The CellPadding property sets the distance between borders of table cells and the data contained in the cell.  The value of this property is set in pixels.  If the value of the CellPadding property is set to a non-negative integer, values (dates) in cells will be offset to the specified number of pixels from every border.  If the CellPadding property is set to a negative value, data in cells will not be offset from table borders.

You can also specify the distance between cells that display dates.  This is done using the CellSpacing property.


TcxCustomWebCalendar.CellSpacing

TcxCustomWebCalendar          See Also

Specifies the distance between cells containing dates.

property CellSpacing: Integer;

Description

The CellSpacing property sets the spacing between neighboring cells containing dates.  The value of this property is set in pixels.  If the value of the CellSpacing property is set to a non-negative integer, neighboring cells will be offset to the specified number of pixels from each other in every direction.  If the CellSpacing property is set to a negative value, neighboring cells will not be offset from each other.

You can also specify the distance between a cell’s borders and the data within them.  This is done using the CellPadding property.


TcxCustomWebCalendar.DayHeaderAlignment

TcxCustomWebCalendar          See Also

Specifies the alignment of weekday labels.

TcxWebHorzAlignment = (whalLeft, whalCenter, whalRight, whalJustify, whalChar); property DayHeaderAlignment: TcxWebHorzAlignment;

Description

Use the DayHeaderAlignment property to specify the alignment of weekday labels displayed within the calendar header.  These labels are arranged within a row of table cells, and the DayHeaderAlignment property specifies alignment of the text representing the day of the week within its cell.

You can also apply a custom style to the header displaying the days of the week.  This is done using the DayHeaderStyle property.

The default value of the DayHeaderAlignment property is whalRight.


TcxCustomWebCalendar.DayHeaderStyle

TcxCustomWebCalendar          See Also

Specifies the style of the header displaying the days of the week.

property DayHeaderStyle: TcxWebStyles;

Description

Use the DayHeaderStyle property to specify the style of the header used to display the days of the week.  You should use the TcxWebStyleController component to create and manage individual styles.  The modified style should be assigned to the Default property of the TcxWebStyles object representing the DayHeaderStyle property.  Values assigned to the Hover sub-property will not have any effect.


TcxCustomWebCalendar.DayNameFormat

TcxCustomWebCalendar          See Also

Specifies the format in which the days of the week are displayed.

TcxWebDayNameFormat = (dfFull, dfShort, dfFirstLetter, dfFirstTwoLetters);

property DayNameFormat: TcxWebDayNameFormat;

Description

The DayNameFormat property sets the format used to display the days of the week.  The days of the week are displayed within the header of the calendar control.  The following values are available for the DayNameFormat property.

Value	Description	Example
dfFull	Full day name is displayed.	Sunday
dfShort	Day name is displayed in short format.	Sun
dfFirstLetter	The first letter of the day is displayed.	S
dfFirstTwoLetters	First two letters of the day are displayed.	Su

Note: The days of the week are displayed with respect to local regional settings.

The default value of the DayNameFormat property is dfFull.


TcxCustomWebCalendar.DaysOfWeekNames

TcxCustomWebCalendar

Returns the name of the day by its index.

property DaysOfWeekNames[Index:Integer]: string;

Description

The DaysOfWeekNames property returns the name of the day by its index.  The index is specified via the Index parameter.  The first available index is 1, which corresponds to Saturday.  Day names are returned in the format specified by the DayNameFormat property value.

Note: The days of the week that are returned will depend on local regional settings, which are read from the web server.

ReadOnly Property


TcxCustomWebCalendar.FirstDayOfWeek

TcxCustomWebCalendar

Specifies the day of week represented in the leftmost column of the calendar.

property FirstDayOfWeek: TcxFirstDayOfWeek;

Description

You can change the day displayed in the leftmost column of the calendar control.  Use the FirstDayOfWeek property for this purpose.  The following values are available for this property:

Value	Description
dowSunday	Sunday.
dowMonday	Monday.
dowTuesday	Tuesday.
dowWednesday	Wednesday.
dowThursday	Thursday.
dowFriday	Friday.
dowSaturday	Saturday.
dowLocaleDefault	The first day of week specified by the regional settings of the web server.


TcxCustomWebCalendar.ForcePostBack

TcxCustomWebCalendar

Specifies whether post back is required when a date is selected.

property ForcePostBack: Boolean;

Description

Use the ForcePostBack property to set or to get a value specifying whether post back is required when a date is selected.  Setting this property to True will cause a web page to reload each time a date is selected. This avoids the need to write an OnSelectDay event handler.  Use the ForcePostBack property instead of the event if reloading a page is enough to get up-to-date context.

The default value of the ForcePostBack property is False.


TcxCustomWebCalendar.Height

TcxCustomWebCalendar

Specifies the height of the calendar sheet.

property Height: Integer;

Description

Use the Height property to specify the vertical size of the calendar sheet.  The value of this property is set in pixels. The height of the sheet cannot be less than that required to display all of its contents as rendered in applied style.


TcxCustomWebCalendar.Images

TcxCustomWebCalendar          See Also

Specifies the source images used by the calendar control.

property Images: TcxWebImageList;

Description

The TcxWebCalendar control allows you to set custom images for buttons used to navigate through months.  The Images property specifies the source images used for this purpose.  You should use the TcxWebImageList component to create a collection of images and set the value of the Images property accordingly.  The NextMonthImageIndex and PrevMonthImageIndex properties can then be used to assign images to buttons used for navigating through months.

Note that any image is displayed only if the ShowMonthPictures property is set to True (default arrow images are shown if certain of the aforementioned properties are set incorrectly).  Otherwise the strings specified by the NextMonthText and PrevMonthText are displayed instead of the images.


TcxCustomWebCalendar.MonthNames

TcxCustomWebCalendar

Returns the name of the month by its index.

property MonthesNames[Index:Integer]: string;

Description

The MonthesNames property returns the name of the month by its index.  The index is specified using the Index parameter.  The first available index is 1, and corresponds to January. Month names are returned in the format specified by the MonthNameFormat property value.

Note: Month names are returned with reference to local regional settings.

ReadOnly Property


TcxCustomWebCalendar.MonthNameFormat

TcxCustomWebCalendar          See Also

Specifies format in which month names are displayed.

TcxWebMonthNameFormat = (mfFull, mfShort);

property MonthNameFormat: TcxWebMonthNameFormat;

Description

Use the MonthNameFormat property to set the format of the names of the months displayed.  Month names are displayed within the header of the calendar control.  The following values are available for the MonthNameFormat property:

Value	Description	Example
mfFull	Full names of months are displayed.	December
mfShort	Short names of months are displayed.	Dec

Note: Month names are displayed with reference to local regional settings, read from the web server.

The default value of the MonthNameFormat property is mfFull.


TcxCustomWebCalendar.NextMonthImageIndex

TcxCustomWebCalendar          See Also

Specifies the image displayed on the button used to navigate forward through individual months.

property NextMonthImageIndex: Integer;

Description

Calendar controls allow you to set custom images for the buttons used to navigate through months.  The Images property specifies the source images used for this purpose.  You should use the TcxWebImageList component to create a collection of images that provide values for the Images property.

The NextMonthImageIndex property specifies the image displayed on the button used to navigate forward through individual months.  The image is set via its index in the image list set using the Images property. The PrevMonthImageIndex property is used to assign an image for the button that is used to navigate backward through individual months.

Note that the specified image (if any) is displayed only if the ShowMonthPictures property is set to True (if some of the abovementioned properties are set incorrectly, default arrow images are displayed).  In all other cases the strings specified by the NextMonthText and PrevMonthText are displayed instead of the images.

The default value of the NextMonthImageIndex property is -1.


TcxCustomWebCalendar.NextMonthText

TcxCustomWebCalendar          See Also

Specifies the text displayed on the button used to navigate forward through individual months.

property NextMonthText: string;

Description

Special buttons within the calendar controls provide a way of navigating through months via special buttons.  These buttons can be represented either by text strings or images.  Use the ShowMonthPictures property to specify whether buttons text strings or images.  If this property is set to False, the buttons display text strings specified via the NextMonthText and PrevMonthText properties.  If these properties are empty strings, ‘greater than’ and ‘less than’ characters appear on the buttons instead.

If the ShowMonthPictures property is set to True, images are displayed on navigation buttons.  Use the Images, PrevMonthImageIndex and NextMonthImageIndex properties to specify these images.  If some of these properties are set incorrectly, default arrow images are displayed instead.


TcxCustomWebCalendar.OtherMonthDayStyle

TcxCustomWebCalendar

Specifies the date style for dates that do not belong to the current month.

property OtherMonthDayStyle: TcxWebStyles;

Description

A calendar sheet displays dates for one month at a time.  However, dates from the previous and the next month can also be displayed within the container. Specify the style of these day numbers via the OtherMonthDayStyle property.

You should use the TcxWebStyleController component in order to create and modify individual styles.  The adjusted style should be assigned to the Default property of the TcxWebStyles object representing the OtherMonthDayStyle property.  Assigning values to the Hover sub-property will have no effect.

Note also that the background color of such dates is specified by the style applied using the Styles property.


TcxCustomWebCalendar.PrevMonthImageIndex

TcxCustomWebCalendar          See Also

Specifies the image displayed on the button used to navigate backward through individual months.

property PrevMonthImageIndex: Integer;

Description

Calendar controls allow you to set custom images for buttons used to navigate through months.  The Images property specifies the source images used for this purpose.  You should use the TcxWebImageList component to create a collection of images and set the value of the Images property.

The PrevMonthImageIndex property specifies the image displayed for the button used to navigate backward through individual months.  The image is set via its index in the image list represented by the Images property.

The NextMonthImageIndex property assigns an image to the button used to navigate through months forward.

Note that the specified pictures (if any) are displayed only if the ShowMonthPictures property is set to True (if some of the related properties are set incorrectly, default arrow images are displayed).  In all other cases the strings specified by NextMonthText and PrevMonthText are displayed instead of the images.

The default value of the PrevMonthImageIndex property is -1.


TcxCustomWebCalendar.PrevMonthText

TcxCustomWebCalendar          See Also

Specifies the text displayed on the button used to navigate back through individual months.

property PrevMonthText: string;

Description

Special buttons within the calendar controls provide a way of navigating through months.  Use the ShowMonthPictures property to specify whether text strings or images are displayed on the buttons.  If this property is set to False, the buttons display text strings specified via the NextMonthText and PrevMonthText properties.  If these properties are set to empty strings, ‘greater than’ and ‘less than’ characters appear on the buttons.

If the ShowMonthPictures property is set to True, images are displayed on the navigation buttons.  Use the Images, PrevMonthImageIndex and NextMonthImageIndex properties to specify these images.  If some of the aforementioned properties are set incorrectly, default arrow images are displayed instead.


TcxCustomWebCalendar.SelectedDate

TcxCustomWebCalendar

Specifies the selected date.

property SelectedDate: TcxWebDate;

Description

Use the SelectedDate property to set or to obtain the selected date.  Setting the value of this property results in scrolling to the proper month and selecting the specified date.


TcxCustomWebCalendar.SelectedStyle

TcxCustomWebCalendar

Specifies the style of the selected date.

property SelectedStyle: TcxWebStyles;

Description

Use the SelectedStyle property to specify the style of the selected date.  You should use the TcxWebStyleController component to create and modify individual styles.  The modified style should be assigned to the Default property of the TcxWebStyles object representing the SelectedStyle property.  Assigning values to the Hover sub-property is not in effect.

ReadOnly Property


TcxCustomWebCalendar.ShowMonthPictures

TcxCustomWebCalendar          See Also

Specifies whether the buttons used for selecting individual months display text strings or images.

property ShowMonthPictures: Boolean;

Description

Special buttons within the calendar controls provide a way of navigating through months.  The ShowMonthPictures property specifies whether text strings or images are displayed on these buttons.  If this property is set to False, buttons are represented by text strings specified via the NextMonthText and PrevMonthText properties.  If no text is specified, ‘greater than’ and ‘less than’ characters are used instead.

If the ShowMonthPictures property is set to True, images are displayed on the navigation buttons.  Use the Images, PrevMonthImageIndex and NextMonthImageIndex properties to specify these images.  If some of the aforementioned properties are set incorrectly, default arrow images are displayed instead.


TcxCustomWebCalendar.ShowTodayLink

TcxCustomWebCalendar          See Also

Specifies whether a Today button is displayed.

property ShowTodayLink: Boolean;

Description

Use the ShowTodayLink property to specify whether the Today button is displayed in the Today panel situated at the bottom of the calendar.  This button is used to navigate directly to the current date within the calendar.  If this property is set to True, both the Today panel and Today link are displayed within the calendar.

You can specify the style of the Today panel by setting the TodayPanelStyle property.


TcxCustomWebCalendar.ShowYear

TcxCustomWebCalendar

Specifies whether the year is displayed.

property ShowYear: Boolean;

Description

Use the ShowYear property to specify whether the year is displayed within the header of the calendar.  If this property is set to True, the number of the year is displayed directly after the month.


TcxCustomWebCalendar.TitleStyle

TcxCustomWebCalendar

Specifies the style of the calendar header that displays the name of the month and the navigation buttons.

property TitleStyle: TcxWebStyles;

Description

Use the TitleStyle property to specify the style of the calendar header displaying the month name.  You should use the TcxWebStyleController component to create and modify individual styles.  The modified style should be assigned to the Default property of the TcxWebStyles object representing the TitleStyle property.  Assigning values to the Hover sub-property is not in effect.


TcxCustomWebCalendar.TodayPanelStyle

TcxCustomWebCalendar          See Also

Specifies the style of the calendar’s Today panel displaying the Today navigation button.

property TitleStyle: TcxWebStyles;

Description

Use the TodayPanelStyle property to specify the style of the calendar’s panel displaying the Today button.  This panel is situated at the bottom of the calendar.

You should use the TcxWebStyleController component in order to create and manage individual styles.  The modified style should be assigned to the Default property of the TcxWebStyles object representing the TodayPanelStyle property.  Assigning values to the Hover sub-property is not in effect.


TcxCustomWebCalendar.Width

TcxCustomWebCalendar

Specifies the width of the calendar control.

property Width: Integer;

Description

Use the Width property to specify the horizontal size of the calendar control.  The value of this property is set in pixels. The width of the calendar cannot be less than that required to display its contents completely with respect to applied styles.


TcxCustomWebCalendar.Create

TcxCustomWebCalendar          See Also

Creates an instance of the TcxCustomWebCalendar class.

procedure Create(AOwner: TComponent); override;

Description

The Create method is used to create a new TcxCustomWebCalendar object.  The AOwner parameter specifies the owner of the created control (the page module, to which it belongs).  After calling the inherited constructor, the Create method sets the properties to their default values.

Do not create instances of the TcxCustomWebCalendar class, but instantiate one of its descendants instead.  The available descendants are the TcxWebCalendar and TcxWebDBCalendar controls.


TcxCustomWebCalendar.DateToWebString

TcxCustomWebCalendar

Converts dates to string values.

function DateToWebString(ADate: TcxWebDate): string;

Description

The DateToWebString method is used to convert dates to string values.  The date to be converted is specified by the ADate parameter.


TcxCustomWebCalendar.Destroy

TcxCustomWebCalendar

Destroys the TcxCustomWebCalendar object.

procedure Destroy; override;

Description

The Destroy method disposes of the TcxCustomWebCalendar object and releases any memory allocated to the object.  Do not use this method to destroy an object, but use the Free method instead.


TcxCustomWebCalendar.DoSetValues

TcxCustomWebCalendar          See Also

Updates the calendar control with respect to the changes made by the end user.

procedure DoSetValues; override;

Description

The request stores the date selected by the end user.  This information is then used to update the SelectedDate property.  This is performed by the DoSetValues method.

This method implements the DoSetValues method of the IcxWebValues interface.


TcxCustomWebCalendar.RegisterActions

TcxCustomWebCalendar          See Also

Registers action handlers for the calendar control.

procedure RegisterActions; override;

Description

The RegisterActions method registers handlers for actions associated with the OnNextMonthSelect, OnPrevMonthSelect and OnSelectDay events.  The default action is associated with the OnSelectDay event.

This method overrides the RegisterActions method of the TcxWebComponent class.


TcxCustomWebCalendar.RegisterRenderers

TcxCustomWebCalendar          See Also

Registers renderer classes that generate HTML code representing the calendar control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers two specific renderer classes designed to render HTML code for the calendar control.  The browser types for which the registered renderers are designed are Internet Explorer and Netscape Navigator 4.0 browsers.  The renderer class designed for the Internet Explorer browser is the default.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for a calendar control. This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxCustomWebCalendar.RegisterValues

TcxCustomWebCalendar          See Also

Registers HTML elements, which contain data related to the control.

procedure RegisterValues; override;

Description

The RegisterValues method is used to register HTML elements, which contain data related to the web calendar control.  It registers the INPUT tag containing the selected date value.  This is necessary to determine the selected date after end-user manipulations.  The DoSetValues method implements the update of the SelectedDate property.

This method implements the RegisterValues method of the IcxWebValues interface.  It can be overridden in descendant classes to register other or additional HTML elements, which values are required for proper functioning of the control.


TcxCustomWebCalendar.ScriptsSubscription

TcxCustomWebCalendar          See Also

Subscribes the control to the client scripts which are required for its proper functioning.

procedure ScriptsSubscription; override;

Description

The ScriptSubscription method is used to subscribe the web calendar control to a post back script.

This method implements the ScriptsSubscription method of the IcxWebScripts interface.  It can be overridden in descendant classes to subscribe a derived control to additional or other scripts.


TcxCustomWebCalendar.WebStringToDate

TcxCustomWebCalendar

Converts string values to dates.

function WebStringToDate(AString: string): TcxWebDate;

Description

The WebStringToDate method is used to convert string values to dates.  The string to be converted is specified by the AString parameter.


TcxCustomWebCalendar.OnNextMonthSelect

TcxCustomWebCalendar          See Also

Fires when navigating to the next month.

type

  TcxChangeMonthEvent = procedure(Sender: TObject; AMonth: Word) of object;

property OnNextMonthSelect: TcxChangeMonthEvent;

Description

Write an OnNextMonthSelect event handler to perform specific actions each time the end user navigates to the next month.  The Sender parameter specifies the sender of the event.  The AMonth parameter specifies the index of the month to which a user is navigating.  Months are indexed from 1 (January) to 12 (December).

Write an OnPrevMonthSelect event handler to perform specific actions each time the end user navigates to the previous month.


TcxCustomWebCalendar.OnPrevMonthSelect

TcxCustomWebCalendar          See Also

Fires when navigating to the previous month.

type

  TcxChangeMonthEvent = procedure(Sender: TObject; AMonth: Word) of object;

property OnPrevMonthSelect: TcxChangeMonthEvent;

Description

Write an OnPrevMonthSelect event handler to perform specific actions each time the end user navigates to the previous month.  The Sender parameter specifies the sender of the event.  The AMonth parameter specifies the index of the month to which a user is navigating.  Months are indexed from 1 (January) to 12 (December).

Write an OnNextMonthSelect event handler to perform specific actions each time the end user navigates to the next month.


TcxCustomWebCalendar.OnSelectDay

TcxCustomWebCalendar

Fires when the end user selects a date.

type

  TcxSelectDayEvent = procedure(Sender: TObject; ADate: TDate) of object;

property OnSelectDay: TcxSelectDayEvent;

Description

Write an OnSelectDay event handler to perform specific actions each time the end user selects a date.  The Sender parameter specifies the sender of the event.  The ADate parameter specifies the selected date.


TcxChangeMonthEvent
TcxChangeMonthEvent type

Specifies the type of events firing whilst the end user navigates through months.

Unit

cxWebCalendar

TcxChangeMonthEvent = procedure(Sender: TObject; AMonth: Word) of object;

Description

The TcxChangeMonthEvent type is the type of event which fires when the end user navigates through months.  It represents the type of OnNextMonthSelect and OnPrevMonthSelect events for calendar controls.  The Sender parameter specifies the sender of the event.  The AMonth parameter specifies the index of the month to which a user is navigating.


TcxSelectDayEvent
TcxSelectDayEvent type

Specifies the type of event requiring date as a parameter.

Unit

cxWebCalendar

TcxSelectDayEvent = procedure(Sender: TObject; ADate: TDate) of object;

Description

The TcxSelectDayEvent specifies the type of event which requires a date as a parameter.  It serves as a type for the OnSelectDay event of calendar controls.  The Sender parameter specifies the sender of the event.  The ADate parameter specifies the selected date.


TcxWebDayNameFormat
TcxWebDayNameFormat type

Contains values specifying the format used for displaying the days of the week.

Unit

cxWebCalendar

TcxWebDayNameFormat = (dfFull, dfShort, dfFirstLetter, dfFirstTwoLetters);

Description

The TcxWebDayNameFormat type specifies the format used for displaying day names.  These values are used to set the value of the DayNameFormat property of calendar controls.

The following values are available in the TcxWebDayNameFormat type:

Value	Description	Example
dfFull	Full day name is displayed.	Sunday
dfShort	Day name is displayed in short format.	Sun
dfFirstLetter	The first letter of the day name is displayed.	S
dfFirstTwoLetters	First two letters of the day name are displayed.	Su


TcxWebMonthNameFormat
TcxWebMonthNameFormat type

Contains values specifying format used for displaying names of the month.

Unit

cxWebCalendar

TcxWebMonthNameFormat = (mfFull, mfShort);

Description

The TcxWebMonthNameFormat type specifies the format used for displaying names of the month.  These values are used to set the MonthNameFormat property of calendar controls.

The following values are available in the TcxWebMonthNameFormat type:

Value	Description	Example
mfFull	Full names of months are displayed.	December
mfShort	Short names of months are displayed.	Dec


TcxWebDate
TcxWebDate type

Represents the date type used by EWF controls to store date values.

Unit

cxWebCalendar

TcxWebDate = TDateTime;

Description

The TcxWebDate type represents the type of date values in EWF controls.  For instance, it represents the type of calendar controls’ SelectedDate property.


TcxFirstDayOfWeek
TcxFirstDayOfWeek type

Contains values representing the days of the week.

Unit

cxWebCalendar

TcxFirstDayOfWeek = (dowSunday, dowMonday, dowTuesday, dowWednesday, dowThursday, dowFriday, dowSaturday, dowLocaleDefault);

Description

The TcxFirstDayOfWeek type lists values specifying the day of week displayed in the leftmost column of calendar controls.  These values are used to set the FirstDayOfWeek property of such controls.  The following values are available:

Value	Description
dowSunday	Sunday.
dowMonday	Monday.
dowTuesday	Tuesday.
dowWednesday	Wednesday.
dowThursday	Thursday.
dowFriday	Friday.
dowSaturday	Saturday.
dowLocaleDefault	The first day of week specified by the regional settings of the web server.


cxWebIntfImpl Unit Overview
cxWebIntfImpl Unit

Classes

TcxCustomWebContainerControlHelper

Routines

IsWebTabOrderable


TcxCustomWebContainerControlHelper
TcxCustomWebContainerControlHelper Object

Hierarchy          Properties          Methods

Represents a base class for objects which help containers manage their children.

Unit

cxWebIntfImpl

TcxCustomWebContainerControlHelper = class(TObject)

Description

The TcxCustomWebContainerControlHelper class implements all the necessary methods and properties to maintain and manage children of a container component.  Additionally the TcxCustomWebContainerControlHelper class implements the delegated IcxWebContainerControl interface supported by the TcxWebContainerControl and TcxCustomWebPageModule classes.

The TcxWebContainerControl class delegates this interface implementation to the WebContainterControlHelper property which represents the TcxWebContainerControlHelper class - a direct descendant of the TcxCustomWebContainerControlHelper class.

The TcxCustomWebPageModule class delegates the implementation of the IcxWebContainerControl interface to the TcxWebPageModuleContainerHelper object via the ContainerControlHelper property.  In turn, the TcxWebPageModuleContainerHelper class is another direct TcxCustomWebContainerControlHelper class descendant.


TcxCustomWebContainerControlHelper Hierarchy
Hierarchy

TObject


Properties for TcxCustomWebContainerControlHelper
TcxCustomWebContainerControlHelper Properties

TcxCustomWebContainerControlHelper          Legend

In TcxCustomWebContainerControlHelper

ControlContainerCount

ControlContainers

ControlCount

Controls

Owner

Parent


Methods for TcxCustomWebContainerControlHelper
TcxCustomWebContainerControlHelper Methods

TcxCustomWebContainerControlHelper          Legend

In TcxCustomWebContainerControlHelper

CanAcceptsControls

ContainsControl

Create

Destroy

FixupTabList

GetClientLeft

GetClientTop

GetControl

GetControlContainer

GetControlContainerCount

GetControlCount

GetParent

GetTabOrderList

IndexOf

InsertControl

RemoveControl

SetTabOrderList

TabOrderOf

UpdateControlsPosition

UpdateTabOrder

WebPageModule


TcxCustomWebContainerControlHelper.ControlContainerCount

TcxCustomWebContainerControlHelper          See Also

Returns the number of child container controls.

property ControlContainerCount: Integer;

Description

The ControlContainerCount property is used to obtain the number of child container controls.  Indexed access to child containers is provided via the ControlContainers property.

The ControlContainerCount property implements the ControlContainerCount property declared by the IcxWebContainerControl interface.  Since interfaces have no fields, the value of the ControlContainerCount property is returned by the GetControlContainerCount method.  This method is also implemented by the GetControlContainerCount method of the TcxCustomWebContainerControlHelper class.

ReadOnly Property


TcxCustomWebContainerControlHelper.ControlContainers

TcxCustomWebContainerControlHelper          See Also

Provides indexed access to the first-level child container controls.

property ControlContainers[Index:Integer]: IcxWebContainerControl;

Description

The ControlContainers property is used to obtain a reference to the IcxWebContainerControl interface implemented by the specified child container control.  Child container control is specified by its index via the Index parameter.  Control indexing is zero-based.  The number of child container controls can be obtained via the ControlContainerCount property.

The ControlContainers property implements the ControlContainers property declared by the IcxWebContainerControl interface.  In order to provide correct functioning of the ControlContainers property, the TcxCustomWebContainerControlHelper class has a GetControlContainer method which implements the corresponding GetControlContainer method declared by the IcxWebContainerControl interface as well.

ReadOnly Property


TcxCustomWebContainerControlHelper.ControlCount

TcxCustomWebContainerControlHelper          See Also

Returns the number of child controls.

property ControlCount: Integer;

Description

The ControlCount property is used to obtain the number of child controls.  These controls can either be containers or not.  Indexed access to all the child controls is provided via the Controls property.

The ControlCount property implements the ControlCount property declared by the IcxWebContainerControl interface.  In order to provide correct functioning of the ControlCount property, the TcxCustomWebContainerControlHelper class declares the GetControlCount method which implements the corresponding GetControlCount method declared by the IcxWebContainerControl interface as well.

ReadOnly Property


TcxCustomWebContainerControlHelper.Controls

TcxCustomWebContainerControlHelper          See Also

Provides indexed access to all the first-level child controls.

property Controls[Index:Integer]: IcxWebControl;

Description

The Controls property is used to obtain a reference to the IcxWebControl interface implemented by the specified child control.  Child control is specified by its index via the Index parameter.  Control indexing is zero-based.  The total number of child controls can be obtained via the ControlCount property.

The Controls property implements the Controls property declared by the IcxWebContainerControl interface.  In order to provide correct functioning of the Controls property, the TcxCustomWebContainerControlHelper class declares the GetControl method which implements the corresponding GetControl method declared by the IcxWebContainerControl interface.

ReadOnly Property


TcxCustomWebContainerControlHelper.Owner

TcxCustomWebContainerControlHelper          See Also

Returns the owner of the helper object.

property Owner: TComponent;

Description

The Owner property is used to identify the owner of the container helper object. The owner of the object is determined by the parameter passed to the Create constructor when the component is created.

ReadOnly Property


TcxCustomWebContainerControlHelper.Parent

TcxCustomWebContainerControlHelper          See Also

Returns the parent of the container control.

property Parent: IcxWebContainerControl;

Description

Use the Parent property to obtain a reference to the IcxWebContainerControl interface implemented by the parent control.  The parent of a control is always a windowed control that visually contains the control, and is responsible for writing the control to a stream when the form is saved.

The Parent property implements the Parent property declared by the IcxWebContainerControl interface.  In order to provide correct functioning of the Parent property, the TcxCustomWebContainerControlHelper class declares the GetParent method which implements the corresponding GetParent method declared by the IcxWebContainerControl interface.

ReadOnly Property


TcxCustomWebContainerControlHelper.CanAcceptsControls

TcxCustomWebContainerControlHelper          See Also

Returns a value indicating whether the container control can accept child controls.

function CanAcceptsControls: Boolean; virtual;

Description

The CanAcceptControls method is designed to determine whether the container can accept child controls at present moment.  As implemented in the TcxCustomWebContainerControlHelper class, the CanAcceptControls method simply returns True.  The descendant TcxWebContainerControlHelper class overrides this method to verify whether a control becomes the parent of the controls dropped on it at design time.

The CanAcceptsControls method implements the CanAcceptsControls method declared by the IcxWebContainerControl interface.


TcxCustomWebContainerControlHelper.ContainsControl

TcxCustomWebContainerControlHelper          See Also

Returns a value indicating whether the container contains a specified control.

function ContainsControl(const AControl: IcxWebControl): Boolean;

Description

The ContainsControl method is used to indicate whether the specified control is the child of the container control.  The tested control is specified by a reference to the implemented IcxWebControl interface via the AControl parameter.

The ContainsControl method returns True, if the specified control appears within the child list (of any level).  Otherwise this method returns False. The ContainsControl method implements the ContainsControl method declared by the IcxWebContainerControl interface.


TcxCustomWebContainerControlHelper.Create

TcxCustomWebContainerControlHelper          See Also

Creates an instance of the TcxCustomWebContainerControlHelper object.

constructor Create(AOwner: TComponent); virtual;

Description

The Create method is used to create an instance of the TcxCustomWebContainerControlHelper object and initialize the Owner, ControlContainers and Controls properties. Do not create instances of the TcxCustomWebContainerControlHelper object.  It is instantiated automatically by an appropriate container control object when this object is created.

The AOwner parameter specifies the container control which owns the helper object.


TcxCustomWebContainerControlHelper.Destroy

TcxCustomWebContainerControlHelper          See Also

Destroys the TcxCustomWebContainerControlHelper object.

destructor Destroy; override;

Description

The Destroy method is used to destroy an instance of the TcxCustomWebContainerControlHelper object and release any allocated memory.  Before calling the inherited destructor, the Destroy method frees all the controls referenced by the Controls property.


TcxCustomWebContainerControlHelper.FixupTabList

TcxCustomWebContainerControlHelper          See Also

Sorts child controls by their tab order.

procedure FixupTabList;

Description

Do not call the FixupTabList method directly.  It is called by the ReadState method (of the TcxWebContainerControl or TcxCustomWebPageModule class) to initialize tab order list based on the TabOrder properties of the child controls being read from a stream.


TcxCustomWebContainerControlHelper.GetClientLeft

TcxCustomWebContainerControlHelper          See Also

Returns the left coordinate of the container’s client area.

function GetClientLeft: Integer; virtual;

Description

The GetClientLeft method returns an integer value that specifies the left coordinate of the container’s client area relative to the container control’s bounds.  In other words, the value returned by the GetClientLeft method represents the horizontal offset between the container control’s left bound and the left bound of its client area.

As implemented in the TcxCustomWebContainerControlHelper class the GetClientLeft method simply returns 0.  The TcxWebPanelHelper class overrides this method to return an appropriate value for the left coordinate of the web panel’s client area.

The GetClientLeft method implements the GetClientLeft method declared by the IcxWebContainerControl interface.


TcxCustomWebContainerControlHelper.GetClientTop

TcxCustomWebContainerControlHelper          See Also

Returns the top coordinate of the container’s client area.

function GetClientTop: Integer; virtual;

Description

The GetClientTop method returns an integer value that specifies the top coordinate of the container’s client area relative to the container control’s bounds.  In other words, the value returned by the GetClientTop method represents the vertical offset between the container control’s top bound and the top bound of its client area.

As implemented in the TcxCustomWebContainerControlHelper class, the GetClientTop method simply returns 0.  The TcxWebPanelHelper class overrides this method to return an appropriate value for the top coordinate of the web panel’s client area.

The GetClientTop method implements the GetClientTop method declared by the IcxWebContainerControl interface.


TcxCustomWebContainerControlHelper.GetControl

TcxCustomWebContainerControlHelper          See Also

Returns the value of the Controls property.

function GetControl(Index: Integer): IcxWebControl;

Description

The GetControl method is used as the ‘read’ specifier for the Controls property.  It performs indexed access to the contained controls.  The index of the accessed item is specified by the Index parameter.  Note, that indexing is zero-based.

The GetControl method implements the GetControl method declared by the IcxWebContainerControl interface.


TcxCustomWebContainerControlHelper.GetControlContainer

TcxCustomWebContainerControlHelper          See Also

Returns the value of the ControlContainers property.

function GetControlContainer(Index: Integer): IcxWebContainerControl;

Description

The GetControlContainer method is used as the ‘read’ specifier for the ControlContainers property.  This method performs indexed access to the contained containers.  The index of the accessed item is specified by the Index parameter.  Note, that indexing is zero-based.

The GetControlContainer method implements the GetControlContainer method declared by the IcxWebContainerControl interface.


TcxCustomWebContainerControlHelper.GetControlContainerCount

TcxCustomWebContainerControlHelper          See Also

Returns the value of the ControlContainerCount property.

function GetControlContainerCount: Integer;

Description

The GetControlContainerCount method is used as the ‘read’ specifier for the ControlContainerCount property.  This method returns the number of child containers.  In other words, it returns the number of items within the ControlContainers collection.

The GetControlContainerCount method implements the GetControlContainerCount method declared by the IcxWebContainerControl interface.


TcxCustomWebContainerControlHelper.GetControlCount

TcxCustomWebContainerControlHelper          See Also

Returns the value of the ControlCount property.

function GetControlCount: Integer;

Description

The GetControlCount method is used as the ‘read’ specifier for the ControlCount property.  This method returns the number of child controls.  In other words, it returns the number of items within the Controls collection.

The GetControlCount method implements the GetControlCount method declared by the IcxWebContainerControl interface.


TcxCustomWebContainerControlHelper.GetParent

TcxCustomWebContainerControlHelper          See Also

Returns the value of the Parent property.

function GetParent: IcxWebContainerControl;

Description

The GetParent method is used as the ‘read’ specifier for the Parent property.  This method returns a reference to the IcxWebContainerControl interface implemented by the parent control.

The GetParent method implements the GetParent method declared by the IcxWebContainerControl interface.


TcxCustomWebContainerControlHelper.GetTabOrderList

TcxCustomWebContainerControlHelper          See Also

Copies a list of child controls sorted by their tab order to the specified list.

procedure GetTabOrderList(const AList: TList);

Description

The GetTabOrderList method copies an internal list of child controls sorted by their tab order to a TList object specified by the AList parameter.

The GetTabOrderList method implements the GetTabOrderList method declared by the IcxWebContainerControl interface.


TcxCustomWebContainerControlHelper.IndexOf

TcxCustomWebContainerControlHelper

Returns the index of the specified control within the Controls collection.

function IndexOf(const AControl: IcxWebControl): Integer;

Description

The IndexOf method is used to determine the index of the specified control in the Controls collection.  The control is specified by the reference to the implemented IcxWebControl interface.  It is transmitted via the AControl parameter.  This method returns -1 if the specified control is not in the list.

The IndexOf method implements the IndexOf method declared by the IcxWebContainerControl interface.


TcxCustomWebContainerControlHelper.InsertControl

TcxCustomWebContainerControlHelper          See Also

Adds the specified control to the child controls collection.

procedure InsertControl(const AControl: IInterface);

Description

The InsertControl method is used to add the specified control to the collection of child controls.  The control to add is specified by the AControl parameter.

Note:  If the added control is a container, it is added to both the Controls and ControlContainers collections.  Otherwise, it is added to the Controls collection only.

The InsertControl method implements the InsertControl method declared by the IcxWebContainerControl interface.


TcxCustomWebContainerControlHelper.RemoveControl

TcxCustomWebContainerControlHelper          See Also

Removes the specified control from the child controls collection.

procedure RemoveControl(const AControl: IInterface);

Description

The RemoveControl method is used to delete the specified control from the child controls collection.  The control to be removed is specified by the AControl parameter.

Note:  If the deleted control is a container, it should be removed from both the Controls and ControlContainers collection.  Otherwise, it should be removed from the Controls collection only.

The RemoveControl method implements the RemoveControl method declared by the IcxWebContainerControl interface.


TcxCustomWebContainerControlHelper.SetTabOrderList

TcxCustomWebContainerControlHelper          See Also

Builds a list of child controls sorted by their tab orders.

procedure SetTabOrderList(const AList: TList);

Description

The GetTabOrderList method constructs an internal list of child controls sorted by tab orders based on the AList parameter.

The GetTabOrderList method implements the GetTabOrderList method declared by the IcxWebContainerControl interface.


TcxCustomWebContainerControlHelper.TabOrderOf

TcxCustomWebContainerControlHelper

Returns the tab order value of the specified child control.

function TabOrderOf(const AControl: IcxWebControl): Integer;

Description

The TabOrderOf method is used to return the tab order position of the specified child control.  The control is specified by the reference to the implemented IcxWebControl interface via the AControl parameter.

The TabOrderOf method implements the TabOrderOf method declared by the IcxWebContainerControl interface.


TcxCustomWebContainerControlHelper.UpdateControlsPosition

TcxCustomWebContainerControlHelper

Updates positions of controls referenced by the Controls collection.

procedure UpdateControlsPosition;

Description

The UpdateControlsPosition method is used to update positions of controls referenced by the Controls collection when the PositioningType property of the parent page module is set to cxptGrid.  The UpdateControlsPosition method updates position of web controls so that they do not overlap.  This method is normally used when a control changes its visibility state or after it has been resized.

The UpdateControlsPosition method implements the UpdateControlsPosition method declared by the IcxWebContainerControl interface.


TcxCustomWebContainerControlHelper.UpdateTabOrder

TcxCustomWebContainerControlHelper

Changes tab order index of the specified child control.

procedure UpdateTabOrder(ACurIndex, ANewIndex: TcxWebTabOrder);

Description

The UpdateTabOrder method is used to change tab order index of a particular web control.  The control is specified by its previous tab order via the ACurIndex parameter.  The new tab order of the web control is specified by the ANewIndex parameter.

When the ANewIndex parameter value is negative, it is automatically set to 0.  When the ANewIndex parameter value is more than the last available tab order value, it is automatically set to the highest possible index.  The control whose tab order is equal to ANewIndex, receives the tab index equal to the ACurIndex parameter value.

The UpdateTabOrder method implements the UpdateTabOrder method declared by the IcxWebContainerControl interface.


TcxCustomWebContainerControlHelper.WebPageModule

TcxCustomWebContainerControlHelper          See Also

Returns a reference to the IcxWebPageModule interface implemented by the parent page module.

function WebPageModule: IcxWebPageModule;

Description

The WebPageModule method is used to provide access to the methods of the IcxWebPageModule interface implemented by the parent page module.  The parent page module represents a top-level container object.


IsWebTabOrderable
IsWebTabOrderable Routines

Checks whether the specified control supports the IcxWebTabOrderable and IcxWebControl interfaces.

Unit

cxWebIntfImpl

Overloaded Variants

function IsWebTabOrderable(const AControl: TObject): Boolean;

function IsWebTabOrderable(const AControl: IInterface): Boolean;

Description

The IsWebTabOrderable function returns the value that indicates whether the specified control supports the IcxWebTabOrderable and IcxWebControl interfaces.

The IsWebTabOrderable function returns True if a specified control is not nil and supports the IcxWebTabOrderable and IcxWebControl interfaces.  Otherwise this function returns False.


TcxWebColumn
TcxWebColumn Object

Hierarchy          Properties          Methods          Events          See Also

Serves as the base class object representing grid columns.

Unit

cxWebGrids

TcxWebColumn = class(TComponent, IcxWebValues)

Description

The TcxWebColumn class is used as the base class from which the TcxWebDBColumn class is derived.  The TcxWebDBColumn class represents a column used by the TcxWebDBGrid control.  Columns are used to display and edit the values of dataset fields.  Each column is bound to a field of the dataset, to which the owning grid control is bound.

The TcxWebColumn class introduces a number of properties and methods which implement the basic functionality of a web grid column.  The TcxWebColumn class implements a IcxWebValues interface which allows you to track changes implemented to a column by an end user.

Do not create instances of the TcxWebColumn class in your application.  Use the Add or CreateDefaultColumns methods of the TcxWebDBGrid control to create TcxWebDBColumn objects.


TcxWebColumn Hierarchy
Hierarchy

TComponent


Properties for TcxWebColumn
TcxWebColumn Properties

TcxWebColumn          Legend

In TcxWebColumn

Alignment

AlternatingStyles

CellTexts

CheckedValue

ColumnHelper

EditedValue

FieldIndex

GroupingIndex

Index

MinWidth

PopupMenu

PossibleValues

ReadOnly

SortingOrder

Styles

Title

VAlignment

ViewType

Visible

WebGrid

WebValuesHelper

Width


Methods for TcxWebColumn
TcxWebColumn Methods

TcxWebColumn          Legend

In TcxWebColumn

Assign

CanSetValues

Create

CreateColumnHelper

DesignerUpdate

Destroy

DoSetValues

GetCellText

GetColumnHelper

GetFieldIndex

GetGridColumnStyles

GetWebGrid

GetWebValuesHelper

RegisterValues

SetWebGrid

WriteCellHTML


Events for TcxWebColumn
TcxWebColumn Events

TcxWebColumn          Legend

In TcxWebColumn

 OnGetHref

 OnGetText

 OnLoadImage


TcxWebColumn.Alignment

TcxWebColumn          See Also

Controls the horizontal alignment of text within a column.

type

  TcxWebHorzAlignment = (whalLeft, whalCenter, whalRight, whalJustify, whalChar);

property Alignment: TcxWebHorzAlignment;

Description

Use the Alignment property to specify the horizontal placement of text within the grid’s column.  The following values can be used to set the value for this property:

Value	Description
whalLeft	Text is left-aligned within the column.
whalCenter	Text is centered within the column.
whalRight	Text is right-aligned within the column.
whalJustify	Text is justified within the column.
whalChar	Text is aligned around a specific character.

The default value for the Alignment property is whalCenter.


TcxWebColumn.AlternatingStyles

TcxWebColumn

Specifies the style for column cells belonging to even rows.

property AlternatingStyles: TcxWebStyles;

Description

Use the AlternatingStyles property to access the TcxWebStyles object that contains style settings for column cells residing in even rows.  Assign the desired style to the Default property of this object.  This object’s Hover property, provided to specify the hover style of cells, has no effect.

You should use the TcxWebStyleController component to create and manage individual styles.


TcxWebColumn.CellTexts

TcxWebColumn

Returns the text representation of a specified column cell’s value.

property CellTexts[ARowIndex:Integer]: string;

Description

The CellTexts property is used to obtain the text that should be displayed within the specified cell.  The cell is specified by its row index via the ARowIndex parameter.

ReadOnly Property


TcxWebColumn.CheckedValue

TcxWebColumn          See Also

Specifies the value corresponding to the checked state if the column uses check boxes to display and edit its values.

property CheckedValue: string;

Description

Columns can use check boxes to display and edit their values (the ViewType property is set to cvtCheck).  You can bind these check boxes not just to Boolean fields.  When a column is bound to a non-Boolean field, you can use the CheckedValue property to specify the value of the field, which corresponds to the checked state of check boxes displayed by the column.

If the field value is equal to the value of the CheckedValue property, a check box representing this field value within the column is displayed checked.  Otherwise, the check box is unchecked.


TcxWebColumn.ColumnHelper

TcxWebColumn          See Also

Provides access to the object implementing type-specific functionality for a column.

property ColumnHelper: TcxWebColumnHelper;

Description

The ColumnHelper property is used to represent an object to which the column delegates the functionality of retrieving cell values and cell rendering.  There are a number of TcxWebColumnHelper descendants specifically designed for different column types.

The value for the ColumnHelper property is returned by the GetColumnHelper method which, if necessary, creates a helper object for an appropriate type for the column.  The type of the column is specified by the ViewType property.

ReadOnly Property


TcxWebColumn.EditedValue

TcxWebColumn          See Also

Returns the value of the column cell edited by a user on the client side.

property EditedValue: Variant;

Description

The EditedValue property returns the value of the column cell which was edited by a user at the client side of a web application.  When sending a request message to the server, this value is written into a specific hidden input.  At the server side this value is read from the request field and assigned to the EditedValue property.

ReadOnly Property


TcxWebColumn.FieldIndex

TcxWebColumn          See Also

Represents the index of the field to which the column is bound

property FieldIndex: Integer;

Description

Use the FieldIndex property to obtain the index of the field to which the column is bound.  This value is used to compose client-side script when rendering a web grid control which contains the column.

The FieldIndex property value is returned by the GetFieldIndex method.

ReadOnly Property


TcxWebColumn.GroupingIndex

TcxWebColumn

Returns the grouping level of a column.

property GroupingIndex: Integer;

Description

The grid control allows you to group its associated dataset by several column values at a time.  The GroupingIndex property specifies the index of a column in the list of grouped columns.  In other words, it is used to obtain the level of grouping performed by values of the column.  Grouping levels are zero-based indexed.  Thus the GroupingIndex property of a column, by whose values the first-level grouping is performed, is 0.  If no grouping is performed, the GroupingIndex property is –1.

ReadOnly Property


TcxWebColumn.Index

TcxWebColumn

Determines the index of the column within the web grid’s list of columns.

property Index: Integer;

Description

The Index property determines the index of the column in the Columns collection of the web grid control to which the column belongs.  The index of the first column in the grid is 0.  You can set the Index property at design or run time to change the current column position within the grid.

The total number of columns within the grid control can be obtained via the ColumnCount property of the TcxWebDBGrid object.  The Index property cannot be set to a value less than 0 or greater than the owning grid’s ColumnCount property value.


TcxWebColumn.MinWidth

TcxWebColumn          See Also

Specifies the minimum column width.

property MinWidth: Integer;

Description

Use the MinWidth property to specify the minimum width of the column.  The column width specified via the Width property cannot be set to a value less than the MinWidth property value.

The default value of the MinWidth property is 150.


TcxWebColumn.PopupMenu

TcxWebColumn

Specifies the popup menu component associated with the column.

property PopupMenu: TcxWebPopupMenu;

Description

Assign a value to the PopupMenu property to make a popup menu appear when the mouse cursor is over the column.  Note, that setting the PopupMenu property does not affect the column header.  The grid control has a HeaderPopupMenu property specially designed to bind a popup menu component to the grid’s column headers.

Use the TcxWebPopupMenu component to set the value of the PopupMenu property.


TcxWebColumn.PossibleValues

TcxWebColumn          See Also

Specifies the possible values of column cells when the grid column uses a list editor to set values for its cells.

property PossibleValues: TStrings;

Description

Columns can use list editors to edit their cell values (the ViewType property is set to cvtList).  In such an instance, you can use the PossibleValues property to specify a list of possible values from which the user can select a desired item.


TcxWebColumn.ReadOnly

TcxWebColumn

Specifies whether a user can edit the contents of the column.

property ReadOnly: Boolean;

Description

Use the ReadOnly property to avoid data modification within the column.  If the ReadOnly property is True, column data cannot be changed by an end user.  Set the ReadOnly property value to False to provide users with the ability to modify column data.

The default value for the ReadOnly property is false.


TcxWebColumn.SortingOrder

TcxWebColumn

Returns the sort order of a column.

type

  TcxWebGridSortMode = (smNone, smAscending, smDescending);

property SortingOrder: TcxWebGridSortMode;

Description

Data within the grid control can be sorted by values of one or more columns.  Use the SortingOrder property to obtain the sort order performed by values of the column.

The following table contains the possible values for the SortingOrder property.

Value	Description
smNone	Either sorting is not applied to the column or a grid is not bound to a dataset.
smAscending	The column is sorted in ascending order.
smDescending	The column is sorted in descending order.

ReadOnly Property


TcxWebColumn.Styles

TcxWebColumn          See Also

Specifies column style.

property Styles: TcxWebStyles;

Description

Use the Styles property to change the default and hover styles of column cells.

You should use the TcxWebStyleController component in order to create and manage individual styles.  The adjusted styles should be assigned to the Default or Hover property of the TcxWebStyles object representing the Styles property.

The style assigned to the Hover sub-property is applied to a single column’s cell, which is under the mouse cursor, but not to the entire column.


TcxWebColumn.Title

TcxWebColumn

Specifies the caption of the column.

property Title: string;

Description

The Title property specifies the text that is displayed within the column header.  Use the Title property to label the data that appears within the column.


TcxWebColumn.VAlignment

TcxWebColumn          See Also

Specifies the vertical alignment of text within column cells.

type

  TcxWebVertAlignment = (wvalTop, wvalCenter, wvalBottom, wvalBaseLine);

property VAlignment: TcxWebVertAlignment;

Description

Use the VAlignment property to specify how text and other content is vertically aligned within column cells.

The possible values for the VAlignment property are the following.

Value	Meaning
wvalTop	Text is aligned at the top of column cells.
wvalCenter	Text is aligned at the center of column cells.
wvalBottom	Text is aligned at the bottom of column cells.
wvalBaseLine	Text base is aligned with the baseline of column cells.


TcxWebColumn.ViewType

TcxWebColumn

Specifies the manner in which column values are displayed and edited.

type

  TcxWebColumnViewType = (cvtText, cvtHyperText, cvtImage, cvtList, cvtLookup, cvtCheck);

property ViewType: TcxWebColumnViewType;

Description

Use the ViewType property to control the manner in which column values are displayed and edited.  The ViewType property helps to display and modify data for different types of column cells.

The following table represents available view types for the column.

Value	Description
cvtText	Column data is displayed as plain text and edited by the standard text editor.
cvtHyperText	Column data is displayed as hypertext and edited by the standard text editor.
cvtImage	Column data is represented by images in both browse and edit modes.
cvtList	Column data is displayed as plain text and edited by the list editor.  Use the PossibleValues property to specify the set of values accessible in the list editor.
cvtLookup	Column data is edited by a lookup editor (has effect for grid columns only).  The ListSource, KeyFieldName and ListFieldName properties of the TcxWebGridColumnDataBinding object must be specified.  This object can be obtained via the grid column’s DataBinding property.
cvtCheck	Column data is represented by check boxes in both browse and edit modes.  Use the CheckedValue property to specify the string corresponding to the checked state of checked boxes.  This property is used only if the column is bound to a non-Boolean field.
Note: There are two incompatible view types: cvtImage and cvtText.  You will get conversion error if you try to assign cvtText/cvtHyperText/cvtList/cvtCheck/cvtLookup to a column which is bound to a field which contains an image and vice versa.

The default value of the ViewType property is cvtText.


TcxWebColumn.Visible

TcxWebColumn          See Also

Specifies whether the column is visible.

property Visible: Boolean;

Description

Use the Visible property to control the visibility of the column.  If the Visible property is set to False, a column is hidden.  Change the Visible property of a hidden column to True to display the column.

The default value of the Visible property is True.


TcxWebColumn.WebGrid

TcxWebColumn          See Also

Provides access to the owning grid control.

property WebGrid: TcxCustomWebGrid;

Description

Use the WebGrid property to access the web grid control that owns the column.  This property is of type TcxCustomWebGrid which is a direct ancestor of the web grid control (the TcxWebDBGrid class).


TcxWebColumn.WebValuesHelper

TcxWebColumn          See Also

Returns an object implementing the functionality of the column concerning maintaining values.

property WebValuesHelper: TcxWebValuesHelper;

Description

The TcxWebColumn class delegates the maintenance of values to the TcxWebValuesHelper object.  This object is retrieved via the WebValuesHelper property, which implements the IcxWebValues interface.

Your users can change certain values displayed by EWF components (for instance, a user can enter another value within a grid column cell).  EWF technology implements a technique to update the values of a component’s properties in order for it not to lose such value changes.

Each component overrides the RegisterValues method of the TcxWebComponent class.  If you are designing your own component you should do this as well.  This method should call the RegisterValue method of the TcxWebValuesHelper class (WebValuesHelper property) for each HTML element comprising the control whose value must be maintained.  Once the request arrives to the server script, the registered values are retrieved from it and the component properties are adjusted.

ReadOnly Property


TcxWebColumn.Width

TcxWebColumn          See Also

Specifies column width in pixels.

property Width: Integer;

Description

Use the Width property to specify the horizontal size of the column.  The value for this property is set in pixels.

The width of the column cannot be less than the value specified by the MinWidth property.


TcxWebColumn.Assign

TcxWebColumn          See Also

Assigns the contents of one TcxWebColumn object to another.

procedure Assign(Source: TPersistent); override;

Description

Use the Assign method in order to assign the value of the Styles property of one TcxWebColumn object to another.  The Source parameter specifies the source object.  The caller of the method is the destination object.


TcxWebColumn.CanSetValues

TcxWebColumn          See Also

Returns a value determining whether the column’s EditedValue property can be updated with the values received from the client.

function CanSetValue: Boolean; virtual;

Description

This method implements the CanSetValues method of the IcxWebValues interface.  It is used to determine whether the changes performed by a user can be (and should be) applied to the column.  For instance, if a user has changed the value of a column’s cell, this value is transmitted within the request and assigned to the EditedValue property of the column.  If the CanSetValues method of a column returns False, the value of the column’s EditedValue property isn’t updated.  This method is used to avoid data changes when a column doesn’t need to save changes for certain reasons or to avoid extra processing if a user cannot change data.

The CanSetValues method of the TcxWebColumn class calls the CanGetValue method of the corresponding column helper object (a TcxWebColumnHelper class descendant).


TcxWebColumn.Create

TcxWebColumn          See Also

Creates an instance of the TcxWebColumn class.

constructor Create(AOwner: TComponent); override;

Description

The Create method is used to create an instance of the TcxWebColumn object.  After calling the inherited constructor, the Create method sets properties to their default values.

The AOwner parameter specifies the component that is responsible for streaming and freeing the generated column (normally, it is the grid’s owner – a web page module).

Do not create instances of the TcxWebColumn class in application.  Use the Add or CreateDefaultColumns methods of the TcxWebDBGrid control to create TcxWebDBColumn objects.


TcxWebColumn.CreateColumnHelper

TcxWebColumn          See Also

Creates a specified type of column helper object.

function CreateColumnHelper(HelperClass: TcxWebColumnHelperClass): TcxWebColumnHelper;

Description

The CreateColumnHelper method creates the specified helper object for the column.  Web grid columns can be of different view types as specified via the ViewType property.  Each type of column delegates its type-specific functionality to specially designed helper objects.  The CreateColumnHelper method is used by the GetColumnHelper method to create a helper object whose type is specified via the HelperClass parameter.


TcxWebColumn.DesignerUpdate

TcxWebColumn          See Also

Updates designer contents.

procedure DesignerUpdate(TheAll: Boolean);

Description

The DesignerUpdate method is used to force the grid designer to update a specific column or all grid columns.  If the TheAll parameter is True, the designer updates all grid columns.  Otherwise, only the column represented by the caller object will be updated.


TcxWebColumn.Destroy

TcxWebColumn          See Also

Destroys the TcxWebColumn object.

destructor Destroy; override;

Description

The Destroy method is used to destroy an instance of the TcxWebColumn object and release any allocated memory.  Before calling the inherited destructor, the Destroy method frees its properties.  After calling the inherited destructor, the Destroy method calls the AdjustBounds method of the owner web grid control.  This allows the grid control to update itself when column layout change.


TcxWebColumn.GetCellText

TcxWebColumn          See Also

Returns the value of the CellTexts property.

function GetCellText(ARowIndex: Integer): string; virtual;

Description

The GetCellText method is used to return the string representation of a specified column cell’s value.  The cell is specified by its row index via the ARowIndex parameter.  The return value for this method is ordinarily displayed within a cell.

As implemented in the TcxWebColumn class, the GetCellText method calls the GetCellText method of the corresponding column helper object.


TcxWebColumn.GetColumnHelper

TcxWebColumn          See Also

Returns the value of the ColumnHelper property.

function GetColumnHelper: TcxWebColumnHelper; virtual;

Description

The GetColumnHelper method is used to return an object to which a column delegates the cell value retrieval and cell rendering.

There are a number of TcxWebColumnHelper descendants specifically designed for different column types.

If the ColumnHelper property is not assigned, the GetColumnHelper method calls the CreateColumnHelper method to create a column helper object of a type specified by the ViewType property of the column.


TcxWebColumn.GetFieldIndex

TcxWebColumn          See Also

Returns the value of the FieldIndex property.

function GetFieldIndex: Integer; virtual;

Description

The GetFieldIndex method is used to return the index of the field to which the column is bound.  This value is used to compose the client-side script when rendering a web grid control that contains a column.

As implemented in the TcxWebColumn class, the GetFieldIndex method simply returns –1.  The descendant TcxWebDBColumn class overrides this method to return a proper value.


TcxWebColumn.GetGridColumnStyles

TcxWebColumn          See Also

Returns column style.

function GetGridColumnStyles: TcxWebStyles;

Description

The GetGridColumnStyles method returns the TcxWebStyles object which specifies the column’s style.  If a column has its own styles assigned via the Styles property, the GetGridColumnStyles method returns the value of this property.  If the style is not assigned for the column, the GetGridColumnStyles method returns the style of the owning grid.  The style of the TcxWebDBGrid control is specified via its Styles property.

Note: Use the TcxWebStyleController component in order to create and manage individual styles.


TcxWebColumn.GetWebGrid

TcxWebColumn          See Also

Returns the value of the WebGrid property.

function GetWebGrid: TcxCustomWebGrid; virtual;

Description

The GetWebGrid method is used to return a web grid control to which the column belongs.  The return value of the GetWebGrid method is of type TcxCustomWebGrid.  This class is the direct ancestor of the TcxWebDBGrid control.


TcxWebColumn.GetWebValuesHelper

TcxWebColumn          See Also

Returns an object to which the column delegates value maintenance functionality.

function GetWebValuesHelper: TcxWebValuesHelper; virtual;

Description

If the WebValuesHelper property is not assigned, the GetWebValuesHelper method creates an instance of the TcxWebValuesHelper object.


TcxWebColumn.DoSetValues

TcxWebColumn          See Also

Updates the column with respect to changes made by an end user.

procedure DoSetValues; virtual;

Description

This method implements the DoSetValues method of the IcxWebValues interface.  It is used to set a specific value arrived within a request to the column’s EditedValue property.  The value arrived within a request for the column object is a value for the column’s cell edited by a user at the client side.  Assigning this value to the column’s EditedValue property is the last step in the process designed sot that you do not lose changes made by a user at the client side.  Please refer to the IcxWebValues interface description for a complete description of this process.


TcxWebColumn.RegisterValues

TcxWebColumn          See Also

Registers the HTML elements which contain data related to a column.

procedure RegisterValues; virtual;

Description

The RegisterValues method is used to register the hidden input containing information about a column cell value which was edited by a user at the client side of the web application.  This is needed to determine the edited value after end-user manipulations.  The DoSetValues method implements the update of the EditedValue property.

This method implements the RegisterValues method of the IcxWebValues interface.  It can be overridden in descendant classes to register other HTML elements whose values are required for proper functionality.


TcxWebColumn.SetWebGrid

TcxWebColumn          See Also

Sets the WebGrid property value.

procedure SetWebGrid(Value: TcxCustomWebGrid); virtual;

Description

The SetWebGrid method is used to set the WebGrid property value to a value specified by the Value parameter.


TcxWebColumn.WriteCellHTML

TcxWebColumn          See Also

Generates the HTML code representing a specific column cell.

procedure WriteCellHTML(HTMLTextBuilder: TcxHTMLTextBuilder; ARowIndex: Integer; IsEditing: Boolean); virtual;

Description

The WriteCellHTML method is used to render the specified column’s cell.  The cell is specified by its row index via the ARowIndex parameter.

The HTMLTextBuilder parameter represents a TcxHTMLTextBuilder object which provides a number of methods in order to render HTML code.  The rendered code is written to the internal buffer of this object.

The IsEditing parameter indicates whether the specified column cell is edited by a user.

As implemented in the TcxWebColumn class, the WriteCellHTML method simply calls the WriteCellHTML method of the corresponding column helper object specified by the ColumnHelper property.


TcxWebColumn.OnGetHref

TcxWebColumn          See Also

Fires for hyperlink column cells in order to obtain it’s the referenced URL.

type

  TcxGetURLEvent = procedure(Sender: TObject; ARowIndex: Integer; URL: TcxURL) of object;

property OnGetHref: TcxGetURLEvent;

Description

Write an OnGetHref event to specify URLs for hyperlink column cells.  The event fires for each column cell if the ViewType property is set to cvtHyperText.

The Sender parameter specifies the event sender.  The ARowIndex parameter stores the current cell’s row index.  URLs must be assigned to the URL parameter.

The URL parameter is represented by the TcxURL object.  The Href property of this object contains the current cell’s value, if its column is bound to a dataset field.  Otherwise, it contains an empty string.


TcxWebColumn.OnGetText

TcxWebColumn          See Also

Fires for cells of a specific column in order to obtain their text.

type

  TcxGetTextEvent = procedure(Sender: TObject; ARowIndex: Integer; var Text: string) of object;

property OnGetText: TcxGetTextEvent;

Description

Write an OnGetText event handler to specify custom text for column cells.  The event fires for each column cell.

The Sender parameter specifies the event sender.  The ARowIndex parameter contains the current cell’s row index.  Custom text must be assigned to the Text parameter.

If your column is bound to a dataset field, the Text parameter returns the current cell’s value.  Otherwise, it contains an empty string.


TcxWebColumn.OnLoadImage

TcxWebColumn          See Also

Fires when determining the type of the images displayed within a column.

type

  TcxLoadImageEvent = procedure(Sender: TObject; var GraphicClass: TGraphicClass) of object;

property OnLoadImage: TcxLoadImageEvent;

Description

Write an OnLoadImage event handler to specify the type of the images to be displayed within a column.  This is only necessary if the column displays pictures, which are not bitmaps.  Set the ViewType property to cvtImage to display images within this column.

The Sender parameter specifies the event sender.  The appropriate TGraphic descendant class must be assigned to the GraphicClass parameter.  For instance, if your column is to display JPEG images, you should assign the TJPEGImage class to this parameter.


TcxWebColumnHelper
TcxWebColumnHelper Object

Hierarchy          Properties          Methods          See Also

Serves as the base class for objects implementing type-specific functionality for columns.

Unit

cxWebGrids

TcxWebColumnHelper = class(TObject)

Description

The TcxWebColumnHelper is a base class from which different types of column helpers are derived.  Generally, a grid column uses a column helper object to set the column’s EditedValue property (its value is retrieved form the request message) and to render a specific column cell based upon column type.

A TcxWebDBGrid grid object can contain the following types of columns:

•	text column,

•	hypertext column,

•	check column,

•	list column,

•	image column.

A column type is specified by the column’s ViewType property.  Thus, each column type needs to have a specially designed corresponding helper object (a TcxWebColumnHelper descendant).

The TcxWebColumnHelper class introduces the main properties and methods which implement the basic functionality of column helper objects.  Descendants override some of these methods to perform necessary actions.


TcxWebColumnHelper Hierarchy
Hierarchy

TObject


Properties for TcxWebColumnHelper
TcxWebColumnHelper Properties

TcxWebColumnHelper          Legend

In TcxWebColumnHelper

Column

WebGrid


Methods for TcxWebColumnHelper
TcxWebColumnHelper Methods

TcxWebColumnHelper          Legend

In TcxWebColumnHelper

CanGetValue

Create

GetCellText

GetValue

WriteCellHTML


TcxWebColumnHelper.Column

TcxWebColumnHelper          See Also

Returns the column owning the helper object.

property Column: TcxWebColumn;

Description

The Column property is used to gain access to a grid column that owns the helper object.  So you can use the Column property to obtain a column whose functionality the helper object partially implements.

ReadOnly Property


TcxWebColumnHelper.WebGrid

TcxWebColumnHelper          See Also

Returns the grid control that contains the column owning the helper object.

property WebGrid: TcxCustomWebGrid;

Description

The WebGrid property is used to gain access to the grid control owning the associated column.

ReadOnly Property


TcxWebColumnHelper.CanGetValue

TcxWebColumnHelper          See Also

Indicates whether a value can be assigned to the EditedValue property of the corresponding column.

function CanGetValue: Boolean; virtual;

Description

The CanGetValue method is used to return a value that indicates whether the EditedValue property of the corresponding column can be set to a value retrieved form the request message.  The EditedValue property contains the value of a column cell that was edited by a user at the client side of the application.

As implemented in the TcxWebColumnHelper class, the CanGetValue method returns True if the corresponding column is visible and not in read-only mode.  Visible should be set to True and ReadOnly should be set to False for this purpose.  Descendant classes can override this method to introduce additional conditions which should be met in order to set a value edited by a user to the EditedValue property.


TcxWebColumnHelper.WriteCellHTML

TcxWebColumnHelper          See Also

Generates the HTML code representing a specified cell within the corresponding column.

procedure WriteCellHTML(HTMLTextBuilder: TcxHTMLTextBuilder; ARowIndex: Integer; IsEditing: Boolean); virtual;

Description

The WriteCellHTML method is used to render the specified column’s cell.  The cell is specified by its row index via the ARowIndex parameter.

The HTMLTextBuilder parameter represents a TcxHTMLTextBuilder object which provides a number of methods in order to render HTML code.  The rendered code is written to the internal buffer of this object.

The IsEditing parameter indicates whether the specified column cell is edited by a user.

As implemented in the TcxWebColumnHelper class, the WriteCellHTML method simply renders the display text of the cell.

Descendant classes override this method to render the specified cell as their needs dictate.


TcxWebColumnHelper.GetCellText

TcxWebColumnHelper          See Also

Returns the text that should be displayed within the specified cell.

function GetCellText(ARowIndex: Integer): string; virtual;

Description

The GetCellText method is used to return the string representation of the specified column cell’s value.  The cell is specified by its row index via the ARowIndex parameter.  The return value for this method is generally displayed within a cell.

As implemented in the TcxWebColumnHelper class, the GetCellText method uses the GetRowDisplayText method of the corresponding grid control to perform its tasks.

Descendant classes can override the GetCellText method to return a proper display value for the cell.  For instance, the GetCellText method of the TcxWebImageColumnHelper object simply returns the ‘[IMAGE]’ string value.


TcxWebColumnHelper.Create

TcxWebColumnHelper

Creates an instance of a column helper object.

constructor Create(AColumn: TcxWebColumn);

Description

The Create method is used to create a new instance of the TcxWebColumnHelper class (and descendants unless overridden).  Do not use the Create method directly, it is automatically called by the CreateColumnHelper method of the corresponding column.

The AColumn parameter specifies the column for which the helper object is created.  The value of the parameter is assigned to the Column property.


TcxWebColumnHelper.GetValue

TcxWebColumnHelper          See Also

Designed to return a specific registered value retrieved from the request.

function GetValue: Variant; virtual;

Description

The GetValue method is designed to return a specific value that should be used to set the EditedValue property of the corresponding column.

After a user has modified the value of a column cell, the new cell’s value is written into a specific hidden input.  When the server receives the request message, this value is retrieved from the request fields into the Values property of the specially designed TcxWebValuesHelper object.  The GetValue method in turn is designed to obtain this value from the values helper object.  Finally, the corresponding grid column uses a value returned by the GetValue method to set the EditedValue property.

As implemented in the TcxWebColumnHelper class, the GetValue method simply returns a varNull value.  Descendant classes override this method to retrieve the necessary value depending on their types.


TcxWebCheckColumnHelper
TcxWebCheckColumnHelper Object

Hierarchy          Properties          Methods          See Also

Represents a helper object for columns using check boxes to display and edit their values.

Unit

cxWebGrids

TcxWebCheckColumnHelper = class(TcxWebColumnHelper)

Description

The TcxWebCheckColumnHelper class represents a specially designed helper object for grid columns whose ViewType property is set to cvtCheck.  As the direct descendant of the TcxWebColumnHelper class, the TcxWebCheckColumnHelper class inherits all its properties and methods.


TcxWebCheckColumnHelper Hierarchy
Hierarchy

TObject

     |

TcxWebColumnHelper


Properties for TcxWebCheckColumnHelper
TcxWebCheckColumnHelper Properties

TcxWebCheckColumnHelper          Legend

Derived from TcxWebColumnHelper

Column

WebGrid


Methods for TcxWebCheckColumnHelper
TcxWebCheckColumnHelper Methods

TcxWebCheckColumnHelper          Legend

In TcxWebCheckColumnHelper

WriteCellHTML

GetValue

Derived from TcxWebColumnHelper

CanGetValue

Create

GetCellText


TcxWebCheckColumnHelper.WriteCellHTML

TcxWebCheckColumnHelper          See Also

Generates the HTML code representing the specified cell within the corresponding column.

procedure WriteCellHTML(HTMLTextBuilder: TcxHTMLTextBuilder; ARowIndex: Integer; IsEditing: Boolean); override;

Description

The WriteCellHTML method is used to render a specified column’s cell.  The cell is specified by its row index via the ARowIndex parameter.

The HTMLTextBuilder parameter represents a TcxHTMLTextBuilder object which provides a number of methods in order to render HTML code.  The rendered code is written to the internal buffer of this object.

The IsEditing parameter indicates whether the specified column cell is edited by a user.

The WriteCellHTML method of the TcxWebCheckColumnHelper class overrides the WriteCellHTML method of the TcxWebColumnHelper class.  This is done in order to render a specific column’s cell as an HTML INPUT tag of type checkbox.  In this case, if a value returned by the GetCellText method is equal to the value of the column’s CheckedValue property, a check box representing a cell is displayed as checked.  Otherwise, it is unchecked.


TcxWebCheckColumnHelper.GetValue

TcxWebCheckColumnHelper          See Also

Returns the value for the column’s EditedValue property.

function GetValue: Variant; override;

Description

The GetValue method returns the value that should be used to set the EditedValue property of the corresponding check column.

After a user has changed the state of a check box representing a column cell, the new cell’s value (namely 0 or 1) is written into a specific hidden input.  When the server receives the request message, this value is retrieved from the request fields into the Values property of the specially designed TcxWebValuesHelper object.  The GetValue method in turn is designed to obtain this value from the values helper object.  Finally, the corresponding grid column uses a value returned by the GetValue method to set the EditedValue property.


TcxWebHyperTextColumnHelper
TcxWebHyperTextColumnHelper Object

Hierarchy          Properties          Methods          See Also

Represents a helper object for columns using hyperlinks to display their values and a standard editor to edit them.

Unit

cxWebGrids

TcxWebHyperTextColumnHelper = class(TcxWebColumnHelper)

Description

The TcxWebHyperTextColumnHelper class represents a specially designed helper object for grid columns whose ViewType property is set to cvtHyperText.  As the direct descendant of the TcxWebColumnHelper class, the TcxWebCheckColumnHelper class inherits all its properties and methods.


TcxWebHyperTextColumnHelper Hierarchy
Hierarchy

TObject

     |

TcxWebColumnHelper


Properties for TcxWebHyperTextColumnHelper
TcxWebHyperTextColumnHelper Properties

TcxWebHyperTextColumnHelper          Legend

Derived from TcxWebColumnHelper

Column

WebGrid


Methods for TcxWebHyperTextColumnHelper
TcxWebHyperTextColumnHelper Methods

TcxWebHyperTextColumnHelper          Legend

In TcxWebHyperTextColumnHelper

CanGetValue

WriteCellHTML

Derived from TcxWebColumnHelper

Create

GetCellText

GetValue


TcxWebHyperTextColumnHelper.CanGetValue

TcxWebHyperTextColumnHelper          See Also

Indicates whether a value can be assigned to the EditedValue property of the corresponding column.

function CanGetValue: Boolean; override;

Description

The CanGetValue method is used to return a value indicating whether the EditedValue property of the corresponding column can be set to the value retrieved form the request message.  The EditedValue property of a column contains the value of the column cell that was edited by a user at the client side of the application.

As implemented in the TcxWebHyperTextColumnHelper class, the CanGetValue method simply returns True.


TcxWebHyperTextColumnHelper.WriteCellHTML

TcxWebHyperTextColumnHelper          See Also

Generates the HTML code representing a specified cell within the corresponding column.

procedure WriteCellHTML(HTMLTextBuilder: TcxHTMLTextBuilder; ARowIndex: Integer; IsEditing: Boolean); override;

Description

The WriteCellHTML method is used to render the specified column’s cell.  The cell is specified by its row index via the ARowIndex parameter.

The HTMLTextBuilder parameter represents a TcxHTMLTextBuilder object that provides a number of methods in order to render HTML code.  The rendered code is written to the internal buffer of this object.

The IsEditing parameter indicates whether the specified column cell is edited by a user.

The WriteCellHTML method of the TcxWebHyperTextColumnHelper class overrides the WriteCellHTML method of the TcxWebColumnHelper class in order to render the specified column’s cell in its own way.  When the cell is edited by a user (the IsEditing parameter is True) it is rendered as an HTML INPUT element of the text type.  If the cell is not edited, the WriteCellHTML method renders it as a hyperlink.


TcxWebImageColumnHelper
TcxWebImageColumnHelper Object

Hierarchy          Properties          Methods          See Also

Represents a helper object for columns using images to display and edit their values.

Unit

cxWebGrids

TcxWebImageColumnHelper = class(TcxWebColumnHelper)

Description

The TcxWebImageColumnHelper class represents a specially designed helper object for grid columns whose ViewType property is set to cvtImage.  As the direct descendant of the TcxWebColumnHelper class, the TcxWebImageColumnHelper class inherits all its properties and methods.


TcxWebImageColumnHelper Hierarchy
Hierarchy

TObject

     |

TcxWebColumnHelper


Properties for TcxWebImageColumnHelper
TcxWebImageColumnHelper Properties

TcxWebImageColumnHelper          Legend

Derived from TcxWebColumnHelper

Column

WebGrid


Methods for TcxWebImageColumnHelper
TcxWebImageColumnHelper Methods

TcxWebImageColumnHelper          Legend

In TcxWebImageColumnHelper

CanGetValue

GetCellText

WriteCellHTML

Derived from TcxWebColumnHelper

Create

GetValue


TcxWebImageColumnHelper.CanGetValue

TcxWebImageColumnHelper          See Also

Indicates whether a value can be assigned to the EditedValue property of the corresponding column.

function CanGetValue: Boolean; override;

Description

The CanGetValue method is used to return a value indicating whether the EditedValue property of the corresponding column can be set to the value retrieved form the request message.  The EditedValue property of a column contains the value of the column cell that was edited by a user at the client side of the application.

As implemented in the TcxWebImageColumnHelper class, the CanGetValue method simply returns False.


TcxWebImageColumnHelper.WriteCellHTML

TcxWebImageColumnHelper          See Also

Generates the HTML code representing the specified cell within the corresponding column.

procedure WriteCellHTML(HTMLTextBuilder: TcxHTMLTextBuilder; ARowIndex: Integer; IsEditing: Boolean); override;

Description

The WriteCellHTML method is used to render the specified column’s cell.  The cell is specified by its row index via the ARowIndex parameter.

The HTMLTextBuilder parameter represents a TcxHTMLTextBuilder object which provides a number of methods in order to render HTML code.  The rendered code is written to the internal buffer of this object.

The IsEditing parameter indicates whether the specified column cell is edited by a user.

The WriteCellHTML method of the TcxWebImageColumnHelper class overrides the WriteCellHTML method of the TcxWebColumnHelper class in order to render a specific column’s cell as an HTML INPUT element of the image type.


TcxWebImageColumnHelper.GetCellText

TcxWebImageColumnHelper          See Also

Returns the text that should be displayed within the specified cell.

function GetCellText(ARowIndex: Integer): string; override;

Description

The GetCellText method is used to return the string representation of the specified column cell’s value.  The cell is specified by its row index via the ARowIndex parameter.  The return value of this method is displayed within a cell.

The GetCellText method of the TcxWebImageColumnHelper object simply returns the ‘[IMAGE]’ string value.


TcxWebListColumnHelper
TcxWebListColumnHelper Object

Hierarchy          Properties          Methods          See Also

Represents a helper object for columns using plain text to display their values and a list editor to edit them.

Unit

cxWebGrids

TcxWebListColumnHelper = class(TcxWebColumnHelper)

Description

The TcxWebListColumnHelper class represents a specially designed helper object for grid columns whose ViewType property is set to cvtList.  As the direct descendant of the TcxWebColumnHelper class, the TcxWebListColumnHelper class inherits all its properties and methods.


TcxWebListColumnHelper Hierarchy
Hierarchy

TObject

     |

TcxWebColumnHelper


Properties for TcxWebListColumnHelper
TcxWebListColumnHelper Properties

TcxWebListColumnHelper          Legend

Derived from TcxWebColumnHelper

Column

WebGrid


Methods for TcxWebListColumnHelper
TcxWebListColumnHelper Methods

TcxWebListColumnHelper          Legend

In TcxWebListColumnHelper

GetValue

WriteCellHTML

Derived from TcxWebColumnHelper

CanGetValue

Create

GetCellText


TcxWebListColumnHelper.WriteCellHTML

TcxWebListColumnHelper          See Also

Generates the HTML code representing the specified cell within the corresponding column of the list.

procedure WriteCellHTML(HTMLTextBuilder: TcxHTMLTextBuilder; ARowIndex: Integer; IsEditing: Boolean); override;

Description

The WriteCellHTML method is used to render the specified column’s cell.  The cell is specified by its row index via the ARowIndex parameter.

The HTMLTextBuilder parameter represents a TcxHTMLTextBuilder object which provides a number of methods in order to render HTML code.  The rendered code is written to the internal buffer of this object.

The IsEditing parameter indicates whether the specified column cell is edited by a user.

The WriteCellHTML method of the TcxWebListColumnHelper class overrides the WriteCellHTML method of the TcxWebColumnHelper class in order to render a specific column’s cell in its own way.  When the cell is edited by a user (the IsEditing parameter is True) it is rendered as an HTML SELECT tag.  If the cell is not edited, the WriteCellHTML method renders it in plain text.


TcxWebListColumnHelper.GetValue

TcxWebListColumnHelper          See Also

Returns a value used to set the column’s EditedValue property.

function GetValue: Variant; override;

Description

The GetValue method returns a specific value that must be used to set the EditedValue property of the corresponding list column.

After a user has selected one of the possible values from a list box representing a column cell, the new cell’s value (namely index of the selected string form the PossibleValues strings list) is written into a specific hidden input.  When the server receives the request message, this value is retrieved from the request fields into the Values property of the specially designed TcxWebValuesHelper object.  The GetValue method in turn is designed to obtain this value from the values helper object.  Finally, the corresponding grid column uses a value returned by the GetValue method to set the EditedValue property.


TcxWebTextColumnHelper
TcxWebTextColumnHelper Object

Hierarchy          Properties          Methods          See Also

Represents a helper object for columns using plain text to display their values and standard editor to edit them.

Unit

cxWebGrids

TcxWebTextColumnHelper = class(TcxWebColumnHelper)

Description

The TcxWebTextColumnHelper class represents a specially designed helper object for grid columns whose ViewType property is set to cvtText.  As the direct descendant of the TcxWebColumnHelper class, the TcxWebTextColumnHelper class inherits all its properties and methods.


TcxWebTextColumnHelper Hierarchy
Hierarchy

TObject

     |

TcxWebColumnHelper


Properties for TcxWebTextColumnHelper
TcxWebTextColumnHelper Properties

TcxWebTextColumnHelper          Legend

Derived from TcxWebColumnHelper

Column

WebGrid


Methods for TcxWebTextColumnHelper
TcxWebTextColumnHelper Methods

TcxWebTextColumnHelper          Legend

In TcxWebTextColumnHelper

GetValue

WriteCellHTML

Derived from TcxWebColumnHelper

CanGetValue

Create

GetCellText


TcxWebTextColumnHelper.WriteCellHTML

TcxWebTextColumnHelper          See Also

Generates the HTML code representing the specified cell within the corresponding column.

procedure WriteCellHTML(HTMLTextBuilder: TcxHTMLTextBuilder; ARowIndex: Integer; IsEditing: Boolean); override;

Description

The WriteCellHTML method is used to render the specified column’s cell.  The cell is specified by its row index via the ARowIndex parameter.

The HTMLTextBuilder parameter represents a TcxHTMLTextBuilder object that provides a number of methods in order to render HTML code.  The rendered code is written to the internal buffer of this object.

The IsEditing parameter indicates whether the specified column cell is edited by a user.

The WriteCellHTML method of the TcxWebTextColumnHelper class overrides the WriteCellHTML method of the TcxWebColumnHelper class in order to render a specific column’s cell in its own way.  When the cell is edited by a user (the IsEditing parameter is True) it is rendered as a text type HTML INPUT element.  If the cell is not edited, the WriteCellHTML method renders it in plain text.


TcxWebTextColumnHelper.GetValue

TcxWebTextColumnHelper          See Also

Returns a value used to set the column’s EditedValue property.

function GetValue: Variant; override;

Description

The GetValue method returns a specific value that must be used to set the EditedValue property of the corresponding text column.

After a user has changed the value of a text editor representing a column cell, the new cell’s text value is written into a specific hidden input.  When the server receives the request message, this value is retrieved from the request fields into the Values property of the specially designed TcxWebValuesHelper object.  The GetValue method in turn is designed to obtain this value from the values helper object.  Finally, the corresponding grid column uses a value returned by the GetValue method to set the EditedValue property.


cxWebDBTable Unit Overview
cxWebDBTable Unit

Classes

TcxWebDBTable

TcxWebDBTableColumn

TcxWebDBTableColumns

TcxWebTableColumnDataBinding

TcxWebTableDataBinding


TcxWebDBTable
 TcxWebDBTable Object

Hierarchy          Properties          Methods          Events          See Also

Represents a data-aware table control.

Unit

cxWebDBTable

TcxWebDBTable = class(TcxCustomWebTable, IcxWebDataSourceSupport)

Description

Use the TcxWebDBTable control to place a data-aware table onto a web page.  This control allows you to display data from the associated data source within a table.  The control is bound to data by means of the DataBinding property.

Data displayed by the TcxWebDBTable control can be broken into a number of pages with a fixed size.  The control contains a paging panel, which allows an end user to navigate through individual pages.  The Paging property allows you to control the size of pages and the paging panel’s look & feel.

You should use the TcxWebDBGrid control to allow end users to edit data from the associated data source.  This control also provides more powerful data representation capabilities.  The advantage of the TcxWebDBTable control is that it produced less HTML code to represent it on a web page.

If you do not need the data-aware capabilities of the TcxWebDBTable control, use the TcxWebTable instead.  It has the same features except that it must be populated via events.


TcxWebDBTable Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxCustomWebTable


Properties for TcxWebDBTable
TcxWebDBTable Properties

TcxWebDBTable          Legend

In TcxWebDBTable

DataBinding

PageIndex

Derived from TcxCustomWebTable

AlternatingItemsStyles

BorderColor

BorderWidth

CellPadding

CellSpacing

Columns

HeaderStyles

ItemsStyles

MaximumWidth

Paging

PagingNumbersStyles

PagingStyles

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebDBTable
TcxWebDBTable Methods

TcxWebDBTable          Legend

In TcxWebDBTable

Create

DataSource

Destroy

GetDataBinding

Derived from TcxCustomWebTable

CreateColumns

DoAfterRender

DoBeforeRender

DoColumnClick

DoPagingClick

DoRowClick

GetAllowSorting

GetDisplayText

GetHRefValue

GetPageIndex

GetRecordCount

GetValue

RegisterActions

RegisterRenderers

ScriptsSubscription

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterEvents

RegisterValues

SetState

ValidateContainer


Events for TcxWebDBTable
TcxWebDBTable Events

TcxWebDBTable          Legend

In TcxWebDBTable

OnCellClick

OnGetDisplayText

OnGetHrefValue

OnGetValue

Derived from TcxCustomWebTable

OnBeforeWriteRow

OnEndWriteRow

OnGetPagingStatus

OnGetTitleHTML

OnGetBeforePagingHTML

OnGetAfterPagingHTML

OnLoadImage

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebDBTable.DataBinding

TcxWebDBTable          See Also

Binds the table control to a data source.

property DataBinding: TcxWebTableDataBinding;

Description

Use the DataBinding property to bind the table control to data provided by a data source component.  You should specify the DataSource property of the TcxWebTableDataBinding object for this purpose.  Use either the TcxStdWebDataSource, TcxWebDataSource or TcxWebDBDataSource component to set the value of the DataSource property.


TcxWebDBTable.PageIndex

TcxWebDBTable          See Also

Specifies the index of the page currently displayed by the table control.

property PageIndex: Integer;

Description

Use the PageIndex property to set or get the index of the page currently displayed by the control.  You can specify the number of records displayed within pages via the PagingSize property of the TcxWebTablePaging object.  This object can be accessed via the Paging property of the table control.

The total number of records displayed by the table control is the same as the number of records in the associated dataset.


TcxWebDBTable.Create

TcxWebDBTable          See Also

Creates an instance of the TcxWebDBTable class.

constructor Create(AOwner: TComponent); override;

Description

Use the Create method to create a data-aware web table control at runtime.  The AOwner parameter specifies the owner of the component (the page module).


TcxWebDBTable.DataSource

TcxWebDBTable          See Also

Returns the data source component to which the control is bound.

function DataSource: TcxCustomWebDataSource;

Description

The DataSource method is used to obtain direct access to the bound data source component.  It reads the DataSource property of the object represented by the DataBinding property to perform its tasks.


TcxWebDBTable.Destroy

TcxWebDBTable          See Also

Destroys the TcxWebDBTable control.

destructor Destroy; override;

Description

The Destroy method is used to dispose of the TcxWebDBTable control and free any allocated memory.  It frees the DataBinding property before calling the inherited destructor.

Do not use the Destroy method to remove the TcxWebDBTable control.  Use the Free method instead.


TcxWebDBTable.GetDataBinding

TcxWebDBTable          See Also

Returns the value of the DataBinding property.

function GetDataBinding: TcxWebTableDataBinding; virtual;

Description

The GetDataBinding method is used to obtain the DataBinding property value.  It creates a new TcxWebTableDataBinding object if the property has not yet been initialized.

Descendant classes can override the GetDataBinding method to return a proper TcxWebTableDataBinding descendant.


TcxWebDBTable.OnCellClick

TcxWebDBTable

Fires when an end user clicks a cell.

type

  TcxWebTableCellClick = procedure(Sender: TObject; AColumn: TcxWebTableColumn; const AKeyValue: string) of object;

property OnCellClick: TcxWebTableCellClick;

Description

Write an OnCellClick event handler to perform specific actions each time a user clicks a cell.  The Sender parameter specifies the sender of the event.  The column and row containing the clicked cell are specified by the AColumn and AKeyValue parameters respectively.  The AKeyValue parameter represents the key field value within the clicked record.  (The key field is specified by the KeyFieldName property of the associated data source.)


TcxWebDBTable.OnGetDisplayText

TcxWebDBTable          See Also

Fires when the specified cell’s value must be obtained.

type

  TcxWebDBTableGetDisplayText = procedure(Sender: TObject; AColumn: TcxWebDBTableColumn; ARecIndex: Integer; var AText: string) of object;

property OnGetDisplayText: TcxWebDBTableGetDisplayText;

Description

Write an OnGetDisplayText event handler to populate the table control with data.  This event fires for each cell within the table control during rendering.  The Sender parameter specifies the sender of the event.  The cell whose value should be returned, is specified by the owning column and row.  The column is specified by the AColumn parameter.  The ARecIndex parameter specifies the index of the row containing the cell.  The value of the specified cell should be written to the AText parameter.

Note: The TcxWebDBTable control is data-aware.  If the OnGetDisplayText event handler in not specified, the table control is filled with data from the associated dataset.  If you do not need data-aware capabilities consider using a TcxWebTable control instead.

If you use hyperlink columns (the ViewType property of a column is tvtHyperText) you should also write an OnGetHrefValue event.  This is used to obtain the targets of hyperlinks displayed within column cells.  For image columns (the ViewType property of a column is tvtImage), you can handle the OnGetValue event to specify the necessary images.


TcxWebDBTable.OnGetHrefValue

TcxWebDBTable          See Also

Fires when the target of the specified cell’s hyperlink should be obtained.

type

  TcxWebDBTableGetURLValue = procedure(Sender: TObject; AColumn: TcxWebDBTableColumn; ARecIndex: Integer; const AKeyValue: string; AURL: TcxURL) of object;

property OnGetHrefValue: TcxWebDBTableGetHrefValue;

Description

Write an OnGetHrefValue event handler to specify targets of hyperlinks displayed by hyperlink columns.  The event fires for each cell displaying a hyperlink.  The ViewType property of a column should be set to tvtHyperText in order to display hyperlinks within its cells.

The Sender parameter specifies the sender of the event.  The cell whose target URL should be returned is specified by the object representing the owning column and row index.  The column is specified by the AColumn parameter.  The ARecIndex parameter specifies the index of the row containing the cell.  The target URL of the specified cell should be written to the AURL parameter.

Note: The TcxWebDBTable control is data-aware.  If the OnGetHrefValue event handler is not specified, hyperlink cell targets are automatically generated.  The generated targets invoke the OnCellClick event handler.  If you do not need data-aware capabilities consider using a TcxWebTable control instead.

The text displayed by table cells is specified via the OnGetDisplayText event.  For image columns (the ViewType property of a column is tvtImage), you can handle the OnGetValue event to specify the necessary images.


TcxWebDBTable.OnGetValue

TcxWebDBTable          See Also

Fires when the specified cell’s data should be obtained.

type

  TcxWebDBTableGetValue = procedure(Sender: TObject; AColumn: TcxWebDBTableColumn; ARecIndex: Integer; var Value: Variant) of object;

property OnGetValue: TcxWebDBTableGetValue;

Description

Write an OnGetValue event handler to fill the table control with data.  This event fires for each cell within the table control when rendering.  The Sender parameter specifies the sender of the event.  The cell whose value should be returned is specified by the owning column and row index.  The column is specified by the AColumn parameter.  The ARecIndex parameter specifies the index of the row containing the cell.  The value of the specified cell should be passed to the Value parameter.  For instance, you can specify an image to be displayed in a cell of an image column by passing the image as a stream to the Value parameter.  To save an image to a stream you can use the auxiliary SavePicture method from the cxWebDataUtils.pas unit.

Note: The TcxWebDBTable control is data-aware.  If the OnGetValue event handler in not specified, the table control is filled with data from the associated dataset.  If you do not need data-aware capabilities consider using a TcxWebTable control instead.

If you use hyperlink columns (the ViewType property of a column is tvtHyperText) you should also write an OnGetHrefValue event.  This is used to obtain the targets of hyperlinks displayed within column cells.  The text displayed by table cells is specified via the OnGetDisplayText event.


TcxWebDBTableColumn
TcxWebDBTableColumn Object

Hierarchy          Properties          Methods          See Also

Represents a data-aware table control column.

Unit

cxWebDBTable

TcxWebDBTableColumn = class(TcxCustomWebTableColumn)

Description

The TcxWebDBTableColumn object is used to represent a column within the TcxWebDBTable control.  These object classes are items within the collection represented by the TcxWebDBTableColumns object.

The TcxWebDBTableColumn class is the direct descendant of the TcxCustomWebTableColumn class.  It introduces a DataBinding property used to bind the column to a dataset field.


TcxWebDBTableColumn Hierarchy
Hierarchy

TCollectionItem

     |

TcxCustomWebTableColumn


Properties for TcxWebDBTableColumn
TcxWebDBTableColumn Properties

TcxWebDBTableColumn          Legend

In TcxWebDBTableColumn

DataBinding

Derived from TcxCustomWebTableColumn

Alignment

SortMode

Title

TitleAlignment

ViewType

Width


Methods for TcxWebDBTableColumn
TcxWebDBTableColumn Methods

TcxWebDBTableColumn          Legend

In TcxWebDBTableColumn

DataSource

Destroy

GetDataBinding

Derived from TcxCustomWebTableColumn

Assign

Columns

Create

Destroy

UpdateTable


TcxWebDBTableColumn.DataBinding

TcxWebDBTableColumn          See Also

Binds the column to a dataset field.

property DataBinding: TcxWebTableColumnDataBinding;

Description

Use the DataBinding property to bind the column of a data-aware table to a dataset field.  You should set the FieldName property of the TcxWebTableColumnDataBinding object for this purpose.  This property specifies the field to which the column is bound.  Note that columns are automatically bound to the dataset associated with their owner table control.


TcxWebDBTableColumn.DataSource

TcxWebDBTableColumn          See Also

Returns the data source component whose field a column is bound to.

function DataSource: TcxCustomWebDataSource;

Description

The DataSource method is used to obtain direct access to the data source component whose field a column it bound to.  This method calls the DataSource method of the owning table control to perform its tasks.


TcxWebDBTableColumn.Destroy

TcxWebDBTableColumn

Destroys the data-aware table’s column.

destructor Destroy; override;

Description

The Destroy method is used to dispose of the TcxWebDBTableColumn object and free any allocated memory.  It frees the DataBinding property before calling the inherited constructor.

Do not use the Destroy method in applications.  Columns are automatically destroyed when being removed from owning collections.


TcxWebDBTableColumn.GetDataBinding

TcxWebDBTableColumn          See Also

Returns the DataBinding property value.

function GetDataBinding: TcxWebTableColumnDataBinding; virtual;

Description

The GetDataBinding method is used to obtain the DataBinding property value.  It creates a new TcxWebTableColumnDataBinding object if the property has not been initialized yet.

Descendant classes can override the GetDataBinding method to return a proper TcxWebTableColumnDataBinding descendant.


TcxWebDBTableColumns
TcxWebDBTableColumns Object

Hierarchy          Properties          Methods          See Also

Represents a collection of columns within the TcxWebDBTable control.

Unit

cxWebDBTable

TcxWebDBTableColumns = class(TcxCustomWebTableColumns)

Description

The TcxWebDBTableColumns class is used for the TcxWebDBTable control’s Columns property.  It represents a collection of columns within the table control.  Each column is represented by the TcxWebDBTableColumn object.

The TcxWebDBTableColumns class is the direct descendant of the TcxCustomWebTableColumns class.  It introduces new members to manage TcxWebDBTableColumn class items.


TcxWebDBTableColumns Hierarchy
Hierarchy

TCollection

     |

TcxCustomWebTableColumns


Properties for TcxWebDBTableColumns
TcxWebDBTableColumns Properties

TcxWebDBTableColumns          Legend

In TcxWebDBTableColumns

Items

Derived from TcxCustomWebTableColumns

Table


Methods for TcxWebDBTableColumns
TcxWebDBTableColumns Methods

TcxWebDBTableColumns          Legend

In TcxWebDBTableColumns

Add


TcxWebDBTableColumns.Items

TcxWebDBTableColumns

Provides indexed access to collection items.

property Items[Index:Integer]: TcxWebDBTableColumn;

Description

Use the Items property to access TcxWebDBTable control columns.  The index of the accessed column is specified by the Index parameter.  Columns are zero-based indexed.  The total number of columns within the collection can be obtained via the Count property.

You should use the Columns property to access the table control’s collection of columns.


TcxWebDBTableColumns.Add

TcxWebDBTableColumns

Adds a new column to the collection.

function Add: TcxWebDBTableColumn;

Description

Use the Add method to add a new column to the end of the TcxWebDBTable control’s columns collection.  This method returns the newly created and added TcxWebDBTableColumn object.  Adjust the retuned object’s properties to change the type and look & feel of the added column.

Use the Delete method to remove the specified column from the columns collection.


TcxWebTableColumnDataBinding
TcxWebTableColumnDataBinding Object

Hierarchy          Properties          Methods          See Also

Binds a column of the TcxWebDBTable control to a dataset field.

Unit

cxWebDBTable

TcxWebTableColumnDataBinding = class(TcxAbstractWebDataBinding)

Description

The TcxWebTableColumnDataBinding object is used to bind a column of data-aware table control to a dataset field.  It represents the TcxWebDBTableColumn object’s DataBinding property.

The FieldName property of the TcxWebTableColumnDataBinding object specifies the field to which the associated column is bound.


TcxWebTableColumnDataBinding Hierarchy
Hierarchy

TPersistent

     |

TcxAbstractWebDataBinding


Properties for TcxWebTableColumnDataBinding
TcxWebTableColumnDataBinding Properties

TcxWebTableColumnDataBinding          Legend

In TcxWebTableColumnDataBinding

DataSource

DBColumn

FieldIndex

FieldName

Derived from TcxAbstractWebDataBinding

Component


Methods for TcxWebTableColumnDataBinding
TcxWebTableColumnDataBinding Methods

TcxWebTableColumnDataBinding          Legend

In TcxWebTableColumnDataBinding

Assign

GetDataSource

Derived from TcxAbstractWebDataBinding

Create

GetDataSource


TcxWebTableColumnDataBinding.DataSource

TcxWebTableColumnDataBinding          See Also

Returns the data source component whose field an associated column is bound to.

property DataSource: TcxCustomWebDataSource;

Description

The DataSource property is used to access the data source component whose field an associated column is bound to.  This component is used by the TcxWebDBTable control owning the column to set its data binding.  The DataSource property value is obtained by the GetDataSource method.

ReadOnly Property


TcxWebTableColumnDataBinding.DBColumn

TcxWebTableColumnDataBinding

Returns the column that uses the TcxWebTableColumnDataBinding to bind itself to a dataset field.

property DBColumn: TcxWebDBTableColumn;

Description

The DBColumn property is used to access the column making use of the TcxWebTableColumnDataBinding object.  The value for this property is automatically initialized after the object has been created.

ReadOnly Property


TcxWebTableColumnDataBinding.FieldIndex

TcxWebTableColumnDataBinding          See Also

Returns the index of the dataset field specified by the FieldName property.

property FieldIndex: Integer;

Description

TcxWebDBTable columns are bound to dataset fields by means of TcxWebTableColumnDataBinding objects.  The FieldName property of the object specifies the name of the field column it is bound to.  The FieldIndex property returns the index of the specified field within its dataset.

ReadOnly Property


TcxWebTableColumnDataBinding.FieldName

TcxWebTableColumnDataBinding          See Also

Specifies the name of the field the column is bound to.

property FieldName: string;

Description

Use the FieldName property to specify the name of the field whose values will be displayed in column cells.


TcxWebTableColumnDataBinding.Assign

TcxWebTableColumnDataBinding

Assigns the contents of one TcxWebTableColumnDataBinding object to another.

procedure Assign(Source: TPersistent); override;

Description

Use the Assign method to copy the contents of one TcxWebTableColumnDataBinding object to another.  The Source parameter specifies the source object.  The caller is the destination object.


TcxWebTableColumnDataBinding.GetDataSource

TcxWebTableColumnDataBinding          See Also

Returns the value of the DataSource property.

function GetDataSource: TcxCustomWebDataSource; override;

Description

The GetDataSource method is used to obtain the DataSource property value.  The method reads the DataSource property of the associated column (the TcxWebDBTableColumn object) to perform this task.


TcxWebTableDataBinding
TcxWebTableDataBinding Object

Hierarchy          Properties          Methods          See Also

Binds the TcxWebDBTable control to a dataset.

Unit

cxWebDBTable

TcxWebTableDataBinding = class(TcxCustomWebDataBinding)

Description

The TcxWebDBTable control uses its DataBinding property to bind itself to a dataset.  This property is represented by the TcxWebTableDataBinding object.  The DataSource property should be specified to bind the control to a dataset.

The DataSource property accepts any of the three data source components available in EWF.  These are the TcxStdWebDataSource, TcxWebDataSource and TcxWebDBDataSource components.


TcxWebTableDataBinding Hierarchy
Hierarchy

TPersistent

     |

TcxAbstractWebDataBinding

     |

TcxCustomWebDataBinding


Properties for TcxWebTableDataBinding
TcxWebTableDataBinding Properties

TcxWebTableDataBinding          Legend

Derived from TcxCustomWebDataBinding

DataSource

Derived from TcxAbstractWebDataBinding

Component

DataSource


Methods for TcxWebTableDataBinding
TcxWebTableDataBinding Methods

TcxWebTableDataBinding          Legend

Derived from TcxCustomWebDataBinding

Assign

ChangedDataLayout

GetDataSource

GetFieldIndex

GetFirstVisibleRow

GetPageSize

SetDataSource

UpdateData

WriteScripts

Derived from TcxAbstractWebDataBinding

Create


cxWebTable Unit Overview
cxWebTable Unit

Classes

TcxCustomWebTable

TcxCustomWebTableColumn

TcxCustomWebTableColumns

TcxWebTable

TcxWebTableColumn

TcxWebTableColumns

TcxWebTablePaging

Other Types

TcxWebTableCellClick

TcxWebTableColumnClick

TcxWebTableColumnSortMode

TcxWebTableColumViewType

TcxWebTablePagingType


TcxCustomWebTable
TcxCustomWebTable Object

Hierarchy          Properties          Methods          Events          See Also

Represents the base class for web table controls.

Unit

cxWebTable

TcxCustomWebTable = class(TcxWebControl)

Description

The TcxCustomWebTable class is a common ancestor for two classes that represent EWF web table controls (these are the TcxWebTable and TcxWebDBTable controls).  As a direct descendant of the TcxWebControl class, TcxCustomWebTable inherits all its properties, methods, and events providing functional capabilities for the EWF web control.  The TcxCustomWebTable class overrides some methods of the TcxWebControl class, which are common to all of its descendants.

Additionally, the TcxCustomWebTable class introduces the basic properties and methods that implement the core functionality of EWF web tables.


TcxCustomWebTable Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl


Properties for TcxCustomWebTable
TcxCustomWebTable Properties

TcxCustomWebTable          Legend

In TcxCustomWebTable

AlternatingItemsStyles

BorderColor

BorderWidth

CellPadding

CellSpacing

Columns

HeaderStyles

ItemsStyles

MaximumWidth

Paging

PagingNumbersStyles

PagingStyles

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxCustomWebTable
TcxCustomWebTable Methods

TcxCustomWebTable          Legend

In TcxCustomWebTable

Create

CreateColumns

Destroy

DoAfterRender

DoBeforeRender

DoColumnClick

DoPagingClick

DoRowClick

GetAfterPagingHTML

GetAllowSorting

GetBeforePagingHTML

GetDisplayText

GetHRefValue

GetPageIndex

GetRecordCount

GetTitleHTML

GetValue

RegisterActions

RegisterRenderers

ScriptsSubscription

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterEvents

RegisterValues

SetState

ValidateContainer


Events for TcxCustomWebTable
TcxCustomWebTable Events

TcxCustomWebTable          Legend

In TcxCustomWebTable

OnBeforeWriteRow

OnEndWriteRow

OnGetPagingStatus

OnGetTitleHTML

OnGetBeforePagingHTML

OnGetAfterPagingHTML

OnLoadImage

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxCustomWebTable.AlternatingItemsStyles

TcxCustomWebTable

Specifies the style of even table rows.

property AlternatingItemsStyles: TcxWebStyles;

Description

Use the AlternatingItemsStyles property to change the style of even rows within the table.  You should use the TcxWebStyleController component in order to create and manipulate individual styles.  Generated style objects are used to set the values of the Default and Hover properties of the TcxWebStyles object.  These properties respectively specify the default and hover style of even rows.

The style of odd table rows is specified by the ItemsStyles property.  If the style of even rows is not specified, the Styles property specifies the style of all table rows.


TcxCustomWebTable.BorderColor

TcxCustomWebTable

Specifies the border color for a table control.

property BorderColor: TcxWebColor;

Description

Use the BorderColor property to specify the color of the table control’s borders.  The width of the borders is specified by the BorderWidth property.


TcxCustomWebTable.BorderWidth

TcxCustomWebTable

Specifies the width of the table control’s borders.

property BorderWidth: Integer;

Description

Use the BorderWidth property to specify the width of the table control’s borders.  The color of the borders is specified by the BorderColor property.


TcxCustomWebTable.CellPadding

TcxCustomWebTable          See Also

Specifies the distance between the border and contents of table cells.

property CellPadding: Integer;

Description

The CellPadding property is used to specify the amount of space (in pixels) between the border of the table cell and the content of the cell.


TcxCustomWebTable.CellSpacing

TcxCustomWebTable          See Also

Specifies the distance between cells of a web table.

property CellSpacing: Integer;

Description

The CellSpacing property is used to specify the distance (in pixels) between web table cells.


TcxCustomWebTable.Columns

TcxCustomWebTable          See Also

Provides access to the web table’s columns collection.

property Columns: TcxCustomWebTableColumns;

Description

The Columns property provides access to the web table’s columns collection.  The obtained object is used for indexed access to table columns.  Columns are represented by TcxCustomWebTableColumn class descendants.  Objects representing columns allow you to customize data alignment, display type and sort order.

Descendants of the TcxCustomWebTable class override the Columns property to return a proper collection type. The TcxWebTable object’s Columns property returns the TcxWebTableColumns object.  The TcxWebDBTable object, in turn, returns the TcxWebDBTableColumns object for the Columns property value.

ReadOnly Property


TcxCustomWebTable.HeaderStyles

TcxCustomWebTable          See Also

Specifies column header style.

property HeaderStyles: TcxWebStyles;

Description

Use the HeaderStyles property to change the style of column headers.  You should use the TcxWebStyleController component in order to create and manipulate individual styles.  Generated style objects are used to set the values of the Default and Hover properties of the TcxWebStyles object.  These properties respectively specify the default and hover style of column headers.


TcxCustomWebTable.ItemsStyles

TcxCustomWebTable          See Also

Specifies table row style.

property ItemsStyles: TcxWebStyles;

Description

Use the ItemsStyles property to change the style of table rows.  You should use the TcxWebStyleController component in order to create and manipulate individual styles.  Generated style objects are used to set the values of the Default and Hover properties of the TcxWebStyles object.  These properties respectively specify the default and hover style of table rows.

Use the AlternatingItemsStyles property to change the style of even rows.  If this property value is set, the ItemsStyles property specifies the style of odd rows.


TcxCustomWebTable.MaximumWidth

TcxCustomWebTable          See Also

Specifies whether a table is stretched to the width of the containing web page.

property MaximumWidth: Boolean;

Description

Use the MaximumWidth property to specify whether the table control is stretched to the width of the containing web page.  Set this property to True to stretch the table.  If the MaximumWidth property value is False, the width of the table is specified by the Width property.


TcxCustomWebTable.Paging

TcxCustomWebTable

Provides access to the object controlling navigation through table’s pages.

property Paging: TcxWebTablePaging;

Description

Table controls provide the ability to represent their data separated across several pages.  The Paging property provides access to the object controlling the navigation through the table’s pages.  The properties of this object allow you to specify the size of pages in rows, and the look and feel of the paging panel.  The paging panel is the area within the table control, which owns a number of control elements allowing an end user to navigate through individual pages.


TcxCustomWebTable.PagingNumbersStyles

TcxCustomWebTable          See Also

Specifies the style of control elements within the paging panel.

property PagingNumbersStyles: TcxWebStyles;

Description

Use the PageNumberingStyles property to change the paging panel’s control element style.  These control elements are buttons allowing an end user to navigate through table pages.  You should use the TcxWebStyleController component in order to create and manipulate individual styles.  Generated style objects are used to set the values of the Default and Hover properties of the TcxWebStyles object.  These properties respectively specify the default and hover style of the paging panel’s control elements.

Use the PagingStyles property to specify paging panel style.


TcxCustomWebTable.PagingStyles

TcxCustomWebTable          See Also

Specifies paging panel style.

property PagingStyles: TcxWebStyles;

Description

Use the PagingStyles property to change the style of the table control’s paging panel.  This panel contains control elements allowing an end user to navigate through table pages.  You should use the TcxWebStyleController component in order to create and manipulate individual styles.  Generated style objects are used to set the values of the Default and Hover properties of TcxWebStyles objects.  These properties respectively specify the default and hover style of the table control’s paging panel.

Use the PagingNumbersStyles property to specify paging panel control element style.


TcxCustomWebTable.Create

TcxCustomWebTable          See Also

Creates an instance of the TcxCustomWebTable class.

constructor Create(AOwner: TComponent); override;

Description

The Create method is used to create and initialize a new instance of the TcxCustomWebTable class.  The AOwner parameter specifies the owner of the table control (usually the page module).  After calling the inherited constructor, this method initializes certain properties and sets them to default values.

Do not create instances of the TcxCustomWebTable class in applications.  Instantiate one of its descendant controls instead.  Available descendants are the TcxWebTable and TcxWebDBTable controls.


TcxCustomWebTable.CreateColumns

TcxCustomWebTable

Creates a collection of columns used by the table control.

function CreateColumns: TcxCustomWebTableColumns; virtual; abstract;

Description

The CreateColumns is used to instantiate a collection of columns used by the table control.  This method is declared abstract and it is overridden by derived classes in order to instantiate the desired object type.  It is used by the constructor to initialize the Columns property.


TcxCustomWebTable.Destroy

TcxCustomWebTable          See Also

Destroys the TcxCustomWebTable object.

destructor Destroy; override;

Description

The Destroy method is used to dispose of the TcxCustomWebTable object and free any allocated memory.  It frees a number of owned objects before calling the inherited destructor.


TcxCustomWebTable.DoAfterRender

TcxCustomWebTable          See Also

Performs specific actions after the table control has been rendered.

procedure DoAfterRender; virtual;

Description

The DoAfterRender method is called after the table control has been rendered.  It is designed to perform specific actions required after the control’s HTML code has been rendered.  As implemented by the TcxCustomWebTable class, the DoAfterRender method performs nothing.  Descendant classes override it, if necessary.


TcxCustomWebTable.DoBeforeRender

TcxCustomWebTable          See Also

Performs specific actions before the table control is rendered.

procedure DoBeforeRender; virtual;

Description

The DoBeforeRender method is called before the table control is rendered.  It is designed to perform specific actions required before rendering the control’s HTML code.  As implemented by the TcxCustomWebTable class, the DoBeforeRender method performs nothing.  Descendant classes override it, if necessary.


TcxCustomWebTable.DoColumnClick

TcxCustomWebTable          See Also

Performs specific actions after a column has been clicked by an end user.

procedure DoColumnClick(AColumnIndex: Integer); virtual;

Description

The DoColumnClick method is called if the request message received by the server script contains information that a user has clicked a column.  The AColumnIndex parameter specifies the index of the clicked column.  As implemented by the TcxCustomWebTable class, the DoColumnClick method performs nothing.  Descendant classes override it, if necessary.

For instance, the TcxWebTable control overrides this method to invoke the OnColumnClick event.  The TcxWebDBTable control uses the DoColumnClick method to sort table data by clicked column values.


TcxCustomWebTable.DoPagingClick

TcxCustomWebTable

Performs specific actions after an end user has clicked one of the paging panel’s control elements.

procedure DoPagingClick(APageIndex: Integer); virtual;

Description

The paging panel of the table control contains elements that allow an end user to navigate through individual pages.  The DoPagingClick method is called if the request message received by the server script contains information that a user has clicked a control element.  The APageIndex parameter specified the index of the page to which an end user wants to navigate.

As implemented by the TcxCustomWebTable class, the DoPagingClick method performs nothing.  Descendant classes override it to navigate to the desired page.


TcxCustomWebTable.DoRowClick

TcxCustomWebTable          See Also

Performs specific actions after an end user has clicked a table cell.

procedure DoRowClick(AColIndex: Integer; ARowValue: string); virtual;

Description

The DoRowClick method is called if the request message received by the server script contains information that a user has clicked a cell.  The cell is specified by its column and row indexes via the AColIndex and ARowValue parameters.  The ARowValue parameter transmits the string representation of the row index.

As implemented by the TcxCustomWebTable class, the DoRowClick method performs nothing.  Descendant classes override it to invoke the OnCellClick event handler.


TcxCustomWebTable.GetAfterPagingHTML

TcxCustomWebTable

Generates custom HTML code placed below the paging panel.

procedure GetAfterPagingHTML(APagingType: TcxWebTablePagingType; var AHTML: string); dynamic;

Description

The GetAfterPagingHTML method is used to render custom HTML code placed below the paging panel.  The APagingType parameter specifies the manner in which the paging panel is displayed.  Custom HTML code is written to the AHTML parameter.

As implemented in the TcxCustomWebTable class, the GetAfterPagingHTML method invokes the OnGetAfterPagingHTML event with corresponding parameters.


TcxCustomWebTable.GetAllowSorting

TcxCustomWebTable          See Also

Returns a value indicating whether the table control allows you to sort its data by column values.

function GetAllowSorting: Boolean; virtual; abstract;

Description

The GetAllowSorting method returns a value used to determine whether the sorting feature is enabled.  If this method returns True, the control is specifically rendered to provide the ability to sort its data.  The TcxCustomWebTable object declares this method as abstract, thus descendant controls override it to return desired values.

Descendants of the TcxCustomWebTable object declare the AllowSorting property whose value is returned by the GetAllowSorting method.


TcxCustomWebTable.GetBeforePagingHTML

TcxCustomWebTable

Generates custom HTML code placed above the paging panel.

procedure GetBeforePagingHTML(APagingType: TcxWebTablePagingType; var AHTML: string); dynamic;

Description

The GetBeforePagingHTML method is used to render custom HTML code placed above the paging panel.  The APagingType parameter specifies the manner in which the paging panel is displayed.  Custom HTML code is written to the AHTML parameter.

As implemented in the TcxCustomWebTable class, the GetBeforePagingHTML method invokes the OnGetBeforePagingHTML event with corresponding parameters.


TcxCustomWebTable.GetDisplayText

TcxCustomWebTable          See Also

Returns the string representation of the specified cell’s value.

function GetDisplayText(AColumn: TcxCustomWebTableColumn; ARecIndex: Integer): string; virtual; abstract;

Description

The GetDisplayText method is used to populate the table with data.  It returns the string representation of the value that should be displayed by the specified cell.  The cell is specified by the object representing its owner column and row index via the AColumn and ARecIndex parameters.

The TcxWebTable control implements this method to invoke the OnGetDisplayText event handler.  Thus you should write an OnGetDisplayText event handler in order to populate the table control with data.  If you use a column displaying hyperlinks (the ViewType property of the column is tvtHyperText) you should also write an OnGetHrefValue event handler.  This allows generating targets for links contained within cells.  However the text of hyperlinks is determined via the OnGetDisplayText event.

The TcxWebDBTable control implements the GetDisplayText method to read data from the associated data source.  However, it also provides the ability to use the OnGetDisplayText event.


TcxCustomWebTable.GetHRefValue

TcxCustomWebTable          See Also

Returns the target of the link displayed by a specified cell.

function GetHRerValue(AColumn: TcxCustomWebTableColumn; ARecIndex: Integer): string; virtual;

Description

The GetHRefValue method is used to fill the table with data.  It returns the string specifying the target of the hyperlink displayed by the specified cell.  The cell is specified by the object representing its owner column and row index via the AColumn and ARecIndex parameters.  Note that this method is used to generate the code for columns whose ViewType property is set to tvtHyperText.

The TcxWebTable control implements this method to invoke the OnGetHrefValue event handler.  Thus you should write an OnGetHrefValue event handler to specify targets for cells containing hyperlinks.  Hyperlink text is set by means of the OnGetDisplayText event.

The TcxWebDBTable control implements the GetHRefValue method to invoke the server side OnCellClick event handler.  However it also provides the ability to use the OnGetHrefValue event.


TcxCustomWebTable.GetPageIndex

TcxCustomWebTable          See Also

Returns the current page’s index.

function GetPageIndex: Integer; virtual; abstract;

Description

The GetPageIndex method is used to obtain the index of the currently displayed page.  The number is used to render HTML code for the table control properly.

The TcxCustomWebTable class declares this method as abstract.  Thus, descendant controls override it as necessary.  TcxWebTable and TcxWebDBTable introduce a PageIndex property whose value is returned by the GetPageIndex method.


TcxCustomWebTable.GetRecordCount

TcxCustomWebTable          See Also

Returns the number of rows in the table control.

function GetRecordCount: Integer; virtual; abstract;

Description

The GetRecordCount method is used to obtain the number of rows within the table control.  The generated value is used to calculate the number of pages displayed by the table control.

The TcxWebTable control implements a GetRecordCount to return the RecordCount property value.  The TcxWebDBTable class, in turn, reads the number of record of the associated dataset.


TcxCustomWebTable.GetTitleHTML

TcxCustomWebTable

Generates custom HTML code placed within the specified column header.

procedure GetTitleHTML(AColumn: TcxCustomWebTableColumn; const AHRef: string; var AHTML: string); dynamic;

Description

The GetTitleHTML method is used to render custom HTML code within the specified column header.  The column is specified by the object representing it via the AColumn parameter.  The AHref parameter specifies the target of the column header’s URL.  The automatically generated HTML code representing the column header is transmitted as an AHTML parameter.  Changing the value of this parameter assigns custom contents to the column header.

As implemented in the TcxCustomWebTable class, the GetTitleHTML method invokes the OnGetTitleHTML event with appropriate parameters.


TcxCustomWebTable.GetValue

TcxCustomWebTable

Reserved for future use.

function GetValue(AColumn: TcxCustomWebTableColumn; ARecIndex: Integer): Variant; virtual; abstract;

Description

Reserved for future use.


TcxCustomWebTable.RegisterActions

TcxCustomWebTable          See Also

Registers server side event handlers for the table control.

procedure RegisterActions; override;

Description

The RegisterActions method is used to register three actions for the web button.  These actions are handled by the DoColumnClick, DoPagingClick and DoRowClick methods.

This method overrides the RegisterActions method of the TcxWebComponent class.  You can override the RegisterActions method in descendant classes to register additional actions.


TcxCustomWebTable.RegisterRenderers

TcxCustomWebTable          See Also

Registers renderer classes that generate HTML code representing the table control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers a single renderer class designed to render HTML code for the table control.  The browser type for which the registered renderer generates code is Internet Explorer.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for the button control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxCustomWebTable.ScriptsSubscription

TcxCustomWebTable          See Also

Subscribes the table control to client side scripts required for its proper functionality.

procedure ScriptsSubscription; override;

Description

This method implements the ScriptsSubscription method of the IcxWebScripts interface.  You can override this method in descendant classes to subscribe your control to additional scripts.


TcxCustomWebTable.OnGetTitleHTML

TcxCustomWebTable

Fires when HTML code representing the specified column’s header should be obtained.

type

  TcxWebTableGetTitleHTML = procedure(Sender: TObject; AColumn:  TcxCustomWebTableColumn; const AHRef: string; var AHTML: string) of object;

property OnGetTitleHTML: TcxWebTableGetTitleHTML;

Description

Write an OnGetTitleHTML event handler to perform custom rendering of a specified column’s header.  The column is specified by the object representing it via the AColumn parameter.  The AHref parameter specifies the target of the column header’s URL.  The automatically generated HTML code representing the column header is transmitted as an AHTML parameter.  Change the value of this parameter to assign custom contents to the column header.

The Sender parameter specifies the sender of the event.


TcxCustomWebTable.OnGetBeforePagingHTML

TcxCustomWebTable          See Also

Allows rendering custom HTML code placed above the paging panel.

type

  TcxWebTableGetPagingHTML = procedure(Sender: TObject; APagingType: TcxWebTablePagingType; var AHTML: string) of object;

property OnGetBeforePagingHTML: TcxWebTableGetPagingHTML;

Description

Write an OnGetBeforePagingHTML event handler to render custom HTML code placed above the paging panel.  The Sender parameter specifies the event sender.  The manner in which the paging panel is displayed is specified by the APagingType parameter.  Custom HTML code should be written to the AHTML parameter.


TcxCustomWebTable.OnGetAfterPagingHTML

TcxCustomWebTable          See Also

Allows rendering custom HTML code placed below the paging panel.

type

  TcxWebTableGetPagingHTML = procedure(Sender: TObject; APagingType: TcxWebTablePagingType; var AHTML: string) of object;

property OnGetAfterPagingHTML: TcxWebTableGetPagingHTML;

Description

Write an OnGetAfterPagingHTML event handler to render custom HTML code placed below the paging panel.  The Sender parameter specifies the sender of the event.  The manner in which the paging panel is displayed is specified by the APagingType parameter.  Custom HTML code should be written to the AHTML parameter.


TcxCustomWebTable.OnGetPagingStatus

TcxCustomWebTable          See Also

Occurs when the mouse cursor is over a control element contained within the paging panel.

type

  TcxWebTableGetPagingStatus = procedure(Sender: TObject; APageIndex: Integer; var AHTML: string) of object;

property OnGetPagingStatus: TcxWebTableGetPagingStatus;

Description

Write an OnGetPagingStatus event handler to specify custom text to be displayed in the browser’s Status Bar when the mouse cursor is over one of the paging panel’s control elements.  These control elements are buttons which allow an end user to navigate through table pages.  By default, when the user points mouse at such a button, the browser’s Status Bar displays the name of the corresponding page in the format ‘Page’ and ‘index of the page’.  For instance, the first page’s name is displayed as ‘Page 1’ within the Status Bar.  Handling the OnGetPagingStatus event you can specify you custom text for this purpose.

The Sender parameter specifies the event sender.  The APageIndex parameter specifies the index of the page referenced by the cursor.  Custom HTML code should be written to the AHTML parameter.


TcxCustomWebTable.OnLoadImage

TcxCustomWebTable

Fires when determining the type of the images displayed within a column.

type

  TcxWebTableLoadImage = procedure(Sender: TObject; AColumn: TcxCustomWebTableColumn; var GraphicClass: TGraphicClass) of object;

property OnLoadImage: TcxWebTableLoadImage;

Description

Write an OnLoadImage event handler to specify the type of the images displayed within a column.  This is only necessary if the column displays pictures, which are not bitmaps.  Images can be displayed in a column whose ViewType property is set to tvtImage.

The Sender parameter specifies the event sender.  The AColumn parameter specifies a column which displays images.  The class of TGraphic descendants must be assigned to the GraphicClass parameter.  For instance, if your column must display JPEG images, you should assign the TJPEGImage class to this parameter.


TcxCustomWebTable.OnBeforeWriteRow

TcxCustomWebTable

Occurs before rendering a web table row.

type

  TcxWebTableWriteRow = procedure(Sender: TObject; AHTMLTextBuilder: TcxHTMLTextBuilder; ARowIndex: Integer) of object;

  property OnBeforeWriteRow: TcxWebTableWriteRow;

Description

Write an OnBeforeWriteRow event handler to perform specific actions before a row is rendered to a page.

The Sender parameter specifies the event sender.  The AHTMLTextBuilder parameter gains access to a TcxHTMLTextBuilder object that provides a number of methods designed to render HTML code.  The ARowIndex parameter specifies the index of a row to be rendered.


TcxCustomWebTable.OnEndWriteRow

TcxCustomWebTable

Occurs after rendering a web table row.

type

  TcxWebTableWriteRow = procedure(Sender: TObject; AHTMLTextBuilder: TcxHTMLTextBuilder; ARowIndex: Integer) of object;

  property OnEndWriteRow: TcxWebTableWriteRow;

Description

Write an OnEndWriteRow event handler to perform specific actions after a row is rendered to a page.

The Sender parameter specifies the event sender.  The AHTMLTextBuilder parameter gains access to a TcxHTMLTextBuilder object that provides a number of methods designed to render HTML code.  The ARowIndex parameter specifies the index of a row that has been rendered.


TcxCustomWebTableColumn
TcxCustomWebTableColumn Object

Hierarchy          Properties          Methods          See Also

Serves as the base class for objects representing columns in table controls.

Unit

cxWebTable

TcxCustomWebTableColumn = class(TCollectionItem)

Description

The TcxCustomWebTableColumn class declares the general behavior of columns within table controls.  This object its descendants are used as items within collections represented by TcxCustomWebTableColumns class and its descendants.  These collections are accessible via the Columns property of table controls (descendants of the TcxCustomWebTable class).

Use the properties of the TcxCustomWebTableColumn class to customize the look and feel of columns within table controls.


TcxCustomWebTableColumn Hierarchy
Hierarchy

TCollectionItem


Properties for TcxCustomWebTableColumn
TcxCustomWebTableColumn Properties

TcxCustomWebTableColumn          Legend

In TcxCustomWebTableColumn

Alignment

SortMode

Title

TitleAlignment

ViewType

Width


Methods for TcxCustomWebTableColumn
TcxCustomWebTableColumn Methods

TcxCustomWebTableColumn          Legend

In TcxCustomWebTableColumn

Assign

Columns

Create

Destroy

UpdateTable


TcxCustomWebTableColumn.Alignment

TcxCustomWebTableColumn          See Also

Specifies the alignment of data within the column.

TcxWebHorzAlignment = (whalLeft, whalCenter, whalRight, whalJustify, whalChar);

property Alignment: TcxWebHorzAlignment;

Description

Use the Alignment property to specify the horizontal alignment of cell values within the column.  The table below lists values available for this property:

Value	Meaning
whalLeft	Cell values are left-aligned within the column.
whalCenter	Cell values are centered within the column.
whalRight	Cell values are right-aligned within the column.
whalJustify	Cell values are justified within the column.
whalChar	Reserved for future use.

The alignment of text displayed within the column header is specified by the TitleAlignment property.


TcxCustomWebTableColumn.SortMode

TcxCustomWebTableColumn          See Also

Specifies the order in which column values are sorted.

TcxWebTableColumnSortMode = (tsmNone, tsmAscending, tsmDescending);

property SortMode: TcxWebTableColumnSortMode;

Description

Use the SortMode property to specify the order in which column values are sorted.  The following values are available for the SortMode property:

Value	Description
tsmNone	Column values are unsorted.
tsmAscending	Column values are sorted in ascending order.
tsmDescending	Column values are sorted in descending order.
Note: Column values can also be sorted by an end user by clicking the corresponding column header.


TcxCustomWebTableColumn.Title

TcxCustomWebTableColumn          See Also

Specifies column caption.

property Title: string;

Description

Use the Title property to specify the text displayed within the column header, i.e. column caption.  The alignment of the column caption is specified by the TitleAlignment property.


TcxCustomWebTableColumn.TitleAlignment

TcxCustomWebTableColumn          See Also

Specifies column caption alignment.

property TitleAlignment: TcxWebHorzAlignment;

Description

Use the TitleAlignment property to specify how text is horizontally aligned within the column header.  The text displayed within the column header is specified by the Title property.

The following values are available for the TitleAlignment property:

Value	Meaning
whalLeft	Text is left-aligned within the column header.
whalCenter	Text is centered within the column header.
whalRight	Text is right-aligned within the column header.
whalJustify	Text is justified within the column header.
whalChar	Reserved for future use.

Use the Alignment property to specify the horizontal alignment of cell values within the column.


TcxCustomWebTableColumn.ViewType

TcxCustomWebTableColumn

Specifies the kind of data a column displays.

type

  TcxWebTableColumViewType = (tvtText, tvtHyperText, tvtImage);

property ViewType: TcxWebTableColumViewType;

Description

Use the ViewType property of the column to specify the kind of data displayed within column cells.  The following values are available for the ViewType property:

Value	Description
tvtText	The column displays text values.
tvtHyperText	The column displays hyperlinks.
tvtImage	The column displays images.

If you are using a TcxWebTable control, the table is populated with data by means of the OnGetDisplayText event handler.  Columns displaying hyperlinks also need their targets to be specified.  The OnGetHrefValue event should be used for this purpose.  The image column can be populated via the OnGetValue and OnLoadImage events.

If you using a TcxWebDBTable control, the table is populated with data from the associated data source.  Hyperlink columns simply invoke the OnCellClick server event when their values are clicked.  However, the OnGetDisplayText, OnGetHrefValue, OnGetValue and OnLoadImage events can also be used.


TcxCustomWebTableColumn.Width

TcxCustomWebTableColumn

Specifies the column width in pixels.

property Width: Integer;

Description

Use the Width property to specify the horizontal size of the column.  The value for this property is set in pixels.


TcxCustomWebTableColumn.Assign

TcxCustomWebTableColumn          See Also

Assigns the properties of one TcxCustomWebTableColumn object to another.

procedure Assign(Source: TPersistent); override;

Description

Use the Assign method to assign the properties of one TcxCustomWebTableColumn object to another.  The Source parameter specifies the source object.  The caller is the destination object.


TcxCustomWebTableColumn.Columns

TcxCustomWebTableColumn          See Also

Returns the columns collection owner.

function Columns: TcxCustomWebTableColumns;

Description

The Columns method is used to obtain access to the collection owning the column.


TcxCustomWebTableColumn.Create

TcxCustomWebTableColumn          See Also

Creates an instance of the TcxCustomWebTableColumn class.

constructor Create(Collection: TCollection); override;

Description

The Create method is used to instantiate the TcxCustomWebTableColumn class.  The Collection parameter specifies the collection object owning the column.  This method sets properties to their default values and updates the table control after calling the inherited constructor.

Do not create instances of the TcxCustomWebTableColumn class in applications.  The appropriate descendants are created automatically when adding columns to column collections.  This can be done either via the Object Inspector or using the corresponding methods of the collection.


TcxCustomWebTableColumn.Destroy

TcxCustomWebTableColumn          See Also

Destroys the TcxCustomWebTableColumn object.

destructor Destroy; override;

Description

The Destroy method is used to dispose of the TcxCustomWebTableColumn object and free any allocated memory.

Do not explicitly destroy TcxCustomWebTableColumn objects.  These are automatically destroyed when being removed from the owning collection.


TcxCustomWebTableColumn.UpdateTable

TcxCustomWebTableColumn

Updates the owning table control.

procedure UpdateTable;

Description

The UpdateTable method is used to update the table control with respect to changes applied to the column.  It notifies the designer owning the column of the need to repaint the control.


TcxCustomWebTableColumns
TcxCustomWebTableColumns Object

Hierarchy          Properties          See Also

Serves as the base class for table control collections of columns.

Unit

cxWebTable

TcxCustomWebTableColumns = class(TCollection)

Description

The TcxCustomWebTableColumns class provides a means of storing and manipulating a collection of columns.  It provides indexed access to objects representing columns (the TcxCustomWebTableColumn class descendants).  In addition, it declares the Table property to have access to the owning table control.

The TcxCustomWebTableColumns class (and descendants) serves as a table control’s Columns property type.


TcxCustomWebTableColumns Hierarchy
Hierarchy

TCollection


Properties for TcxCustomWebTableColumns
TcxCustomWebTableColumns Properties

TcxCustomWebTableColumns          Legend

In TcxCustomWebTableColumns

Items

Table


TcxCustomWebTableColumns.Items

TcxCustomWebTableColumns

Provides indexed access to individual columns within the column collection.

property Items[Index: Integer]: TcxCustomWebTableColumn;

Description

Use the Items property to obtain access to the specified column within the columns collection.  The column is specified by its index via the Index parameter.  Columns are zero-based indexed.  The total number of columns is obtained via the Count property.

Descendants of the TcxCustomWebTableColumns class override the Items property to return a proper value type.


TcxCustomWebTableColumns.Table

TcxCustomWebTableColumns          See Also

Provides access to the owning table control.

property Table: TcxCustomWebTable;

Description

The Table property is used to obtain a reference to the table control owning the columns collection.  This is used to enable control change notifications for column properties.

ReadOnly Property


TcxWebTable
 TcxWebTable Object

Hierarchy          Properties          Methods          Events          See Also

Represents an unbound table control.

Unit

cxWebTable

TcxWebTable = class(TcxCustomWebTable)

Description

Use the TcxWebTable control to place an unbound table on a web page.  This control allows you to display data within table cells.  Values are loaded into table cells by means of the OnGetDisplayText, OnGetHrefValue or OnGetValue events depending upon the column type specified by the ViewType property.  Table data can be separated across several pages containing the predefined number of rows.

If you want display a table containing data from the associated dataset, you should use either the TcxWebDBTable or TcxWebDBGrid control.  The TcxWebDBTable control has the advantage of less rendered code, but without data manipulation capabilities as the webgrid control .


TcxWebTable Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxCustomWebTable


Properties for TcxWebTable
TcxWebTable Properties

TcxWebTable          Legend

In TcxWebTable

AllowSorting

PageIndex

RecordCount

Derived from TcxCustomWebTable

AlternatingItemsStyles

BorderColor

BorderWidth

CellPadding

CellSpacing

Columns

HeaderStyles

ItemsStyles

MaximumWidth

Paging

PagingNumbersStyles

PagingStyles

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebTable
TcxWebTable Methods

TcxWebTable          Legend

In TcxWebTable

Create

Derived from TcxCustomWebTable

CreateColumns

Destroy

DoAfterRender

DoBeforeRender

DoColumnClick

DoPagingClick

DoRowClick

GetAllowSorting

GetDisplayText

GetHRefValue

GetPageIndex

GetRecordCount

GetValue

RegisterActions

RegisterRenderers

ScriptsSubscription

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterEvents

RegisterValues

SetState

ValidateContainer


Events for TcxWebTable
TcxWebTable Events

TcxWebTable          Legend

In TcxWebTable

OnCellClick

OnColumnClick

OnGetDisplayText

OnGetHrefValue

OnGetValue

Derived from TcxCustomWebTable

OnBeforeWriteRow

OnEndWriteRow

OnGetPagingStatus

OnGetTitleHTML

OnGetBeforePagingHTML

OnGetAfterPagingHTML

OnLoadImage

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebTable.AllowSorting

TcxWebTable          See Also

Specifies whether data in the table control can be sorted by column values.

property AllowSorting: Boolean;

Description

Use the AllowSorting property to specify whether table data can be sorted by column values.  Set this property to True to allow an end user to sort table data by clicking the corresponding column header.  Column values can also be sorted by setting the SortMode property to an appropriate value in such a case.

Set the AllowSorting property to False to prohibit data sorting.


TcxWebTable.PageIndex

TcxWebTable          See Also

Specifies the index of the page currently displayed by the table control.

property PageIndex: Integer;

Description

Use the PageIndex property to set or get the index of the page currently displayed by the control.  You can specify the number of records displayed within the page via the PagingSize property of the TcxWebTablePaging object.  This object can be accessed via the Paging property of the table control.

The total number of records displayed by the table control is specified by the RecordCount property.


TcxWebTable.RecordCount

TcxWebTable          See Also

Specifies the number of records displayed by the table control.

property RecordCount: Integer;

Description

The table control is unbound thus you should specify the number of records it will display via the RecordCount property.  The number and type of columns is specified by the Columns property.  When the table is rendered, it calls the OnGetDisplayText event handler for each cell.  Values returned as the parameter of the event handler are written to corresponding cells.

If you use columns whose ViewType property is set to tvtHyperText (hyperlink columns) you should also write an OnGetHrefValue event handler.  Values returned as the parameter of this event are used to set targets of hyperlinks in corresponding cells.


TcxWebTable.Create

TcxWebTable

Creates an instance of the TcxWebTable class.

constructor Create(AOwner: TComponent); override;

Description

Use the Create method to create a new TcxWebTable control at runtime.  The AOwner parameter specifies the owner of the control (the page module).


TcxWebTable.OnCellClick

TcxWebTable          See Also

Fires when an end user clicks a cell.

type

  TcxWebTableCellClick = procedure(Sender: TObject; AColumn: TcxWebTableColumn; ARecIndex: Integer) of object;

property OnCellClick: TcxWebTableCellClick;

Description

Write an OnCellClick event handler to perform specific actions each time a user clicks a cell.  The Sender parameter specifies the sender of the event.  The column and row containing the clicked cell are specified by the AColumn and ARecIndex parameters respectively.


TcxWebTable.OnColumnClick

TcxWebTable          See Also

Fires when a user clicks a column header.

type

  TcxWebTableColumnClick = procedure(Sender: TObject; AColumn: TcxWebTableColumn) of object;

property OnColumnClick: TcxWebTableColumnClick;

Description

Write an OnColumn click event handler to perform specific actions each time a user clicks a column header.  The Sender parameter specifies the sender of the event.  The column whose header was clicked is specified by the AColumn parameter.


TcxWebTable.OnGetDisplayText

TcxWebTable          See Also

Fires when the specified cell’s text value should be obtained.

type

  TcxWebTableGetDisplayText = procedure(Sender: TObject; AColumn: TcxWebTableColumn; ARecIndex: Integer; var AText: string) of object;

property OnGetDisplayText: TcxWebTableGetDisplayText;

Description

Write an OnGetDisplayText event handler to fill the table control with text data.  This event fires for each cell within the table control when rendering.  The Sender parameter specifies the sender of the event.  The cell whose value should be returned is specified by the owning column and row index.  The column is specified by the AColumn parameter.  The ARecIndex parameter specifies the index of the row containing the cell.  The text value of the specified cell should be written to the AText parameter.

If you use hyperlink columns (the ViewType property of a column is tvtHyperText) you should also write an OnGetHrefValue event handler.  This is used to obtain the targets of hyperlinks displayed within column cells.  For image columns (the ViewType property of a column is tvtImage), you should handle the OnGetValue event to specify the necessary images.


TcxWebTable.OnGetHrefValue

TcxWebTable          See Also

Fires when the target of the specified cell’s hyperlink should be obtained.

type

  TcxWebTableGetURLValue = procedure(Sender: TObject; AColumn: TcxWebTableColumn; ARecIndex: Integer; AURL: TcxURL) of object;

property OnGetHrefValue: TcxWebTableGetHrefValue;

Description

Write an OnGetHrefValue event handler to specify targets of hyperlinks displayed by hyperlink columns.  The event fires for each cell displaying a hyperlink.  The ViewType property of a column should be set to tvtHyperText in order to display hyperlinks within its cells.

The Sender parameter specifies the sender of the event.  The cell whose target URL should be returned is specified by the object representing the owning column and row index.  The column is specified by the AColumn parameter.  The ARecIndex parameter specifies the index of the row containing the cell.  The target URL of the specified cell should be written to the AURL parameter.

The text displayed by table cells is specified via the OnGetDisplayText event.  For image columns (the ViewType property of a column is tvtImage), you should handle the OnGetValue event to specify the necessary images.


TcxWebTable.OnGetValue

TcxWebTable          See Also

Fires when the specified cell’s value should be obtained.

type

  TcxWebTableGetValue = procedure(Sender: TObject; AColumn: TcxWebTableColumn; ARecIndex: Integer; var Value: Variant) of object;

property OnGetValue: TcxWebTableGetValue;

Description

Write an OnGetValue event handler to fill the table control with data.  This event fires for each cell within the table control when rendering.  The Sender parameter specifies the sender of the event.  The cell whose value should be returned is specified by the owning column and row index.  The column is specified by the AColumn parameter.  The ARecIndex parameter specifies the index of the row containing the cell.  The value of the specified cell should be passed to the Value parameter.  For instance, you can specify an image to be displayed in a cell of an image column by passing the image as a stream to the Value parameter.  To save an image to a stream you can use the auxiliary SavePicture method from the cxWebDataUtils.pas unit.  Additionally you should pass the type of the obtained image to the GraphicClass parameter of the OnLoadImage event.

If you use hyperlink columns (the ViewType property of a column is tvtHyperText) you should also write an OnGetHrefValue event.  This is used to obtain the targets of hyperlinks displayed within column cells.  The text displayed by table cells is specified via the OnGetDisplayText event.


TcxWebTableColumn
TcxWebTableColumn Object

Hierarchy          Properties          Methods          See Also

Represents a column of the TcxWebTable control.

Unit

cxWebTable

TcxWebTableColumn = class(TcxCustomWebTableColumn)

Description

The TcxWebTableColumn object is used to represent a column within the TcxWebTable control.  Such object classes are items within the collection represented by the TcxWebTableColumns object.

The TcxWebTableColumn class is the direct descendant of the TcxCustomWebTableColumn class.  It doesn’t introduce any new behavior.


TcxWebTableColumn Hierarchy
Hierarchy

TCollectionItem

     |

TcxCustomWebTableColumn


Properties for TcxWebTableColumn
TcxWebTableColumn Properties

TcxWebTableColumn          Legend

Derived from TcxCustomWebTableColumn

Alignment

SortMode

Title

TitleAlignment

ViewType

Width


Methods for TcxWebTableColumn
TcxWebTableColumn Methods

TcxWebTableColumn          Legend

Derived from TcxCustomWebTableColumn

Assign

Columns

Create

Destroy

UpdateTable


TcxWebTableColumns
TcxWebTableColumns Object

Hierarchy          Properties          Methods          See Also

Represents a collection of columns within the TcxWebTable control.

Unit

cxWebTable

TcxWebTableColumns = class(TcxCustomWebTableColumns)

Description

The TcxWebTableColumns class is used as the  TcxWebTable control’s Columns property type.  It represents the collection of columns within the table control.  Each column is represented by the TcxWebTableColumn object.

The TcxWebTableColumns class is the direct descendant of the TcxCustomWebTableColumns class.  It introduces new members to manage TcxWebTableColumn class items.


TcxWebTableColumns Hierarchy
Hierarchy

TCollection

     |

TcxCustomWebTableColumns


Properties for TcxWebTableColumns
TcxWebTableColumns Properties

TcxWebTableColumns          Legend

In TcxWebTableColumns

Items

Derived from TcxCustomWebTableColumns

Table


Methods for TcxWebTableColumns
TcxWebTableColumns Methods

TcxWebTableColumns          Legend

In TcxWebTableColumns

Add


TcxWebTableColumns.Items

TcxWebTableColumns

Provides indexed access to collection items.

property Items[Index:Integer]: TcxWebTableColumn;

Description

Use the Items property to access columns of the TcxWebTable control.  The index of the accessed column is specified by the Index parameter.  Columns are zero-based indexed.  The total number of columns within the collection can be obtained via the Count property.

You should use the Columns property to access the table control’s collection of columns.


TcxWebTableColumns.Add

TcxWebTableColumns

Adds a new column to the collection.

function Add: TcxWebTableColumn;

Description

Use the Add method to add a new column to the end of the TcxWebTable control’s columns collection.  This method returns the newly created and added TcxWebTableColumn object.  Adjust the retuned object’s properties to change the type and look & feel of the added column.

Use the Delete method to remove the specified column from the columns collection.


TcxWebTablePaging
TcxWebTablePaging Object

Hierarchy          Properties          Methods

Specifies the paging properties of the table control.

Unit

cxWebTable

TcxWebTablePaging = class(TPersistent)

Description

TcxWebPaging contains a number of properties used to control the manner in which the table’s data is broken across pages.  It also contains properties specifying the look & feel of the paging panel.

The paging panel is the area within the table control, which contains control elements used to navigate through pages.  Control elements are the buttons used to navigate through pages of the table control.  There are always two buttons used to navigate to the next and previous pages.  There can also be a number of buttons providing direct access to pages.


TcxWebTablePaging Hierarchy
Hierarchy

TPersistent


Properties for TcxWebTablePaging
TcxWebTablePaging Properties

TcxWebTablePaging          Legend

In TcxWebTablePaging

Alignment

MaxPageNumbers

PagingSize

PagingType

Table


Methods for TcxWebTablePaging
TcxWebTablePaging Methods

TcxWebTablePaging          Legend

In TcxWebTablePaging

Assign

Create


TcxWebTablePaging.Alignment

TcxWebTablePaging          See Also

Specifies the alignment of control elements within the paging panel.

property Alignment: TcxWebHorzAlignment;

Description

Use the Alignment property to specify the horizontal alignment of control elements within the paging panel.  Control elements are the buttons used to navigate through pages of the table control.  There are always two buttons used to navigate to the next and previous pages.  There can also be a number of buttons providing direct access to pages.  Button number is specified by the MaxPageNumbers property.

The following values are available for the Alignment property:

Value	Meaning
whalLeft	Control elements are left-aligned within the paging panel.
whalCenter	Control elements are centered within the paging panel.
whalRight	Control elements are right-aligned within the paging panel.
whalJustify	Control elements are justified within the paging panel.
whalChar	Reserved for future use.


TcxWebTablePaging.MaxPageNumbers

TcxWebTablePaging

Specifies the number of control elements providing direct access to pages.

property MaxPageNumbers: Integer;

Description

The paging panel contains a number of control elements used to navigate through pages.  There are always two buttons used to navigate to the next and previous pages.  There can also be a number of buttons providing direct access to individual pages.  These buttons display page numbers and allow a user to navigate to the page with a specified number.  One of these buttons always corresponds to the currently displayed page.

Use the MaxPageNumbers property to specify the number of buttons used for direct access to pages.  If the MaxPageNumbers property is set to 0, only the ‘previous page’ and ‘next page’ buttons are displayed within the paging panel.


TcxWebTablePaging.PagingSize

TcxWebTablePaging          See Also

Specifies the number of rows displayed within a page.

property PagingSize: Integer;

Description

Use the PagingSize property to specify the number of rows displayed within a page.  This property cannot be set to a value less than 1.

Note that if the PagingType property is set to tptNone, table data will not be divided across pages.  In this instance, the PagingSize property is not in effect.


TcxWebTablePaging.PagingType

TcxWebTablePaging          See Also

Specifies whether the table’s data is divided across pages together with the position of the paging panel.

TcxWebTablePagingType = (tptNone, tptBottom, tptTop, tptBoth);

property PagingType: TcxWebTablePagingType;

Description

Use the PagingType property to specify whether the table control’s data is divided across pages.  This property also specifies the position of the paging panel.  Review the table below for a list of values available for the PagingType property and their meanings.

Value	Description
tptNone	The table control’s data is not divided across pages. The paging panel is not displayed.
tptBottom	The table control’s data is divided across pages. The paging panel is displayed at the bottom of the control.
tptTop	The table control’s data is divided across pages.  The paging panel is displayed at the top of the control.
tptBoth	The table control’s data is divided across pages.  Two identical paging panels are displayed at the top and at the bottom of the control.


TcxWebTablePaging.Table

TcxWebTablePaging          See Also

Provides access to the owning table control.

property Table: TcxCustomWebTable;

Description

The Table property is used to access the owning table control.  This property is used to notify the table control of changes applied to its paging style.

ReadOnly Property


TcxWebTablePaging.Assign

TcxWebTablePaging          See Also

Assigns the contents of one TcxWebTablePaging object to another.

procedure Assign(Source: TPersistent); override;

Description

Use the Assign method to assign the contents of one TcxWebTablePaging object to another.  The Source parameter specifies the source object.  The caller is the destination object.


TcxWebTablePaging.Create

TcxWebTablePaging

Creates an instance of the TcxWebTablePaging class.

constructor Create(ATable: TcxCustomWebTable);

Description

The Create method is used to create and initialize a new instance of the TcxWebTablePaging class.  The ATable parameter specifies the owning table control.  The parameter value is assigned to the Table property.

Do not create instances of the TcxWebTablePaging class in applications.  This class is automatically instantiated by the owning table control to represent its Paging property.


TcxWebTableCellClick
TcxWebTableCellClick type

Specifies the type of table control events requiring cell coordinates to be specified.

Unit

cxWebTable

TcxWebTableCellClick = procedure(Sender: TObject; AColumn: TcxWebTableColumn; ARecIndex: Integer) of object;

Description

The cell is specified by the object representing its owner column and the index of owner row.  These values are transmitted as AColumn and ARecIndex parameters respectively.  The Sender parameter specifies the sender of the event.

Used for the OnCellClick event of the TcxWebTable control and OnCellClick event of the TcxWebDBTable control.


TcxWebTableColumnClick
TcxWebTableColumnClick type

Specifies the table control event types that require a column to be specified.

Unit

cxWebTable

TcxWebTableColumnClick = procedure(Sender: TObject; AColumn: TcxWebTableColumn) of object;

Description

The column is specified by the object representing it via the AColumn parameter.  The Sender parameter specifies the sender of the event.

Used for the OnColumnClick event of the TcxWebTable control.


TcxWebTableColumnSortMode
TcxWebTableColumnSortMode type

Contains values specifying sort order.

Unit

cxWebTable

TcxWebTableColumnSortMode = (tsmNone, tsmAscending, tsmDescending);

Description

TcxWebTableColumnSortMode contains values specifying value sort order.  Review the table below for the list of available values.

Value	Description
tsmNone	Specifies that sorting is not implemented.
tsmAscending	Specifies that sorting is in ascending order.
tsmDescending	Specifies that sorting is in descending order.

These values are used to set the TcxCustomWebTableColumn object’s SortMode property.


TcxWebTableColumViewType
TcxWebTableColumViewType type

Contains values specifying the type of data a table column displays.

Unit

cxWebTable

TcxWebTableColumViewType = (tvtText, tvtHyperText, tvtImage);

Description

TcxWebTableColumnViewType lists values specifying column content type.  These values are used to set the ViewType property of the TcxCustomWebTableColumn class.  Review the table below for a list of available values.

Value	Description
tvtText	The column displays text values.
tvtHyperText	The column displays hyperlinks.
tvtImage	The column displays images.


TcxWebTablePagingType
TcxWebTablePagingType type

Contains values specifying the position of the paging panel within the table control.

Unit

cxWebTable

TcxWebTablePagingType = (tptNone, tptBottom, tptTop, tptBoth);

Description

TcxWebTablePagingType lists values specifying the positioning of the paging panel within the table control.  These values are used to set the PagingType property of the TcxWebTablePaging class.  Review the table below for a list of available values.

Value	Description
tptNone	The paging panel is not displayed.
tptBottom	The paging panel is displayed at the bottom of the control.
tptTop	The paging panel is displayed at the top of the control.
tptBoth	Two identical paging panels are displayed at the top and at the bottom of the control.


ExpressWeb Framework Overview

Welcome to the world of ExpressWeb Framework - bringing RAD WYSIWYG web development to Delphi with the first integrated HTML designer for the Delphi 6 IDE. With ExpressWeb Framework, you are able to fully leverage your Delphi skills by using the same Property, Method, and Event model you've come to know within Delphi itself to build any website or web application.

Simply select web components (text box, label, image, grid, etc) from the palette - drop them onto the designer - set their properties - write the appropriate event handlers in ObjectPascal - compile and deploy to your favorite web server (review the ISAPI/NSAPI or Apache topics of this help system).

But EWF is not just about RAD or a simple Hello World web application - It encompasses a lot more - and here's why.

Rapid Web Application Development without control, flexibility, and power will in the end leave you wanting more - it will leave you searching for external tools to provide the final polish to go along with its ease of use. EWF's design objective is to circumvent this need - to give you the means with which to fully realize all your requirements when designing your website, web page and thin client application. After all, isn't that the reason you are using Delphi - ease of use, of course…but power, speed, and total control makes Delphi unique among RAD application development technologies…and so it is with EWF.

The Bottom Line - Why EWF should be added to your Web development arsenal...  The first built-in HTML designer and editor for Delphi 6 - Giving you and your team total control over page design and use of HTML elements, just like Visual Studio .NET.

•	The first tool of its kind to provide 3-way synchronization of dfm/pas/html files - No external files, thus providing you the power to change your application and never lose those changes.

•	Server Side Scripting - Flexibility to use your Delphi objects directly in JScript without the need to register any automation objects. Also, allows you to separate HTML generation logic from your business logic.

•	Superior Persistence - Power to control the module's state without the need to cache anything on the server so your web applications behave the way users expect them to behave…never restricting core browser functionality.

•	Advanced and Centralized Style Sheet Support - With its Style Controller technology, EWF makes it painless to deliver professional looking websites. Want to share styles among and between controls or even across modules, no problem - want advanced presentation styles such as hover effects, no problem.

•	A rich and evolving Component Set - Not just simple, since simple things can be done with even the simplest tools, but a well architected component set - again, the same richness you have come to expect from standard VCL controls…NOW targeting the web browser. From the most essential, like eliminating unnecessary round trips to the server via client side event handling to fully supporting JScripts and actions.

and so much more...

To help you get started with EWF, we’ve prepared a number of white papers and introductory material on the product and published them on our website. Please take the time to review these documents before exploring the References section of this help file.

http://www.devexpress.com/ewf_overview.asp


Deploying EWF Applications (ISAPI/NSAPI DLL)

Deploying ISAPI applications

In order to deploy an ISAPI application, you must first create an ISAPI/NSAPI Dynamic Link Library application.  This is done by creating a new EWF application and choosing the appropriate item for the Server Type combo box.

After the application is created you can either create and customize new modules or use those already generated.  You can also have any number of images and client script files related to the project.

The application should be built to generate your DLL file.

Use the Internet Services Manager to create a new virtual directory.  An alias, used to access it, should be assigned.  You then need to set the path to the files comprising your project.  This allows you to access the web application by specifying its alias instead of its physical address.

Set the access permissions for the newly created virtual directory.  We recommended that you set only read permission for your application.

Note that the physical path you’ve specified for the virtual directory should contain all the files required for application functionality.  These files must also be structured in such a manner that each of them can be accessed as specified by other’s references.  However this doesn’t include the native ExpressWeb Framework files (images and JScript codes).  These files should be located within the ExpressWeb Framework virtual directory.  This directory has to contain the Images and JS sub-folders containing images and JScript files respectively.

Modify the application settings of the virtual directory.  This includes creating the application and setting execute permissions to allow script and executable execution.

Specify the compiled DLL file as the default document for the web application.  This allows you to refer to the applications by specifying only the server name and the container virtual directory.  Otherwise you will need to specify the name of the compiled DLL when referring to the web application.

The only thing left is to invoke your web browser and type the name of the server together with the name of the specified virtual directory.  This will take you directly to the first page of the successfully deployed EWF application.


Deploying EWF Applications (Apache DLL)

Deployment of an Apache Shared Module web application on an Apache web server consists of the following steps:

•	Creating an Apache Shared Module web application in Delphi

•	Creating a valid directory structure on the remote web server

•	Configuring the Apache web server

Creating an Apache Shared Module web application

In order to deploy an Apache DLL application, you must first create an Apache Shared Module (DLL) application.  This is done by creating a new EWF application and choosing the appropriate item from the Server Type combo box.

Save your work.  Press the Ctrl + F12 key combination to select the main project module from the list of available modules in your project.  Find the following lines in this module:

exports

  apache_module name 'Project1_module';

begin

  Application.Initialize;

  Application.Run;

end.

You should define the ModuleName and ContentType global variables by setting them to the "project_name" and "project1-handler" values respectively and place the variables below the "begin".  Note the dash "-" symbol used for the ContentType variable’s value.  This is the common way of naming Apache handlers and we strongly recommend that you follow this rule.

Also be sure that you are using all lowercase characters in your .DPR file for the values associated with "apache_module name", "ModuleName", "ContentType" to get everything to work.  This is actually an Apache requirement.

Note:  You can use the additional mod_rewrite module (it is an official part of the Apache Web server from version 1.2) to change the letter case on the fly without the need to recompile your already deployed application.

What you should have at this point is listed below:

exports

  apache_module name 'project1_module';

begin

  ModuleName :='project1_module';

  ContentType := 'project1-handler';

  Application.Initialize;

  Application.Run;

end.

Save and compile your application.

Creating a valid directory structure on the remote web server

Create a new physical directory.  The alias used to access it, should be assigned.  You then need to set the path to the files comprising your project.  This allows you to access the web application by specifying its alias instead of its physical address.

Note that the physical path you’ve specified for the alias should contain all the files required for the application’s functionality.  These files must also be structured in such a manner that each of them can be accessed as specified by another’s references.  However this doesn’t include native ExpressWeb Framework files (images and JScript code).  These files should be located within the ExpressWeb Framework virtual directory.  This directory has to contain the Images and JS sub-folders containing images and JScript files, respectively.

Configuring the Apache web server

Stop the web server. You need add code to the Apache web server's httpd.conf configuration file.  The following sample configuration for the httpd.conf file instructs the Apache web server to activate your web application each time a client points to the URL which contains "/my_webapp" within it.

LoadModule project1_module "/path_to/cgi-bin/project1.dll"

<Location /my_webapp>

  SetHandler project1-handler

</Location>

Also, be sure to set up aliases for any folders you need within your application, such as an "images" folder:

Alias /images/ "D:/mywebapp/images/"
<Directory "D:/mywebapp/images/">
  AllowOverride None
  Options None
  Order allow,deny
  Allow from all
</Directory>

You will receive JavaScript errors if you do not include an alias for the EWF client service folder (adjust the directory path for your deployed location, and be sure the /JS and /Images subfolders are in there):

Alias "/ExpressWeb Framework/" "C:/Program Files/Developer Express Inc/ExpressWeb Framework/Delphi 6/Client/"
<Directory "C:/Program Files/Developer Express Inc/ExpressWeb Framework/Delphi 6/Client/">
  AllowOverride None
  Options None
  Order allow,deny
  Allow from all
</Directory>

For detailed information on configuring an Apache web server, please visit http://httpd.apache.org/docs/.

Start the Apache web server and if successfully started, enter the URL to your web server remembering to include "/my_webapp" at the end of the URL address.  This will take you directly to the first page of your successfully deployed EWF application.

Note: You should stop the Apache web server each time you debug your web application; otherwise Delphi reports an error as a result of not successfully saving any modifications that have been made to your web application's source.


EWF Component Class Structure

Click the link below to see the diagram illustrating the EWF component class structure.

Component Class Structure Diagram


EWF Component Class Structure

The picture below illustrates the class structure of EWF components and controls.  Click the desired class to invoke the corresponding help topic.


How To Get Support

The goal of our support team is to answer and alleviate any problems you might encounter when using our components.  Feel free to contact us should any tech support issues arise.

E-mail:

support@devexpress.com

You can send your suggestions, comments, complaints or good thoughts to:

suggest@devexpress.com

ExpressSupport Forum:

Visit the ExpressSupportForum at http://www.devexpress.com/dxforum to ask questions from our support team, find knowledge base articles on our components, tips and tricks, and a myriad of working samples with full source code.

Newsgroups:

news.devexpress.com

Please note that these newsgroups are peer-to-peer in nature.  Developer Express does not offer any formal support in any of its newsgroups.  Support is available using the ExpressSupport Forum and by writing to our support team at: support@devexpress.com.  Of course, Developer Express team members will be monitoring these newsgroups and assisting our users where applicable.


The Order of Web Modules Events

The image below shows the order of firing events for the TcxWebPageModule and TcxWebHomeDataModule classes.


Legend

 Protected

 Published

 ReadOnly


Implementors Overview

Implementors List

The ExpressWeb Framework enables you to edit templates of your web application’s modules.  Templates contain HTML code for the page together with EWF tags and server scripts.  Server scripts enable you to control HTML code generation.  You can substitute custom generated HTML code into the page, create conditions and loops for code generation, etc.  One of the most useful features in server scripts is the ability to access Delphi components and controls residing on a web page together with global objects, such as the current web context, request and response messages, etc.

Being able to reference public properties is easy via standard RTTI techniques.  Implementors have been provided in order to extend the access to non-published properties and methods.

Let’s consider a simple example of accessing a TDataSet descendant component from the server script.  (This example uses the TADOTable component.)

<html>

 <head>

  <title>Implementors Demo</title>

 </head>

 <body>

  <table cellpadding=5 border=1>

   <%while (!ADOTable1.Eof) {%>

    <tr>

      <td><%=ADOTable1.FieldByName("CategoryName").AsString%></td>

      <td><%=ADOTable1.FieldByName("Description").AsString%></td>

    </tr>

    <%ADOTable1.Next%>

   <%}%>

  </table>

 </body>

</html>

In the example above server scripts are used for two purposes.  The first is to iterate through dataset records.  The second is to obtain field values within the current record.  A table row is generated for each dataset record.  Two cells containing field values are rendered for each row.  The table displayed in the image below is rendered as the result.

Components or controls residing on the web module can be accessed in the way demonstrated above.  However, only published members are available by default.  Implementors are introduced to avoid this undesirable behavior.  Each implementor enables you to access public members of a particular class.  This is realized by declaring these members in the published section.  Note, that the published members of both a class and its implementor can be accessed via server scripts.  Thus, implementors extend the set of available members.

Each implementor has a method which returns the object to which access is provided.  Thus when assigning or reading a property value of an implementor, it is actually assigned to or read from the underlying object’s property.  If an implementor’s method is called, the underlying object’s method is actually executed.

There are two peculiarities of providing access to public members.

•	Methods cannot be published.  Therefore, events of the proper type are declared in the published section.  Methods of the underlying class serve as handlers for these events.  This enables you to access public methods in the usual way.

•	Properties with parameters are declared as methods (using event handlers also).  The method parameters match those of the property.

Please refer to the Implementors List topic for the list of implementors supplied by the ExpressWeb Framework.


TcxWebControl Implementor

Implementors overview           Implementors List

This implementor provides access to public members of the TcxWebControl class.  These members are accessible via server script for all TcxWebControl descendants.

Unit

cxWebDispImp

Member Name	Description

Methods

Hide	Provides access to the Hide method.
SetBounds	Provides access to the SetBounds method.
Show	Provides access to the Show method.


TcxWebContainerControl Implementor

Implementors overview           Implementors List

This implementor provides access to public members of the TcxWebContainerControl class.  These members are accessible via server script for all TcxWebContainerControl descendants.

Unit

cxWebDispImp

Member Name	Description

Methods

WebControlContainerCount	Provides access to the WebControlContainerCount property.
WebControlContainers	Provides access to the WebControlContainers property.
WebControlCount	Provides access to the WebControlCount property.
WebControls	Provides access to the WebControls property.


TcxWebPopupMenu Implementor

Implementors overview           Implementors List

This implementor provides access to the ItemByName method of the TcxWebPopupMenu control.

Unit

cxWebDispImp

Member Name	Description

Methods

ItemByName	Provides access to the ItemByName method.


TcxWebMainMenu Implementor

Implementors overview           Implementors List

This implementor provides access to the ItemByName method of the TcxWebMainMenu control.

Unit

cxWebDispImp

Member Name	Description

Methods

ItemByName	Provides access to the ItemByName method.


TcxWebMenuItem Implementor

Implementors overview           Implementors List

This implementor provides access to public members of the TcxWebMenuItem class.

Unit

cxWebDispImp

Member Name	Description

Properties

Count	Provides access to the Count property.
Index	Provides access to the Index property.
Parent	Provides access to the Parent property.
ParentMenu	Provides access to the ParentMenu method.

Methods

Add	Provides access to the Add method.
Clear	Provides access to the Clear method.
Delete	Provides access to the Delete method.
IndexOf	Provides access to the IndexOf method.
Insert	Provides access to the Insert method.
ItemByName	Provides access to the ItemByName method.
Items	Provides access to the Items property.
Remove	Provides access to the Remove method.


TcxWebTreeView Implementor

Implementors overview           Implementors List

This implementor provides access to public members of the TcxWebTreeView control.

Unit

cxWebDispImp

Member Name	Description

Methods

AddItem	Provides access to the AddItem method.
Clear	Provides access to the Clear method.
FullCollapse	Provides access to the FullCollapse method.
FullExpand	Provides access to the FullExpand method.
ItemByName	Provides access to the ItemByName method.
Items	Provides access to the Items property.


TcxWebTreeItem Implementor

Implementors overview           Implementors List

This implementor provides access to public members of the TcxWebTreeItem class.

Unit

cxWebDispImp

Member Name	Description

Properties

Count	Provides access to the Count property.
HasChildren	Provides access to the HasChildren property.
Index	Provides access to the Index property.
Level	Provides access to the Level property.
Parent	Provides access to the Parent property.
Expanded	Provides access to the Expanded property.
Hint	Provides access to the Hint property.
ImageIndex	Provides access to the ImageIndex property.
Name	Provides access to the Name property.
Text	Provides access to the Text property.
URL	Provides access to the URL property.

Methods

AddChild	Provides access to the AddChild method.
Collapse	Provides access to the Collapse method.
DeleteChildren	Provides access to the DeleteChildren method.
Expand	Provides access to the Expand method.
IndexOf	Provides access to the IndexOf method.
InsertChild	Provides access to the InsertChild method.
Items	Provides access to the Items property.


TcxCustomWebDataSource Implementor

Implementors overview           Implementors List

This implementor provides access to public members of the TcxCustomWebDataSource class.  These members are available via server script for all TcxCustomWebDataSource descendants.

Unit

cxWebDispImp

Member Name	Description

Properties

FocusedRowIndex	Provides access to the FocusedRowIndex property.
RecordCount	Provides access to the RecordCount property.
RowCount	Provides access to the RowCount property.

Methods

CancelEdit	Provides access to the CancelEdit method.
ClearGrouping	Provides access to the ClearGrouping method.
ClearSorting	Provides access to the ClearSorting method.
DeleteRecord	Provides access to the DeleteRecord method.
DisplayTexts	Provides access to the DisplayTexts property.
EditRecord	Provides access to the EditRecord method.
Expand	Provides access to the Expand method.
FieldByName	Provides access to the FieldByName method.
FullCollapse	Provides access to the FullCollapse method.
FullExpand	Provides access to the FullExpand method.
GetRowDisplayText	Provides access to the GetRowDisplayText method.
GetRowExpanded	Provides access to the GetRowExpanded method.
GetRowLevel	Provides access to the GetRowLevel method.
GetRowRecord	Provides access to the GetRowRecord method.
GetRowValue	Provides access to the GetRowValue method.
GetGroupingItemCount	Provides access to the GetGroupingItemCount method.
GetSortingItemCount	Provides access to the GetSortingItemCount method.
GetItemGroupIndex	Provides access to the GetItemGroupIndex method.
GetItemSortOrder	Provides access to the GetItemSortOrder method.
GetGroupingItemIndex	Provides access to the GetGroupingItemIndex method.
GetSortingItemIndex	Provides access to the GetSortingItemIndex method.
Group	Provides access to the Group method.
InsertRecord	Provides access to the InsertRecord method.
PostEdit	Provides access to the PostEdit method.
Refresh	Provides access to the Refresh method.
SetEditValue	Provides access to the SetEditValue method.
Sort	Provides access to the Sort method.
UnGroup	Provides access to the UnGroup method.
Values	Provides access to the Values property.


TcxWebDBGrid Implementor

Implementors overview           Implementors List

This implementor provides access to public members of the TcxWebDBGrid control.

Unit

cxWebDispImp

Member Name	Description

Properties

ColumnCount	Provides access to the ColumnCount property.
FirstVisibleRow	Provides access to the FirstVisibleRow property.
FocusedRow	Provides access to the FocusedRow property.
RecordCount	Provides access to the RecordCount property.
RowCount	Provides access to the RowCount property.

Methods

Add	Provides access to the Add method.
CanCreateDefaultColumns	Provides access to the CanCreateDefaultColumns method.
Clear	Provides access to the Clear method.
ColumnByName	Provides access to the ColumnByName method.
Columns	Provides access to the Columns property.
CreateDefaultColumns	Provides access to the CreateDefaultColumns method.
Delete	Provides access to the Delete method.
GetGroupingItemCount	Provides access to the GetGroupingItemCount method.
GetGroupingItemIndex	Provides access to the GetGroupingItemIndex method.
GetItemGroupIndex	Provides access to the GetItemGroupIndex method.
GetItemSortOrder	Provides access to the GetItemSortOrder method.
GetRowDisplayText	Provides access to the GetRowDisplayText method.
GetRowExpanded	Provides access to the GetRowExpanded method.
GetRowLevel	Provides access to the GetRowLevel method.
GetRowRecord	Provides access to the GetRowRecord method.
GetRowValue	Provides access to the GetRowValue method.
GetSortingItemCount	Provides access to the GetSortingItemCount method.
GetSortingItemIndex	Provides access to the GetSortingItemIndex method.
IndexOf	Provides access to the IndexOf method.


TcxWebStyleController Implementor

Implementors overview           Implementors List

This implementor provides access to public members of the TcxWebStyleController component.

Unit

cxWebDispImp

Member Name	Description

Properties

Count	Provides access to the Count property.

Methods

Add	Provides access to the Add method.
Clear	Provides access to the Clear method.
Delete	Provides access to the Delete method.
IndexOf	Provides access to the IndexOf method.
ItemByName	Provides access to the ItemByName method.
Items	Provides access to the Items property.


TDataSet Implementor

Implementors overview           Implementors List

This implementor provides access to public members of the TDataSet class.  These members are available via server script for all TDataSet descendants.

Unit

cxScriptDBImpl

Member Name	Description

Properties

Bof	Provides access to the Bof property.
CanModify	Provides access to the CanModify property.
Eof	Provides access to the Eof property.
FieldCount	Provides access to the FieldCount property.
Fields	Provides access to the Fields property.
IsUniDirectional	Provides access to the IsUniDirectional property.
Modified	Provides access to the Modified property.
RecNo	Provides access to the RecNo property.
RecordCount	Provides access to the RecordCount property.

Methods

Append	Provides access to the Append method.
Cancel	Provides access to the Cancel method.
CheckBrowseMode	Provides access to the CheckBrowseMode method.
ClearFields	Provides access to the ClearFields method.
Close	Provides access to the Close method.
Delete	Provides access to the Delete method.
Edit	Provides access to the Edit method.
FieldByName	Provides access to the FieldByName method.
FindField	Provides access to the FindField method.
First	Provides access to the First method.
GetFieldNames	Provides access to the GetFieldNames method.
Insert	Provides access to the Insert method.
IsEmpty	Provides access to the IsEmpty method.
Last	Provides access to the Last method.
MoveBy	Provides access to the MoveBy method.
Next	Provides access to the Next method.
Open	Provides access to the Open method.
Post	Provides access to the Post method.
Prior	Provides access to the Prior method.
Refresh	Provides access to the Refresh method.


TField Implementor

Implementors overview           Implementors List

This implementor provides access to public members of the TField class.  These members are available via server script for all TField descendants.

Unit

cxScriptDBImpl

Member Name	Description

Properties

AsBoolean	Provides access to the AsBoolean property.
AsCurrency	Provides access to the AsCurrency property.
AsDateTime	Provides access to the AsDateTime property.
AsFloat	Provides access to the AsFloat property.
AsInteger	Provides access to the AsInteger property.
AsString	Provides access to the AsString property.
AsVariant	Provides access to the AsVariant property.
CanModify	Provides access to the CanModify property.
CurValue	Provides access to the CurValue property.
DataSet	Provides access to the DataSet property.
DataSize	Provides access to the DataSize property.
DataType	Provides access to the DataType property.
DisplayName	Provides access to the DisplayName property.
DisplayText	Provides access to the DisplayText property.
FieldNo	Provides access to the FieldNo property.
FullName	Provides access to the FullName property.
IsIndexField	Provides access to the IsIndexField property.
IsNull	Provides access to the IsNull property.
Lookup	Provides access to the Lookup property.
NewValue	Provides access to the NewValue property.
OldValue	Provides access to the OldValue property.
Size	Provides access to the Size property.
Text	Provides access to the Text property.
Value	Provides access to the Value property.

Methods

Clear	Provides access to the Clear method.
IsValidChar	Provides access to the IsValidChar method.


TStrings Implementor

Implementors overview           Implementors List

This implementor provides access to public members of the TStrings class.

Unit

cxScriptDispImpl

Member Name	Description

Properties

Count	Provides access to the Count property.

Methods

Append	Provides access to the Append method.
Add	Provides access to the Add method.
Delete	Provides access to the Delete method.
IndexOf	Provides access to the IndexOf method.
Clear	Provides access to the Clear method.
Values	Provides access to the Values property.


HTML Page Implementor

Implementors overview           Implementors List

This implementor provides access to properties affecting a web page (properties of the TWebPageInfo class).

Unit

cxWebGlobalDispImp

Member Name	Description

Properties

Description	Provides access to the PageDescription property.
HasViewAccess	Provides access to the HasViewAccess property.
Href	Provides access to the PageHREF property.
IsPublished	Provides access to the PageIsPublished property.
LoginRequired	Provides access to the LoginRequired property.
Name	Provides access to the PageName property.
Title	Provides access to the PageTitle property.


TWebContext Implementor

Implementors overview           Implementors List

This implementor provides access to public members of the TWebContext class.

Unit

cxWebGlobalDispImp

Member Name	Description

Properties

Page	Provides access to the current web page.  The return value of this property is represented by the HTML page implementor.
PageCount	Provides access to the PageCount property.
Request	Provides access to the current request message.  The return value of this property is represented by the TWebRequest implementor.
Session	Provides access to the current session.  The return value of this property is represented by the TcxWebSession implementor.
WebModuleCount	Gets the number of web modules that can be accessed via the WebModules property.

Methods

Pages	Provides indexed access to pages of the web application.  Returned pages are represented by HTML page implementors.
WebModules	Provides indexed access to modules of the web application.  Returned web modules are represented by TcxWebPageModule implementors.


TWebResponse Implementor

Implementors overview           Implementors List

This implementor provides access to public members of the TWebResponse class.

Unit

cxWebGlobalDispImp

Member Name	Description

Properties

Content	Provides access to the Content property.

Methods

Write	Writes the specified string into the HTML code of the page.  The string to be rendered is passed as the parameter.
WriteItem	Writes the specified HTML block into the code of the page.  The index of the block to be rendered is passed as the parameter. Note: blocks are parts of the HTML code which are separated by server script tags.  Thus the number of blocks is always one greater than the number of server script tags on the page.


TWebRequest Implementor

Implementors overview           Implementors List

This implementor provides access to public members of the TWebRequest class.

Unit

cxWebGlobalDispImp

Member Name	Description

Properties

Accept	Provides access to the Accept property.
Authorization	Provides access to the Authorization property.
CacheControl	Provides access to the CacheControl property.
Connection	Provides access to the Connection property.
Content	Provides access to the Content property.
ContentEncoding	Provides access to the ContentEncoding property.
ContentFields	Provides access to the ContentFields property.
ContentLength	Provides access to the ContentLength property.
ContentType	Provides access to the ContentType property.
ContentVersion	Provides access to the ContentVersion property.
Cookie	Provides access to the Cookie property.
CookieFields	Provides access to the CookieFields property.
Date	Provides access to the Date property.
DerivedFrom	Provides access to the DerivedFrom property.
Expires	Provides access to the Expires property.
From	Provides access to the From property.
Host	Provides access to the Host property.
InternalPathInfo	Provides access to the InternalPathInfo property.
InternalScriptName	Provides access to the InternalScriptName property.
Method	Provides access to the Method property.
PathInfo	Provides access to the PathInfo property.
PathTranslated	Provides access to the PathTranslated property.
ProtocolVersion	Provides access to the ProtocolVersion property.
Query	Provides access to the Query property.
QueryFields	Provides access to the QueryFields property.
Referer	Provides access to the Referer property.
RemoteAddr	Provides access to the RemoteAddr property.
RemoteHost	Provides access to the RemoteHost property.
ScriptName	Provides access to the ScriptName property.
ServerPort	Provides access to the ServerPort property.
Title	Provides access to the Title property.
URL	Provides access to the URL property.
UserAgent	Provides access to the UserAgent property.


TcxWebSession Implementor

Implementors overview           Implementors List

This implementor provides access to public members of the TcxWebSession class.

Unit

cxWebGlobalDispImp

Member Name	Description

Properties

ID	Provides access to the SessionID property.
Timeout	Provides access to the TimeoutMinutes property.

Methods

GetValue	Provides read-only access to the Values property.
SetValue	Provides write-only access to the Values property.
Terminate	Provides access to the Terminate method.


TcxWebSessions Implementor

Implementors overview           Implementors List

This implementor provides access to public members of the TcxWebSessions class.

Unit

cxWebGlobalDispImp

Member Name	Description

Properties

Count	Provides access to the Count property.

Methods

Items	Provides access to the Items property.  This enables you to obtain a session by its index.  The returned value is represented by the TcxWebSessionItem implementor.


TcxWebSessionItem Implementor

Implementors overview           Implementors List

This implementor provides access to public members of the TcxWebSessionItem class.

Unit

cxWebGlobalDispImp

Member Name	Description

Properties

Expired	Provides access to the Expired property.
ExpTime	Provides access to the ExpTime property.
ID	Provides access to the ID property.
IsActive	Provides access to the IsActive property.
LastTouchTime	Provides access to the LastTouchTime property.
StartTime	Provides access to the StartTime property.
Status	Provides access to the Status property.
Terminated	Provides access to the Terminated property.
TimeoutMinutes	Provides access to the TimeoutMinutes property.


TcxWebPageModule Implementor

Implementors overview           Implementors List

This implementor provides access to public members of the TcxWebPageModule class and auxiliary global functions.

Unit

cxWebGlobalDispImp

Member Name	Description

Properties

IsFirstRequest	Provides access to the IsFirstRequest property.

Methods

CreateComponent	Enables you to create a new component on the page module.  The desired component type is passed to this method as a string parameter.
FindGlobalComponent	Provides access to the FindGlobalComponent global function.


Implementors List

Implementors overview

Consider the table below for the list of implementors provided by the ExpressWeb Framework.  The Implementor column contains links to topics that list members provided by implementors.

Implementor	Description	Access method

Delphi Objects

TDataSet Implementor	Provides access to public members of TDataSet descendants.	Use the name of the desired dataset component.
TField Implementor	Provides access to public members of TField descendants.	Use properties or methods of the owning dataset object.
TStrings Implementor	Provides access to public members of TStrings objects.	Accessible via properties of the TStrings type.

EWF Objects

TcxWebMenuItem Implementor	Provides access to public members of TcxWebMenuItem objects.	Use properties and methods of either a TcxWebMainMenu or TcxWebPopupMenu control.
TcxWebTreeItem Implementor	Provides access to public members of TcxWebTreeItem objects.	Use properties and methods of the TcxWebTreeView control.

EWF Controls and Components

TcxWebControl Implementor	Provides access to public methods inherited from the TcxWebControl class.	Declared members are accessible in all TcxWebControl descendants.
TcxWebContainerControl Implementor	Provides access to public methods inherited from the TcxWebContainerControl class.	Declared members are accessible in all TcxWebContainerControl descendants.
TcxWebPopupMenu Implementor	Provides access to the ItemByName method of the TcxWebPopupMenu control.	Use the name of the desired TcxWebPopupMenu control.
TcxWebMainMenu Implementor	Provides access to the ItemByName method of the TcxWebMainMenu control.	Use the name of the desired TcxWebMainMenu control.
TcxWebDBGrid Implementor	Provides access to public members of the TcxWebDBGrid control.	Use the name of the desired TcxWebDBGrid control.
TcxWebTreeView Implementor	Provides access to public members of the TcxWebTreeView control.	Use the name of the desired TcxWebTreeView control.
TcxWebStyleController Implementor	Provides access to public members of the TcxWebStyleController component.	Use the name of the desired TcxWebStyleController component.
TcxCustomWebDataSource Implementor	Provides access to public members of data source components (TcxCustomWebDataSource descendants).	Use the name of the desired data source component.

Global objects

TcxWebSession Implementor	Provides access to public members of the TcxWebSession object representing the current session	Use the Session property of the TWebContext implementor.
TcxWebSessions Implementor	Provides access to public members of the TcxWebSessions object representing the collection of currently maintained sessions.	Use the Sessions keyword.
TcxWebSessionItem Implementor	Provides access to public members of the TcxWebSessionItem object representing a session being maintained by your application.	Use properties and methods of the TcxWebSessions implementor.
TWebRequest Implementor	Provides access to public members of the TWebRequest object representing the current request message.	Use the Request keyword.
TWebResponse Implementor	Provides access to public members of the TWebResponse object representing the current response message.	Use the Response keyword.
TWebContext Implementor	Provides access to public members of the TWebContext object that provides information on the current state of a web application.	Use the Context keyword.
HTML Page Implementor	Provides access to an HTML page properties.	Use the Page or Pages property of the TWebContext implementor.
TcxWebPageModule Implementor	Provides access to public members of TcxWebPageModule objects.	Use the Form keyword or the WebModules property of the TWebContext implementor.


cxWebPathConst Unit Overview
cxWebPathConst Unit

Global Variables

cxWebImageDTPath

cxWebImagePath

cxWebJScriptDTPath

cxWebJSScriptPath


cxWebImageDTPath variable
cxWebImageDTPath global variable

Specifies the local path to images used by EWF controls.

Unit

cxWebPathConst

cxWebImageDTPath: string = 'Client\Images';

Description

The cxWebImageDTPath global variable specifies the local path to images used by EWF controls.  These images are, for instance, buttons’ glyphs of the TcxWebDBDataNavigator control.  The path is set relative to the folder containing EWF installation files.  Very often this folder is C:\Program Files\Developer Express Inc\ExpressWeb Framework\Delphi6.

This global variable’s value is used by EWF designers and Web App Debugger to locate image files used by controls.  You should change this variable’s value and recompile the EWF suite to obtain images from another folder.

The local path to client scripts used by EWF controls is specified by the cxWebJScriptDTPath global variable.  Paths used to locate images and script files, when running an application on a web server, are specified by the cxWebImagePath and cxWebJSScriptPath global constants respectively.


cxWebImagePath variable
cxWebImagePath global variable

Specifies the web server’s path to images used by EWF controls.

Unit

cxWebPathConst

cxWebImagePath: string = '/ExpressWeb%20Framework/Images/';

Description

The cxWebImagePath global variable specifies the web server’s path to images used by EWF controls.  It is required to provide proper functionality of EWF controls when an application is running on a web server.  The images located at this path are, for instance, buttons’ glyphs of the TcxWebDBDataNavigator control.  The path is set relative to the root folder of the web server.

You should change this variable’s value and recompile the EWF suite to obtain images from another folder.

A web server’s path to client scripts used by EWF controls is specified by the cxWebJSScriptPath global variable.  Local paths to images and script files are specified by the cxWebImageDTPath and cxWebJScriptDTPath global constants respectively.


cxWebJScriptDTPath variable
cxWebJScriptDTPath global variable

Specifies the local path to client scripts used by EWF controls.

Unit

cxWebPathConst

cxWebJScriptDTPath: string = 'Client\JS';

Description

The cxWebJScriptDTPath global variable specifies the local path to the JScript files containing client scripts used by EWF controls.  These are, for instance, scripts required to provide functionality of the TcxWebTreeView control at the client side of applications.  The path is set relative to the folder containing EWF installation files.  In most cases this folder is C:\Program Files\Developer Express Inc\ExpressWeb Framework\Delphi6.

This global variable’s value is used by EWF designers and Web App Debugger to locate JScript files used by controls.  You should change this variable’s value and recompile the EWF suite to obtain client scripts from another folder.

The local path to images used by EWF controls is specified by the cxWebImageDTPath global variable.  Paths used to locate images and script files, when running an application on a web server, are specified by the cxWebImagePath and cxWebJSScriptPath global constants respectively.


cxWebJSScriptPath variable
cxWebJSScriptPath global variable

Specifies the web server’s path to client scripts used by EWF controls.

Unit

cxWebPathConst

cxWebJSScriptPath : string = '/ExpressWeb%20Framework/JS/';

Description

The cxWebJSScriptPath global variable specifies the web server’s path to the JScript files containing client scripts used by EWF controls.  It is required to provide proper functionality of EWF controls when an application is running on a web server.  The client scripts located at this path are, for instance, scripts required to provide functionality of the TcxWebTreeView control at the client side of applications.  The path is set relative to the root folder of the web server.

You should change this variable’s value and recompile the EWF suite to obtain client script files from another folder.

The web server’s path to images used by EWF controls is specified by the cxWebImagePath global variable.  Local paths to images and script files are specified by the cxWebImageDTPath and cxWebJScriptDTPath global constants respectively.


cxWebSess Unit Overview
cxWebSess Unit

Classes

EcxWebSessionsException

TcxWebErrorSession

TcxWebSession

TcxWebSessionItem

TcxWebSessions

Other Types

TcxWebSessionStatus

Global Variables

cxWebSessions


EcxWebSessionsException
EcxWebSessionsException Object

Hierarchy          See Also

Represents an exception class for session errors.

Unit

cxWebSess

EcxWebSessionsException = class(EWebBrokerException)

Description

An exception of the EcxWebSessionsException type is raised in the following cases:

•	•	when attempting to create a number of sessions exceeding the home data module’s MaxSessions property value.  The ‘Sessions limit is exceeded’ message is displayed;

•	•	when a property of an error session is accessed or its method is called.  Error sessions are represented by TcxWebErrorSession objects and are created if an error occurred when creating a session.


EcxWebSessionsException Hierarchy
Hierarchy

EWebBrokerException


TcxWebErrorSession
TcxWebErrorSession Object

Hierarchy          Properties          Methods          See Also

Represents an invalid session.

Unit

cxWebSess

TcxWebErrorSession = class(TAbstractWebSession)

Description

You can limit the number of sessions that can be run simultaneously via the MaxSessions property of the TcxWebHomeDataModule object representing your home data module.  There cannot be more sessions at a time than that specified by this property.  When an attempt is made to exceed this limit by creating one more session, an error session is created.  It is represented by an instance of the TcxWebErrorSession class.  Note that an error session can also be created if the TcxWebSession class’s constructor fails.

The TcxWebErrorSession class acts as a placeholder, so that the EWF application does not need to raise an exception when an attempt to create an active session fails.  When an error session is created, it receives a message string of the particular error, which was responsible for its creation.  Trying to access properties or call methods of an error session raises the EcxWebSessionsException exception with the appropriate message string.


TcxWebErrorSession Hierarchy
Hierarchy

TAbstractWebSession


Properties for TcxWebErrorSession
TcxWebErrorSession Properties

TcxWebSession          Legend

In TcxWebSession

SessionID

TimeoutMinutes

Values


Methods for TcxWebErrorSession
TcxWebErrorSession Methods

TcxWebErrorSession          Legend

In TcxWebErrorSession

Create

Terminate

UpdateResponse


TcxWebErrorSession.SessionID

TcxWebSession          See Also

Raises an EcxWebSessionsException exception.

property SessionID: string;

Description

Attempts to read the SessionID property raise an EcxWebSessionsException exception.  The TcxWebErrorSession object does not have a session ID because it does not represent any active session.

ReadOnly property


TcxWebErrorSession.TimeoutMinutes

TcxWebSession          See Also

Raises an EcxWebSessionsException exception.

property TimeoutMinutes: Integer;

Description

Attempts to read or write the TimeoutMinutes property raise an EcxWebSessionsException exception.  The TcxWebErrorSession object does not have a timeout period because it does not represent any active session.


TcxWebErrorSession.Values

TcxWebSession          See Also

Raises an EcxWebSessionsException exception.

property Values[const AName: string]: Variant;

Description

Attempts to read or write the Values property raise an EcxWebSessionsException exception.  The TcxWebErrorSession object does not store any named values because it does not represent any active session.


TcxWebErrorSession.Create

TcxWebErrorSession

Creates an instance of the TcxWebErrorSession class.

procedure Create(const AMessage: string);

Description

The Create method instantiates a new TcxWebErrorSession object.  Such objects are created automatically when the allowable number of sessions is exceeded or the TcxWebSession class’s constructor fails.

The AMessage parameter specifies the error message of the exception, which caused the TcxWebErrorSession object creation.  This message is used for any EcxWebSessionsException exception which the TcxWebErrorSession object raises.


TcxWebErrorSession.Terminate

TcxWebErrorSession          See Also

Raises an EcxWebSessionsException exception.

procedure Terminate; override;

Description

Attempts to call the Terminate method raise an EcxWebSessionsException exception.  The TcxWebErrorSession object does not represent an active session, so it cannot terminate it.


TcxWebErrorSession.UpdateResponse

TcxWebErrorSession          See Also

Called in order to include a session ID in the response message.

procedure UpdateResponse(AResponse: TWebResponse); override;

Description

The UpdateResponse method is called automatically to add a session ID to the response message.  As implemented in the TcxWebErrorSession class, this method performs nothing.  The reason is that the TcxWebErrorSession object does not have a session ID since it does not represent any active session.


TcxWebSession
TcxWebSession Object

Hierarchy          Properties          Methods          See Also

Represents a session in EWF applications.

Unit

cxWebSess

TcxWebSession = class(TAbstractWebSession)

Description

Multiple users can make use of your EWF web application at the same time.  Thus the information about each user needs to be stored.  Such information is stored by session objects, which are maintained for each user of the application.  You can access the current user’s session via the Session property of TcxCustomWebDataModule descendants.  It returns a value of the TcxWebSession type.  Note that you can also access the TWebSession object representing the active session via the WebContext global function.

A web session has an ID and a list of name/value pairs.  The ID is an automatically generated number which uniquely identifies the session.  It can be accessed via the session’s SessionID property.  The name/value pairs are used to associate information with the ID.  Values are variants.  You can use these Variants to store application-defined information which is associated with a single user.  In this way, the information can be preserved over multiple calls from the same user.  Use the Values property to get or set Variants.

The manner in which session IDs are transferred to EWF applications depends on the home data module’s UseCookie property value.  If it is set to True, session IDs are transferred using a cookie.  Otherwise, session IDs are encoded and transmitted within a URL.  When a session ID is received, it is examined by the application.  If a session associated with this ID exists, it is restored, otherwise a new session is created.

There is no need to instantiate session objects. A TcxWebSession instance is created automatically when the EWF application receives an HTTP request message.

When the current session is terminated, its session ID and name/value pairs are discarded.  For example, the current session is typically terminated when a user logs out.  Sessions can also be terminated when they are not accessed within a specified timeout period specified by the TimeoutMinutes property.  You can also terminate a session explicitly via calling the Terminate method.  If a session has been terminated, a new session is created for the next request.

You can limit the number of sessions that can be run simultaneously via the MaxSessions property of the TcxWebHomeDataModule object representing your home data module.  There cannot be more sessions than that specified by this property.  In case there is an attempt to create an extra session, an error session is created.  It is represented by an instance of the TcxWebErrorSession class.  Trying to call any method of such objects raises an exception.  Note that an error session can also be created if the TcxWebSession class’s constructor fails.


TcxWebSession Hierarchy
Hierarchy

TAbstractWebSession


Properties for TcxWebSession
TcxWebSession Properties

TcxWebSession          Legend

In TcxWebSession

SessionID

TimeoutMinutes

Values


Methods for TcxWebSession
TcxWebSession Methods

TcxWebSession          Legend

In TcxWebSession

Create

Terminate

UpdateResponse


TcxWebSession.SessionID

TcxWebSession          See Also

Gets a string value uniquely identifying a session.

property SessionID: string;

Description

The SessionID property is used by your application to identify a session.  If the application receives the first request from a user, this property’s value is set to an automatically generated unique string.  This string is added to response messages.

The manner in which session IDs are transferred to EWF applications depends on the home data module’s UseCookie property value.  If it is set to True, session IDs are transferred using a cookie.  Otherwise, they are encoded and transmitted within a URL.  When a session ID is received, it is examined by the application.  If a session associated with this ID exists, it restored, otherwise a new session is created.

When a request message reaches the application, every currently maintained session is examined first.  If no requests were received from a user for a period of time specified by the TimeoutMinutes property, the corresponding session is terminated.  As soon as this user sends a request next time, a new session is created.

ReadOnly property


TcxWebSession.TimeoutMinutes

TcxWebSession          See Also

Specifies the time in minutes for which a session can be idle before it is terminated.

property TimeoutMinutes: Integer;

Description

Each time a request for a session is received, the session’s request time is stored.  When a request message (no matter from which user) is received, all currently maintained sessions are examined by the application.  If the difference between the session’s last request time and the current time is greater than the TimeoutMinutes property value, the session is terminated.

Note that after the session’s timeout has expired, a request from the same user will force the application to generate a new session.  The stored values of the previous session will be cleared first though.

The default value of the TimeoutMinutes property is specified by the DefaultTimeout property of the TcxWebHomeDataModule object representing your home data module.  The default value of this property is 20.


TcxWebSession.Values

TcxWebSession          See Also

Lists the named values a session stores.

property Values[const AName: string]: Variant;

Description

Use the Values property to get or set information a specific session stores.  Since sessions are associated with individual users, this information typically represents information about a user or choices he/she makes.  The Values property can be used to implement application-specific tasks, such as saving user preferences or maintaining a list of user selections.

The AName parameter specifies the name of the value being accessed or specified.  When assigning to the Values property, use the previously unused AName parameter value to add a name/value pair to the list.  Specifying the previously used AName parameter value will result in changing the value corresponding to the name specified.  Reading the Values property when a previously unused AName parameter value is specified will return the Unassigned value.

The Values property is empty and doesn’t contain any name/value pairs when a session is created.


TcxWebSession.Create

TcxWebSession          See Also

Creates an instance of the TcxWebSession class.

Overloaded Variants

procedure Create(ASessionsService: IcxWebSessionsService; ARequest: TWebRequest; AResponse: TWebResponse);

procedure Create(ASessionsService: IcxWebSessionsService; ASessionID: string);

Description

The Create method is used to instantiate a TcxWebSession object.  The ASessionsService parameter specifies the object controlling sessions in an application.  This is the only common parameter for method overloads.

The first overload of the constructor is used to create a session object when the current user’s session does not exist (it is the first request of this user or the previous session expired).  The ARequest and AResponse parameters specify the current request and response objects respectively.  If this overload is used, a new unique value will be generated for the SessionID property.

The second overload is used to recreate an existing session.  The ASessionID parameter specifies the session’s identifier.  This value is assigned to the SessionID property.  This can be used to get the TcxWebSession object representing a currently inactive session (which are normally represented by TcxWebSessionItem objects).  Specifying a session ID is enough in such a case, since the TcxWebSession object’s property values are read /written via properties of the corresponding TcxWebSessionItem object.  Such recreated session objects are passed to OnSessionStart and OnSessionEnd events of the home data module.

Do not create instances of the TcxWebSession object in applications.  Sessions are created automatically.


TcxWebSession.Terminate

TcxWebSession          See Also

Terminates a session.

procedure Terminate; override;

Description

Use the Terminate method to terminate a session.  Once a session is terminated, all the values it stores will be deleted and thus can no longer be accessed.

Sessions can also be terminated automatically.  This occurs if no requests have been received from a user for a time period greater than that specified by the TimeoutMinutes property.


TcxWebSession.UpdateResponse

TcxWebSession          See Also

Includes a session ID in the response message.

procedure UpdateResponse(AResponse: TWebResponse); override;

Description

The UpdateResponse method is used to write a session ID to the response message.  The AResponse parameter specifies the response object to which the session ID is written.  The session identifier is specified by the SessionID property.

The manner in which session IDs are transferred to a client depends on the home data module’s UseCookie property value.  If this property’s value is True, IDs are added to one of the response message’s cookies.  Otherwise, they are encoded and included in a URL.

Writing a session ID to the response message allows the client side of your application to transmit it back to the server.  This is used to identify the previously created session and provide access to its stored values.


TcxWebSessionItem
TcxWebSessionItem Object

Hierarchy          Properties          Methods          See Also

Represents an item of the current sessions collection.

Unit

cxWebSess

TcxWebSessionItem = class(TObject)

Description

Multiple users can make use of your EWF web application at the same time.  Thus information on each user needs to be stored.  Such information is stored by session objects, which are maintained for each user of the application.

All currently maintained sessions can be accessed via the cxWebSessions global variable.  A TcxWebSessions object represents its value.  This object stores a collection of items maintaining the information for a particular session.  These items are represented by TcxWebSessionItem class instances.

You can also access the current user’s session via the Session property of TcxCustomWebDataModule descendants.  This property returns a value of the TcxWebSession type.  Note that you can also access the TWebSession object representing the active session via the WebContext global function.

The TcxWebSessionItem class provides more information about a session than the TcxWebSession class.  The reason is that the TcxWebSessionItem class can represent both active and inactive sessions.  In addition, the TcxWebSession class uses properties and methods of the corresponding TcxWebSessionItem object to manage the current user’s session.


TcxWebSessionItem Hierarchy
Hierarchy

TObject


Properties for TcxWebSessionItem
TcxWebSessionItem Properties

TcxWebSessionItem          Legend

In TcxWebSessionItem

Expired

ExpTime

ID

IsActive

Items

LastTouchTime

StartTime

Status

Terminated

TimeoutMinutes


Methods for TcxWebSessionItem
TcxWebSessionItem Methods

TcxWebSessionItem          Legend

In TcxWebSessionItem

Create

Destroy


TcxWebSessionItem.Expired

TcxWebSessionItem          See Also

Specifies whether a session has exceeded its time limit.

property Expired: Boolean;

Description

Each session can be idle no longer than that specified by its TimeoutMinutes property.  Thus, if no requests were received from a user for a period longer than that specified by this property, the session will be expired.  Expired sessions are terminated.  The next time a request is received from the same user, a completely new session is created.

The Expired property specifies whether a session has exceeded its time limit.  If this property is set to True, the wssTerminating value is assigned to the Status property.  This means, the session is marked to be terminated.  The Expired property value is recalculated for all sessions each time a request is received by the application for any session.


TcxWebSessionItem.ExpTime

TcxWebSessionItem          See Also

Gets a value indicating the expiry time for a session.

property ExpTime: TDateTime;

Description

Each session can be idle no longer than that specified by its TimeoutMinutes property.  Thus, if no requests were received from a user for a period longer than that specified by this property, the session will be expired.  Expired sessions are terminated.  The next time a request is received from the same user, a completely new session is created.

The ExpTime property is calculated as the sum of the last request for this session and the session’s timeout.  They are represented by the LastTouchTime and TimeoutMinutes properties respectively.  If the current time exceeds the ExpTime property value, the session will be terminated.

ReadOnly Property


TcxWebSessionItem.ID

TcxWebSessionItem          See Also

Gets a string value uniquely identifying a session.

property ID: string;

Description

Session IDs are used by applications to identify a session.  They are represented by the ID property.  If an application receives the first request from a user, the session ID will be set to an automatically generated unique string.  This string is added to response messages.

The manner in which session IDs are transferred to EWF applications depends on the home data module’s UseCookie property value.  If it is set to True, session IDs are transferred to EWF applications using a cookie.  Otherwise, they are encoded and transmitted within a URL.  When a session ID is received, it is examined by the application.  If a session associated with this ID exists, it is restored, otherwise a new session is created.

When a request message reaches an application, every currently maintained session is examined.  If no requests were received from a user for a period specified by the TimeoutMinutes property, the corresponding session is terminated.  As soon as this user sends a further request, a new session is created.

ReadOnly Property


TcxWebSessionItem.IsActive

TcxWebSessionItem          See Also

Returns a value indicating whether a session is active.

property IsActive: Boolean;

Description

Once a session is started it becomes active.  When it has been expired or terminated, it is inactive.  The IsActive property allows you to distinguish between active and inactive sessions.  If this property’s value is True, the session is currently active, or it is about to be terminated.

You can access the number of currently active sessions via the ActiveCount property of the TcxWebSessions object.

ReadOnly Property


TcxWebSessionItem.Items

TcxWebSessionItem          See Also

Lists the named values stored by a session.

property Items: TcxWebNamedVariants;

Description

Use the Items property to get or set the information a session stores.  Since sessions are associated with individual users, this information typically represents information about a user or the choices he/she has made.  The Items property can be used to implement application-specific tasks, such as saving user preferences or maintaining a list of user selections.

The Items property is represented by a TcxWebNamedVariants class instance.  This object provides access to the names’ and values’ collection.  You can also access a value by its name.  Use the methods of the TcxWebNamedVariants class’s methods to manage items in the collection.

Note that the Items property is used by the corresponding TcxWebSession object to return its Values property value.

The Items property is empty and doesn’t contain any name/value pairs when a session is created.


TcxWebSessionItem.LastTouchTime

TcxWebSessionItem          See Also

Specifies the time of receiving the last request for a specific session.

property LastTouchTime: TDateTime;

Description

Each session can be idle no longer than that specified by its TimeoutMinutes property.  Thus, if no requests were received from a user for a period longer than that specified by this property, the session will be expired.  Expired sessions are terminated.  Next time a request is received from the same user, a completely new session is created.

The expiry time for a session is calculated as a sum of the last request time and the TimeoutMinutes property value.  The last request time is written to the LastTouchTime property each time a request is received.


TcxWebSessionItem.StartTime

TcxWebSessionItem

Specifies the session’s start time.

property StartTime: TDateTime;

Description

Use the StartTime property to access the time a session was started.  This property value doesn’t affect session expiring.  Sessions are expired only if idle for longer than the TimeoutMinutes property value.


TcxWebSessionItem.Status

TcxWebSessionItem          See Also

Specifies the session’s status.

TcxWebSessionStatus = (wssStarting, wssStarted, wssTerminating, wssTerminated);

property Status: TcxWebSessionStatus;

Description

Each session has a status assigned to it.  You can access this status via the Status property.  Statuses are examined each time a request is received.  They affect sessions’ starting and termination.  See the table below for a detailed explanations of the values available for the Status property setting:

Value	Description
wssStarting	The Status property is set to this value when a session is created.  This value occurs when the session item owner is being notified of a new session creation.  Once the owner has been notified, the status property value is set to wssStarted.
wssStarted	Creation is complete and the normal value showing that the session is running.
wssTerminating	The Status property is set to this value when a session is expired or terminated (when the Expired or Terminated property is set to True).  This is set when notifying the item owner of session termination.  When the owner has been notified, the status property value is set to wssTerminated.
wssTerminated	The Status property is set to this value when the session is no longer accessible and merely waiting for disposal.


TcxWebSessionItem.Terminated

TcxWebSessionItem          See Also

Returns whether a session has been terminated.

property Terminated: Boolean;

Description

A session can be terminated manually or automatically.  Use the Terminate method of the TcxWebSession or TcxWebSessions object to terminate a session explicitly.  If a session is idle for a period of time greater than the TimeoutMinutes property, then the session is terminated automatically.

However, sessions are not actually terminated in the cases listed above.  The Terminated property is simply set to True.  This sets the Status property to the wssTerminating value.  Such a status forces a session to notify its owner of termination.  After the owner has been notified, the Status property is set to wssTerminated, and the session just awaits disposal.


TcxWebSessionItem.TimeoutMinutes

TcxWebSessionItem          See Also

Specifies the time in minutes for which a session can be idle before it is terminated.

property TimeoutMinutes: Integer;

Description

Each time a request for a session is received, the session’s request time is stored.  When a request message (no matter from which user) is received, all currently maintained sessions are examined by the application.  If the difference between the session’s last request time and the current time is greater than the TimeoutMinutes property value, the session is terminated.

Note that after the session has expired, a request from the same user will force the application to generate a new session.  This session will have a different ID property value and all stored values will have been cleared.

The default value of the TimeoutMinutes property is specified by the DefaultTimeout property of the TcxWebHomeDataModule object representing your home data module.  The default value of this property is 20.


TcxWebSessionItem.Create

TcxWebSessionItem          See Also

Creates an instance of the TcxWebSessionItem class.

procedure Create(AID: string);

Description

The Create method is used to instantiate a TcxWebSessionItem object.  The AID parameter specifies the ID of the session to be created.  This parameter corresponds to the ID property.

Do not create instances of the TcxWebSessionItem class in applications.  Sessions are created and destroyed automatically.


TcxWebSessionItem.Destroy

TcxWebSessionItem

Destroys the TcxWebSessionItem object.

procedure Destroy; override;

Description

The Destroy method disposes the TcxWebSessionItem object.  It frees any allocated memory before calling the inherited destructor.

Do not destroy TcxWebSessionItem objects in applications.  Sessions are created and destroyed automatically.


TcxWebSessions
TcxWebSessions Object

Hierarchy          Properties          Methods         See Also

Represents a collection of currently maintained sessions.

Unit

cxWebSess

TcxWebSessions = class(TObject)

Description

Multiple users can make use of your EWF web application at the same time.  Thus the information on each user needs to be stored.  Such information is stored by session objects, which are maintained for each user of the application.

All currently maintained sessions can be accessed via the cxWebSessions global variable.  The TcxWebSessions object represents its value.  This object stores the collection of items maintaining information for a particular session.  These items are represented by TcxWebSessionItem class instances.

You can manipulate sessions by calling the TcxWebSessions object’s methods.  Most of the methods require a session ID as their parameter.


TcxWebSessions Hierarchy
Hierarchy

TObject


Properties for TcxWebSessions
TcxWebSessions Properties

TcxWebSessions          Legend

In TcxWebSessions

ActiveCount

MaxSessions


Methods for TcxWebSessions
TcxWebSessions Methods

TcxWebSessions          Legend

In TcxWebSessions

CheckStatus

ConnectTo

ConnectToActive

Count

Create

Destroy

GetContents

GetContentValue

GetIsActive

GetTimeoutMinutes

Items

LoadFromStream

NotifyStatusChange

SaveToStream

SetContentValue

SetTimeoutMinutes

StartSession

Terminate


TcxWebSessions.ActiveCount

TcxWebSessions          See Also

Returns the number of currently active sessions.

property ActiveCount: Integer;

Description

Once a session is started it becomes active.  When it is expired or terminated, it is inactive.  Use the ActiveCount property to obtain the number of currently active sessions.  This number is obtained by using the IsActive property values of TcxWebSessionItem objects stored in the collection.

ReadOnly Property


TcxWebSessions.MaxSessions

TcxWebSessions          See Also

Specifies the maximum number of sessions that can be maintained simultaneously.

property MaxSessions: Integer;

Description

Set the MaxSessions property to limit the number of sessions the sessions service stores in memory.  If the MaxSessions property is –1, the number of sessions is unlimited and the application can continue session creation until it runs out of memory.  Set the value via the MaxSessions property of your home data module.

When the MaxSessions property is greater than or equal to zero, any attempt to create a new session when the number of maintained sessions is equal to the MaxSessions property value, causes an exception.  The TcxWebErrorSession object is created to represent the current user’s session.

Note:	When the application terminates sessions, it frees up memory for new sessions.  Thus, after reaching the limit imposed by the MaxSessions property, the application can add subsequent sessions after explicitly terminating a session or by waiting for one to time out.

The default value of the MaxSessions property is -1.


TcxWebSessions.CheckStatus

TcxWebSessions

Returns a value indicating whether sessions’ statuses need to be updated.

function CheckStatus: Boolean;

Description

Each session has the status assigned to it.  Session status is specified by the Status property of the corresponding TcxWebSessionItem object.  The CheckStatus method is used to determine whether sessions’ statuses need to be updated.

This method is used internally.  There is no need to use it in applications.


TcxWebSessions.Count

TcxWebSessions

Returns the number of sessions currently maintained by the web application.

property Count: Integer;

Description

Use the Count property to determine the number of currently maintained sessions.  This property can be used in combination with the Items property to iterate through sessions.

ReadOnly property


TcxWebSessions.Items

TcxWebSessions

Provides indexed access to currently maintained sessions.

property Items[Index: Integer]: TcxWebSessionItem;

Description

Use the Items property to access a session object by its index within the sessions collection.  The Index parameter specifies the index of the session to be accessed.  Session indexes are zero-based.

This property can be used in combination with the Count property to iterate through currently maintained sessions.  Note that the Count property value is always one greater than the last available session index.

ReadOnly property


TcxWebSessions.ConnectTo

TcxWebSessions          See Also

Returns a value indicating whether a specific session exists.

function ConnectTo(const ASessionID: string): Boolean;

Description

The ASessionID parameter specifies sessions by their identifiers. Use the ConnectTo method to determine whether a specific session is currently maintained.  If the specified session is found, the method returns True.  Otherwise, False.


TcxWebSessions.ConnectToActive

TcxWebSessions

Returns a value indicating whether a specified session is active.

function ConnectToActive(const ASessionID: string): Boolean;

Description

The ASessionID parameter specifies sessions by their identifiers. The ConnectToActive method determines whether a specified session is active.  If the specified session is active, the method returns True.  If it is inactive or doesn’t exist, it returns False.


TcxWebSessions.Create

TcxWebSessions          See Also

Creates an instance of the TcxWebSessions class.

procedure Create;

Description

The Create method is used to instantiate a TcxWebSessions object.  Do not use this method in applications.  The TcxWebSessions object is created automatically and is assigned to the cxWebSessions global variable.


TcxWebSessions.Destroy

TcxWebSessions

Destroys the TcxWebSessions object.

procedure Destroy; override;

Description

The Destroy method is used to dispose the TcxWebSessions object.  It frees any allocated memory and calls the inherited destructor.

Do not Destroy the TcxWebSessions object in applications.  It’s disposal is automatic.


TcxWebSessions.GetContents

TcxWebSessions          See Also

Gets the content values of a specific session.

procedure GetContents(const ASessionID: string; var AContents: TcxWebNamedVariants);

Description

Sessions provide means to store user-specific information.  This information is represented by a set of name/value pairs.  These content values are stored by a session until it is terminated.

Use the GetContents method to obtain the TcxWebNamedVariants object representing a specified session’s content values.  The ASessionID parameter specifies sessions via their identifiers.  The AContents parameter returns values.  You can also obtain a single content value by its name.  Use the GetContentValue method for this purpose.

You can also access session content values via the Values property of the TcxWebSession object or the Items property of the TcxWebSessionItem object.


TcxWebSessions.GetContentValue

TcxWebSessions          See Also

Obtains the content value of a specific session.

function GetContentValue(const ASessionID, AName: string): Variant;

Description

Sessions provide means to store user-specific information.  This information is represented by a set of name/value pairs.  These content values are stored by a session until it is terminated.

Use the GetContentValue method to obtain the content value of a specific session.  The ASessionID parameter specifies sessions via their identifiers.  The AName parameter specifies the name of the desired content value.  You can also retrieve the complete list of content values of a specific session via the GetContents method.

You can also access session content values via the Values property of the TcxWebSession object or the Items property of the TcxWebSessionItem object.


TcxWebSessions.GetIsActive

TcxWebSessions          See Also

Gets the value indicating whether a specific session is active.

function GetIsActive(const ASessionID: string): Boolean;

Description

Once a session is started it becomes active.  When it has been expired or terminated, it is inactive. The ASessionID parameter specifies sessions via their identifiers. Use the GetIsActive method to determine whether a specific session is active at the moment.  The method uses the TcxWebSessionItem object’s IsActive property to return its value.

Use the ActiveCount property to determine the number of currently active sessions.


TcxWebSessions.GetTimeoutMinutes

TcxWebSessions          See Also

Returns the timeout of a specific session.

function GetTimeoutMinutes(const ASessionID: string): Integer;

Description

Each time a request for a session is received, the session’s request time is stored.  When a request message (no matter from which user) is received, all currently maintained sessions are examined by the application.  If the difference between the session’s last request time and the current time is greater than the session’s timeout, the session is terminated.

Use the GetTimeoutMinutes method to obtain the timeout of a specific session.  Sessions are specified by the ASessionID parameter via their identifiers.  The method utilizes the corresponding TcxWebSessionItem object’s TimeoutMinutes property to return its value.

You can also use the TimeoutMinutes property of the TcxWebSession object to get or set the session’s timeout.


TcxWebSessions.LoadFromStream

TcxWebSessions          See Also

Restores previously saved sessions from a stream.

procedure LoadFromStream(Stream: TStream);

Description

Use the LoadFromStream method to restore previously saved sessions.  The Stream parameter specifies a stream containing sessions’ settings.  Sessions must have been previously saved to the specified stream via the SaveToStream method.

Note: the LoadFromStream method clears the collection of session items before loading saved sessions.


TcxWebSessions.NotifyStatusChange

TcxWebSessions

Updates session statuses and notifies the sessions collection owner of this change.

procedure NotifyStatusChange(AOwner: TObject);

Description

Each session has a status assigned to it.  Session status is specified by the Status property of the corresponding TcxWebSessionItem object.  The CheckStatus method is used to determine whether session statuses need to be changed.  If so, they are updated and the sessions collection owner is notified of this change.  The NotifyStatusChange method is used for this purpose.

This method is used internally.  You do not need to use it in applications.


TcxWebSessions.SaveToStream

TcxWebSessions          See Also

Saves currently maintained sessions to the specified stream.

procedure SaveToStream(Stream: TStream);

Description

Use the SaveToStream method to save information on all currently maintained sessions to a stream.  The target stream is specified by the Stream parameter.  The method writes all property values of each TcxWebSessionItem object representing each individual session to this stream.

After sessions are saved, they can be restored via the LoadFromStream method call.  The SaveToStream and LoadFromStream methods are used to restore sessions after restarting a web application.


TcxWebSessions.SetContentValue

TcxWebSessions          See Also

Sets the content value of a specific session.

procedure SetContentValue(const ASessionID, AName: string; const AValue: Variant);

Description

Sessions provide means to store user-specific information.  This information is represented by a set of name/value pairs.  These content values are stored by a session until it is terminated.

Use the SetContentValue method to assign the content value of a specific session.  The session is specified by the ASessionID parameter via its identifier.  The AName parameter specifies the name of the desired content value.  The AValue parameter specifies the value to be assigned.  If the previously unused AName parameter value is specified, a new name/value pair is created.  If the AName parameter value specifies the previously used name, the corresponding value is changed.

You can also access session content values via the Values property of the TcxWebSession object or the Items property of the TcxWebSessionItem object.


TcxWebSessions.SetTimeoutMinutes

TcxWebSessions          See Also

Sets the timeout of a specific session.

procedure SetTimeoutMinutes(const ASessionID: string; const AValue: Integer);

Description

Each time a request for a session is received, the session’s request time is stored.  When a request message (no matter from which user) is received, all currently maintained sessions are examined by the application.  If the difference between the session’s last request time and the current time is greater than the session’s timeout, the session is terminated.

Use the SetTimeoutMinutes method to set the timeout of a specific session.  The session is specified by the ASessionID parameter via its identifier.  The AValue parameter specifies a new timeout for it.  The method assigns the supplied value to the corresponding TcxWebSessionItem object’s TimeoutMinutes property.

You can also use the TimeoutMinutes property of the TcxWebSession object to get or set the session’s timeout.


TcxWebSessions.StartSession

TcxWebSessions          See Also

Starts a new session.

procedure StartSession(var ASessionID: string);

Description

When a request is received, it is examined for a session ID.  If the session ID is obtained, the corresponding session object is searched for.  If the session ID was not found or its corresponding session is already terminated, the StartSession method is called.  It is used to create a new session object.  The ASessionID parameter specifies the identifier for the newly created session.  If this parameter’s value cannot serve as a session identifier, a new identifier is automatically generated.

Note that if the number of currently maintained sessions is equal to the MaxSessions property value, the ‘Session limit is exceeded’ exception is raised when attempting to create one more.


TcxWebSessions.Terminate

TcxWebSessions          See Also

Terminates a specific session.

function Terminate(const ASessionID: string): Boolean;

Description

Use the Terminate method to terminate a specific session.  The session is specified by the ASessionID parameter via its identifier.  Once it is terminated, all values it stores will be deleted and cannot be accessed any longer.

Calling the Terminate method sets the Terminated property of the corresponding session to True.

Sessions can also be terminated automatically.  This takes place if no requests have been received from a user for a time period greater than that specified for the session’s timeout.


TcxWebSessionStatus
TcxWebSessionStatus type

Contains values specifying session statuses.

Unit

cxWebSess

TcxWebSessionStatus = (wssStarting, wssStarted, wssTerminating, wssTerminated);

Description

The TcxWebSessionStatus type lists values specifying session statuses.  These values are used to set the Status property of the TcxWebSessionItem class.  The table below contains the list of available values and their descriptions:

Value	Description
wssStarting	The Status property is set to this value when a session is created.  This value occurs when the session item owner is being notified of a new session creation.  Once the owner has been notified, the status property value is set to wssStarted.
wssStarted	Creation is complete and the normal value showing that the session is running.
wssTerminating	The Status property is set to this value when a session is expired or terminated (when the Expired or Terminated property is set to True).  This is set when notifying the item owner of session termination.  When the owner has been notified, the status property value is set to wssTerminated.
wssTerminated	The Status property is set to this value when the session is no longer accessible and merely waiting for disposal.


cxWebSessions variable
cxWebSessions global variable

Provides access to sessions maintained by a specific application.

Unit

cxWebSess

cxWebSessions: TcxWebSessions;

Description

Multiple users can make use of your EWF web application at the same time.  Thus the information for each user needs to be stored.  Such information is stored by session objects, which are maintained for each user of the application.

All currently maintained sessions can be accessed via the cxWebSessions global variable.  The TcxWebSessions object represents its value.  This object stores a collection of items maintaining information for a particular session.  These items are represented by TcxWebSessionItem class instances.

You can also access the current user’s session via the Session property of TcxCustomWebDataModule descendants.  It returns the TcxWebSession type value.


cxWebVariants Unit Overview
cxWebVariants Unit

Classes

TcxWebNamedVariants


TcxWebNamedVariants
TcxWebNamedVariants Object

Hierarchy          Properties          Methods          See Also

Represents a collection of named Variants.

Unit

cxWebVariants

TcxWebNamedVariants = class(TPersistent)

Description

The TcxWebNamedVariants class stores a collection of name/value pairs.  Stored values are of the Variant type.  This class provides you with the ability to access values by their names.  The Values property serves this purpose.  You can also access names or values by their indexes via the Names and Variants properties.  The total number of name/value pairs is stored in the Count property.

The TcxWebNamedVariants class also provides a number of methods for collection management.  Use these methods to add, delete, and insert items.

This class represents the type of the TcxWebSessionItem object’s Items property.  It is used to store a collection of named values for a particular user’s session.


TcxWebNamedVariants Hierarchy
Hierarchy

TPersistent


Properties for TcxWebNamedVariants
TcxWebNamedVariants Properties

TcxWebNamedVariants          Legend

In TcxWebNamedVariants

Count

Names

Values

Variants


Methods for TcxWebNamedVariants
TcxWebNamedVariants Methods

TcxWebNamedVariants          Legend

In TcxWebNamedVariants

 Add

 Assign

 Clear

 Create

 Delete

 Destroy

 IndexOfName

 Insert


TcxWebNamedVariants.Count

TcxWebNamedVariants          See Also

Returns the total number of name/value pairs in the collection.

property Count: Integer;

Description

The TcxWebNamedVariants class stores a collection of name/value pairs.  Use the Count property to obtain the total number of such pairs in the collection.

Use the Names or Variants property to access names or values by their indexes within the collection.  These indexes are zero-based.  The last index of a name/value is always one less than the Count property value.

ReadOnly Property


TcxWebNamedVariants.Names

TcxWebNamedVariants          See Also

Provides access to stored value names by their indexes.

property Names[Index: Integer]: string;

Description

Use the Names property to access stored names by their indexes.  The Index parameter specifies the index of the name/value pair to be accessed.  Indexes are zero-based.  The last available index is always one less than the Count property value.

Use the Variants property to obtain access to stored values by their indexes.

ReadOnly Property


TcxWebNamedVariants.Values

TcxWebNamedVariants          See Also

Gets or sets a value for the specified name.

property Values[const Name: string]: Variant;

Description

The Values property provides access to stored values by their names.  The Name parameter specifies the name of the corresponding value to be obtained or updated.  If the specified name already exists in the collection, writing/reading the Values property results in updating/obtaining the corresponding value.  If the specified name is not in the list, reading the Values property returns the Unassigned value.  Writing the Values property with a name not in the list results in adding a new name/value pair.


TcxWebNamedVariants.Variants

TcxWebNamedVariants          See Also

Provides access to stored values by their indexes.

property Variants[Index: Integer]: Variant;

Description

Use the Variants property to access stored values by their indexes.  The Index parameter specifies the index of the name/value pair to be accessed.  Indexes are zero-based.  The last available index is always one less than the Count property value.

Use the Variants property to obtain access to stored values by their indexes.


TcxWebNamedVariants.Add

TcxWebNamedVariants          See Also

Adds a new name/value pair to the collection.

function Add(const S: string; const AValue: Variant): Integer;

Description

Use the Add method to add a new name/value pair to the collection.  The S parameter specifies the name.  The value is specified via the AValue parameter.  When this method is called it increments the Count property value.

Use the Insert method to insert a new name/value pair at a specified position within the collection.


TcxWebNamedVariants.Assign

TcxWebNamedVariants

Assigns the contents of one TcxWebNamedVariants object to another.

procedure Assign(Source: TPersistent); override;

Description

Use the Assign method to create a copy of the TcxWebNamedVariants object.  The Source parameter specifies the source object.  The caller is a destination object.


TcxWebNamedVariants.Clear

TcxWebNamedVariants          See Also

Removes all name/value pairs from the collection.

procedure Clear;

Description

Use the Clear method to empty the collection of named variants.


TcxWebNamedVariants.Create

TcxWebNamedVariants          See Also

Creates an instance of the TcxWebNamedVariants class.

procedure Create;

Description

The Create method is used to instantiate a new TcxWebNamedVariants object.  It initializes the collection of name/value pairs after calling the inherited constructor.

Do not use the Create method in applications.  TcxWebNamedVariants class instances are created automatically when the TcxWebSessionItem class initializes its Items property.


TcxWebNamedVariants.Delete

TcxWebNamedVariants          See Also

Deletes the specified name/value pair from the collection.

procedure Delete(Index: Integer);

Description

Use the Delete method to remove the specified named value.  The item to be removed is specified by its index via the Index parameter.  Calling the Delete method decrements the Count property value.

You can obtain the index of a name/value pair via the IndexOfName method.  It returns the index of the named value specified by its name.


TcxWebNamedVariants.Destroy

TcxWebNamedVariants          See Also

Destroys the TcxWebNamedVariants object.

procedure Destroy; override;

Description

The Destroy method is used to dispose of the TcxWebNamedVariants object.  It frees any allocated memory before calling the inherited destructor.

Do not destroy TcxWebNamedVariants objects in applications.  They are destroyed automatically when the TcxWebSessionItem object is freed.


TcxWebNamedVariants.IndexOfName

TcxWebNamedVariants          See Also

Returns the index of the specified name/value pair.

function IndexOfName(const Name: string): Integer;

Description

Use the IndexOfName method to retrieve the index of the specified name/value pair.  The pair is specified by its name via the Name parameter.  Pair indexes are zero-based.

Use the Names or Variants property to access either names or corresponding values by their indexes.


TcxWebNamedVariants.Insert

TcxWebNamedVariants          See Also

Inserts a new name/value pair at a specified position.

procedure Insert(Index: Integer; const S: string; const AValue: Variant);

Description

Use the Insert method to add a name/value pair at the specified position within the list.  The position of the added pair is specified by its zero-based index via the Index parameter.  The S and AValue parameters specify the name and value constituents of the added pair.

After inserting a pair, the indexes of all the pairs which follow shift and their indexes are incremented.  If the specified index is negative, the pair is added to the beginning of the collection.  If it exceeds the last available index, the pair is added to the end of the collection.

Use the Add method to add a new name/value pair to the end of the collection.


cxWebDateEdit Unit Overview
cxWebDateEdit Unit

Classes

TcxCustomWebDateEdit

TcxWebDateEdit

Other Types

TcxWebDateEditEvent


TcxWebDateEditEvent
TcxWebDateEditEvent type

Contains values specifying custom event types for the web date editor.

Unit

cxWebDateEdit

TcxWebDateEditEvent = (ceOnSelectDay, ceOnShiftMonth, ceOnValidateEditText);

Description

The TcxWebDateEditEvent type specifies the types of custom client-side events supported by the web date edit control.  These values are used to set the EventType property of the date edit control’s custom events, if any.

The following values are available in the TcxWebDateEditEvent type:

Value	Description
ceOnSelectDay	Fires when selecting a day within a web calendar.
ceOnShiftMonth	Fires when changing a month within a web calendar.
ceOnValidateEditText	Fires when validating text that was entered.


TcxCustomWebDateEdit
TcxCustomWebDateEdit Object

Hierarchy          Properties          Methods          Events          See Also

Serves as the base class for dropdown calendar controls.

Unit

cxWebDateEdit

TcxCustomWebDateEdit = class(TcxCustomWebCalendar)

Description

The TcxCustomWebDateEdit class enables the basic functionality of dropdown calendar controls.  Date values can be edited either by typing into the editor or via the dropdown calendar sheet.  The calendar sheet’s functionality is implemented by the TcxCustomWebCalendar class, which serves as an ancestor.

There are two descendants of the TcxCustomWebDateEdit class available.  The TcxWebDateEdit and TcxWebDBDateEdit controls represent non data-aware and data-aware date editors respectively.

Both the TcxWebDateEdit and TcxWebDBDateEdit controls support a set of custom events which you can handle straight on the client side.  These event types are specified by the TcxWebDateEditEvent type.


TcxCustomWebDateEdit Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxCustomWebCalendar


Properties for TcxCustomWebDateEdit
TcxCustomWebDateEdit Properties

TcxCustomWebDateEdit          Legend

In TcxCustomWebDateEdit

ButtonImageIndex

ButtonStyles

ButtonWidth

EditorStyles

Derived from TcxCustomWebCalendar

CellPadding

CellSpacing

DayHeaderAlignment

DayHeaderStyle

DayNameFormat

DaysOfWeekNames

FirstDayOfWeek

ForcePostBack

Height

Images

MonthNames

MonthNameFormat

NextMonthImageIndex

NextMonthText

OtherMonthDayStyle

PrevMonthImageIndex

PrevMonthText

SelectedDate

SelectedStyle

ShowMonthPictures

ShowTodayLink

ShowYear

TitleStyle

TodayPanelStyle

Width

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxCustomWebDateEdit
TcxCustomWebDateEdit Methods

TcxCustomWebDateEdit          Legend

In TcxCustomWebDateEdit

 CalcTextHeight

 Create

 Destroy

 DoSetValues

 RegisterRenderers

 RegisterValues

 StyleChanged

Derived from TcxCustomWebCalendar

 DateToWebString

 RegisterActions

 ScriptsSubscription

 WebStringToDate

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterEvents

SetState

ValidateContainer


Events for TcxCustomWebDateEdit
TcxCustomWebDateEdit Events

TcxCustomWebDateEdit          Legend

Derived from TcxCustomWebCalendar

OnNextMonthSelect

OnPrevMonthSelect

OnSelectDay

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxCustomWebDateEdit.ButtonImageIndex

TcxCustomWebDateEdit          See Also

Specifies the image displayed as a dropdown button.

property ButtonImageIndex: Integer;

Description

Click the editor’s button to invoke the dropdown calendar.  The default image on the button is an arrow.  However, you can use the ButtonImageIndex property to give a button a custom image.  It specifies the image index within the calendar control’s images collection.  Use the Images property to access the images collection of the editor.

You can also control the appearance of the editor button via the ButtonStyles property.


TcxCustomWebDateEdit.ButtonStyles

TcxCustomWebDateEdit          See Also

Specifies the style of the editor button.

property ButtonStyles: TcxWebStyles;

Description

Use the ButtonStyles property to specify the style of the button used to invoke the dropdown calendar.  You should use the TcxWebStyleController component to create and manage individual styles.  The modified style should be assigned to the Default property of the TcxWebStyles object representing the ButtonStyles property.  Assigning values to the Hover sub-property is not in effect.


TcxCustomWebDateEdit.ButtonWidth

TcxCustomWebDateEdit          See Also

Specifies the editor button’s width in pixels.

property ButtonWidth: Integer;

Description

The dropdown calendar is invoked by clicking the editor’s button.  This button’s height is always the same as the editor’s.  Use the ButtonWidth property to specify the width of the editor button.  The width is set in pixels.

The editor’s height is specified by the font applied to its contents via the EditorStyles property.


TcxCustomWebDateEdit.EditorStyles

TcxCustomWebDateEdit

Specifies the editor’s style.

property EditorStyles: TcxWebStyles;

Description

Use the EditorStyles property to specify the style of the editor area.  You should use the TcxWebStyleController component in order to create and manage individual styles.  The modified style should be assigned to the Default property of the TcxWebStyles object representing the EditorStyles property.  Assigning values to the Hover sub-property is not in effect.


TcxCustomWebDateEdit.CalcTextHeight

TcxCustomWebDateEdit

Calculates the height of the editor’s text according to the font applied.

procedure CalcTextHeight;

Description

The CalcTextHeight property is used to implement height constraints for the date editor.  It calculates the height of the editor’s text according to the font applied.  This value is recalculated each time a new style is assigned to the editor’s contents.

Use the EditorStyles property to control the style applied to the editor’s contents.


TcxCustomWebDateEdit.Create

TcxCustomWebDateEdit          See Also

Creates a TcxCustomWebDateEdit class instance.

procedure Create(AOwner: TComponent); override;

Description

The Create method is used to instantiate a new TcxCustomWebDateEdit object.  The AOwner parameter specifies the owner of the newly created control (a page module).  The method calls the inherited constructor and sets properties to their default values.

Do not create instances of the TcxCustomWebDateEdit class in applications.  Instantiate one of its descendants instead.


TcxCustomWebDateEdit.Destroy

TcxCustomWebDateEdit          See Also

Destroys the TcxCustomWebDateEdit object.

procedure Destroy; override;

Description

The Destroy method is used to dispose of the TcxCustomWebDateEdit object and free allocated memory.  It frees the ButtonStyles and EditorStyles properties before calling the inherited destructor.

Do not create instances of the TcxCustomWebDateEdit class in applications.  Instantiate one of its descendants instead.  Use the Free method to destroy instantiated controls.


TcxCustomWebDateEdit.DoSetValues

TcxCustomWebDateEdit          See Also

Updates the date edit control with respect to changes made by the end-user.

procedure DoSetValues; override;

Description

The request contains information indicating the date selected by a user.  This information is used to update the control with changes made at the client browser.  This is performed via the DoSetValues method.  It updates the SelectedDate property.

This method implements the IcxWebValues interface’s DoSetValues method.


TcxCustomWebDateEdit.RegisterRenderers

TcxCustomWebDateEdit          See Also

Registers renderer classes that generate HTML code representing the date edit control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers a specific renderer class designed to render HTML code for the date edit control.  The two browser types, for which registered renderers are designed, are Internet Explorer (default) and Netscape Navigator 4.0.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for a date edit control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxCustomWebDateEdit.RegisterValues

TcxCustomWebDateEdit          See Also

Registers HTML elements, which contain data related to the date editor.

procedure RegisterValues; override;

Description

The RegisterValues method is used to register HTML elements, which contain data related to the web list box control.  It registers the INPUT tag representing the date editor on a web page.  It is required to determine the contents of the control after end user manipulations.  The DoSetValues method implements the update of the SelectedDate property.

This method implements the RegisterValues method of the IcxWebValues interface.  It can be overridden in descendant classes to register additional HTML elements, which values are required for proper functionality.


TcxCustomWebDateEdit.StyleChanged

TcxCustomWebDateEdit

Responds to style changes.

procedure StyleChanged(Style: TcxWebStyleItem); override;

Description

The StyleChanged method is called each time a change is applied to the style of one of the control’s constituents.  The Style parameter transmits the modified style item.  The method performs the necessary calculations to update the control due to style changes.


TcxWebDateEdit
 TcxWebDateEdit Object

Hierarchy          Properties          Methods          Events          See Also

Represents a dropdown calendar control.

Unit

cxWebDateEdit

TcxWebDateEdit = class(TcxCustomWebDateEdit)

Description

Use the TcxWebDateEdit control to place a dropdown calendar control onto a web page.  You can edit date values either by typing into the editor or via the dropdown calendar sheet.  The calendar sheet’s functionality is implemented by the TcxCustomWebCalendar class, which serves as an ancestor.

If you want to display and edit dataset field values via a dropdown calendar, you will need to use the TcxWebDBDateEdit control.

Both the TcxWebDateEdit and TcxWebDBDateEdit controls support a set of custom events for client side processing.  These event types are specified by the TcxWebDateEditEvent type.


TcxWebDateEdit Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxCustomWebCalendar

     |

TcxCustomWebDateEdit


Properties for TcxWebDateEdit
TcxWebDateEdit Properties

TcxWebDateEdit          Legend

Derived from TcxCustomWebDateEdit

ButtonImageIndex

ButtonStyles

ButtonWidth

EditorStyles

Derived from TcxCustomWebCalendar

CellPadding

CellSpacing

DayHeaderAlignment

DayHeaderStyle

DayNameFormat

DaysOfWeekNames

FirstDayOfWeek

ForcePostBack

Height

Images

MonthNames

MonthNameFormat

NextMonthImageIndex

NextMonthText

OtherMonthDayStyle

PrevMonthImageIndex

PrevMonthText

SelectedDate

SelectedStyle

ShowMonthPictures

ShowTodayLink

ShowYear

TitleStyle

TodayPanelStyle

Width

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebDateEdit
TcxWebDateEdit Methods

TcxWebDateEdit          Legend

Derived from TcxCustomWebDateEdit

 CalcTextHeight

 Create

 Destroy

 DoSetValues

 RegisterRenderers

 RegisterValues

 StyleChanged

Derived from TcxCustomWebCalendar

 DateToWebString

 RegisterActions

 ScriptsSubscription

 WebStringToDate

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterEvents

SetState

ValidateContainer


Events for TcxWebDateEdit
TcxWebDateEdit Events

TcxWebDateEdit          Legend

Derived from TcxCustomWebCalendar

OnNextMonthSelect

OnPrevMonthSelect

OnSelectDay

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


cxWebExtCtrls Unit Overview
cxWebExtCtrls Unit

Classes

TcxWebTimer

Other Types

TcxWebTimerEvent


TcxWebTimer
 TcxWebTimer Object

Hierarchy          Properties          Methods          Events          See Also

Provides the means to perform specific actions within a  specified time interval.

Unit

cxWebExtCtrls

TcxWebTimer = class(TcxWebComponent)

Description

Use the TcxWebTimer component in order to perform specific actions repeatedly within a specified time interval.  These specified actions can be performed both at the client and the server side.  Write an OnTimer event handler to force post back at the specified time interval to perform specified actions.  The time interval is specified via the Interval property.

Use the CustomEvents property to write a client side event handler to be executed each time the specified time interval elapses.  This is a single event available for the TcxWebTimer component at the client side.  It is specified via the TcxWebTimerEvent enumerator.


TcxWebTimer Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent


Properties for TcxWebTimer
TcxWebTimer Properties

TcxWebTimer          Legend

In TcxWebTimer

Enabled

Interval

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebTimer
TcxWebTimer Methods

TcxWebTimer          Legend

In TcxWebTimer

 Create

 Destroy

 RegisterActions

 RegisterRenderers

 ScriptsSubscription

 WebTimer

Derived from TcxWebComponent

CanSetValues

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterEvents

RegisterValues

SetState

StyleChanged

ValidateContainer


Events for TcxWebTimer
TcxWebTimer Events

TcxWebTimer          Legend

In TcxWebTimer

OnTimer

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebTimer.Enabled

TcxWebTimer          See Also

Specifies whether the timer component invokes the event handler each time the specified time interval elapses.

property Enabled: Boolean;

Description

The timer component is used to perform specific actions periodically according to the specified time interval.  If the Enabled property is set to True, the component generates the corresponding event handlers.  Otherwise no server or client side events will be generated.

The default value of the Enabled property is True.


TcxWebTimer.Interval

TcxWebTimer          See Also

Specifies the time interval, in milliseconds, that elapses before the component generates another event.

property Interval: Integer;

Description

The Interval property specifies how frequently the timer component invokes client and/or server side event handlers.  Each time the specified interval passes, the appropriate event handlers are executed.

Write an OnTimer event handler to perform desired actions on the server side.  The client event handler can be accessed via the CustomEvents property.

Note: if the Interval property is set to zero or contains a negative value, event handlers are not executed.

The default value of the Interval property is 1000 (one second).


TcxWebTimer.Create

TcxWebTimer          See Also

Creates an instance of the TcxWebTimer component.

constructor Create(AOwner: TComponent); override;

Description

Use the Create method to create a new timer component at runtime.  The AOwner parameter specifies the owner of the newly created component (typically a page module).

The Create method sets properties to their default values after calling the inherited constructor.


TcxWebTimer.Destroy

TcxWebTimer          See Also

Destroys the TcxWebTimer component.

destructor Destroy; override;

Description

The Destroy method is used to dispose of the timer component and free any allocated memory.  Do not use this method in applications.  Call it via the Free method instead.


TcxWebTimer.RegisterActions

TcxWebTimer          See Also

Registers action handlers for the timer component.

procedure RegisterActions; override;

Description

The RegisterActions method registers a handler for the action intended to invoke the OnTimer event.  The registered handler is the WebTimer method.

This method overrides the RegisterActions method of the TcxWebComponent class.


TcxWebTimer.RegisterRenderers

TcxWebTimer          See Also

Registers renderer classes which generate HTML code representing the timer component within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers a specific renderer class designed to render HTML code for the timer component.  The registered renderer is used to render code for all possible browser types.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for a timer component.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxWebTimer.ScriptsSubscription

TcxWebTimer          See Also

Subscribes the component to client scripts.

procedure ScriptsSubscription; override;

Description

The ScriptSubscription method is used to subscribe the timer component to a post back script.

This method implements the ScriptsSubscription method of the IcxWebScripts interface.  It can be overridden in descendant classes to subscribe a derived control to additional scripts.


TcxWebTimer.WebTimer

TcxWebTimer          See Also

Invokes the OnTimer event.

procedure WebTimer(const AParameters: TcxActionParameters); virtual;

Description

If a handler is assigned to the OnTimer event, a post back is forced each time the time interval specified by the Interval property elapses.  The __TARGETNAME and __ACTIONNAME hidden fields contain values specifying the timer component and the event respectively.  This results in the WebTimer method, registered by the RegisterActions method, being called.  The WebTimer method invokes the OnTimer event, if its handler is assigned.

Override this method in descendant classes in order to perform additional actions each time the OnTimer event is invoked.


TcxWebTimer.OnTimer

TcxWebTimer          See Also

Fires periodically according to the time interval specified by the Interval property.

type

  TNotifyEvent = procedure(Sender: TObject) of object;

property OnTimer: TNotifyEvent;

Description

Write an OnTimer event handler to perform specific actions each time the time interval specified by the Interval property elapses.  This event allows you to perform actions at the server side.  Use the CustomEvents property to access the OnTimer client event.

Note: The OnTimer event doesn’t fire if the Enabled property value is False or if the Interval property contains a value of zero or less.


TcxWebTimerEvent
TcxWebTimerEvent type

Contains values corresponding to client events available for the TcxWebTimer control.

Unit

cxWebExtCtrls

TcxWebTimerEvent = (teOnTimer);

Description

The TcxWebTimerEvent type contains a single value that corresponding to the OnTimer client event provided by the TcxWebTimer component.  If assigned, this event fires periodically according to the time interval specified by the component’s Interval property.

This event can be accessed via the CustomEvents property of the component.  Note that the Enabled property must be set to True and the Interval property must contain a positive value in order to allow event firing.


cxWebDBLookup Unit Overview
cxWebDBLookup Unit

Classes

TcxCustomWebDBLookup

TcxCustomWebDBLookupDataBinding

TcxWebDBLookup

TcxWebExtDBLookup

TcxWebExtLookupDataBinding

TcxWebLookupDataBinding


TcxCustomWebDBLookup
TcxCustomWebDBLookup Object

Hierarchy          Properties          Methods          Events         See Also

Serves as the base for lookup controls.

Unit

cxWebDBLookup

TcxCustomWebDBLookup = class(TcxCustomWebComboBox)

Description

The ExpressWeb Framework provides the TcxWebDBLookup and TcxWebExtDBLookup lookup editors.  These provide you the ability to select an edited value via the dropdown window listing dataset field values.  The edited value is bound to another dataset’s field in its turn.  The basic functionally of such editors is provided by the TcxCustomWebDBLookup class.

The TcxCustomWebDBLookup class doesn’t introduce any functionality.  It simply derives members of the TcxCustomWebComboBox class for lookup editors’ dropdown window functionality.


TcxCustomWebDBLookup Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxWebFormControl

     |

TcxCustomWebListBox

     |

TcxCustomWebComboBox


Properties for TcxCustomWebDBLookup
TcxCustomWebDBLookup Properties

TcxCustomWebDBLookup          Legend

Derived from TcxCustomWebComboBox

Text

Derived from TcxCustomWebListBox

ItemHeight

ItemIndex

Items

MinSize

MultiSelect

SelCount

Size

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxCustomWebDBLookup
TcxCustomWebDBLookup Methods

TcxCustomWebDBLookup          Legend

Derived from TcxCustomWebComboBox

CheckItemIndex

Create

DoSetValues

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetItemIndex

GetMaxHeight

GetMinSize

RegisterRenderers

RegisterValues

Derived from TcxCustomWebListBox

CheckNewSize

Clear

Destroy

DoChange

GetMinHeight

GetSize

RegisterActions

RegisterEvents

ScriptsSubscription

SetItemIndex

SetSize

StyleChanged

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

SetState

ValidateContainer


Events for TcxCustomWebDBLookup
TcxCustomWebDBLookup Events

TcxCustomWebDBLookup          Legend

Derived from TcxCustomWebListBox

OnChange

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxCustomWebDBLookupDataBinding
TcxCustomWebDBLookupDataBinding Object

Hierarchy          Properties          Methods          See Also

Serves as the base for classes that are used to bind lookup controls to data.

Unit

cxWebDBLookup

TcxCustomWebDBLookupDataBinding = class(TcxWebDataBinding)

Description

Lookup editors are used to edit dataset field values by a selection of the appropriate value from the dropdown window.  They allow you to substitute the edited value (and the dropdown window’s records) with corresponding values from another dataset.  This feature is very useful when editing a field containing IDs, while another table contains fields with the same IDs and their descriptions.  Thus you can substitute IDs with their descriptions in order to make editing easier.

The TcxCustomWebDBLookupDataBinding class introduces the ListSource and KeyFieldName properties used to specify the source of data for the lookup control’s dropdown and the field containing the same values as the edited one.  The edited field and its dataset are set via the inherited FieldName and DataSource properties.


TcxCustomWebDBLookupDataBinding Hierarchy
Hierarchy

TPersistent

     |

TcxAbstractWebDataBinding

     |

TcxCustomWebDataBinding

     |

TcxWebDataBinding


Properties for TcxCustomWebDBLookupDataBinding
TcxCustomWebDBLookupDataBinding Properties

TcxCustomWebDBLookupDataBinding          Legend

In TcxCustomWebDBLookupDataBinding

KeyFieldName

ListSource

Derived from TcxWebDataBinding

Field

FieldIndex

FieldName

Derived from TcxCustomWebDataBinding

DataSource

Derived from TcxAbstractWebDataBinding

Component

DataSource


Methods for TcxCustomWebDBLookupDataBinding
TcxCustomWebDBLookupDataBinding Methods

TcxCustomWebDBLookupDataBinding          Legend

In TcxCustomWebDBLookupDataBinding

 Destroy

 KeyField

 KeyFieldIndex

Derived from TcxWebDataBinding

 Assign

 ChangedDataLayout

 GetFieldIndex

 GetFirstVisibleRow

 GetPageSize

 UpdateData

Derived from TcxCustomWebDataBinding

 Assign

 ChangedDataLayout

 GetDataSource

 GetFieldIndex

 GetFirstVisibleRow

 GetPageSize

 SetDataSource

 UpdateData

 WriteScripts

Derived from TcxAbstractWebDataBinding

 Assign

 Create

 GetDataSource


TcxCustomWebDBLookupDataBinding.KeyFieldName

TcxCustomWebDBLookupDataBinding          See Also

Specifies the lookup dataset’s key field.

property KeyFieldName: string;

Description

The KeyFieldName property sets the name of lookup editor’s key field.  It is used to bind the editor’s edited field with the lookup dataset.  The editor’s display value is obtained from the lookup dataset’s record whose key field value coincides with the edited value.

Suppose the edited field contains product identifiers.  Fields of the lookup dataset contain these identifiers together with product descriptions.  The KeyFieldName property must be set to the name of the lookup dataset’s field containing identifiers.  Thus edited values can be found within the lookup key field and corresponding descriptions are displayed within the editor.

The lookup dataset is specified via the ListSource property.


TcxCustomWebDBLookupDataBinding.ListSource

TcxCustomWebDBLookupDataBinding          See Also

Specifies the lookup dataset.

property ListSource: TcxCustomWebDataSource;

Description

Lookup editors are used to substitute the edited dataset field value with the corresponding description from another (lookup) dataset.  Moreover, they provide a dropdown window displaying values from all records of the lookup dataset.  You must use the ListSource property to bind a lookup control to a dataset whose values are displayed within it and its dropdown window.

You can use any TcxCustomWebDataSource descendant to set the ListSource property value.  The TcxWebDataSource, TcxExtWebDataSource and TcxStdWebDataSource components are available for this purpose.

Use the KeyFieldName property to bind the edited field with the lookup dataset.


TcxCustomWebDBLookupDataBinding.Destroy

TcxCustomWebDBLookupDataBinding

Destroys the TcxCustomWebDBLookupDataBinding object.

procedure Destroy; override;

Description

The Destroy method disposes of the TcxCustomWebDBLookupDataBinding class instance and releases any allocated memory.  It frees the ListSource property before calling the inherited destructor.

Do not use the Destroy method in applications.  TcxCustomWebDBLookupDataBinding objects are freed automatically when their owning editors are destroyed.


TcxCustomWebDBLookupDataBinding.KeyField

TcxCustomWebDBLookupDataBinding          See Also

Returns the lookup dataset’s key field.

function KeyField: TcxCustomWebDataField;

Description

The KeyField method is used to obtain an object representing the key field of the lookup dataset.  This field is obtained by its name specified via the KeyFieldName property.


TcxCustomWebDBLookupDataBinding.KeyFieldIndex

TcxCustomWebDBLookupDataBinding          See Also

Returns the lookup key field’s index within its owning dataset.

function KeyFieldIndex: Integer;

Description

Values of a data source can be obtained by indexes of the desired record and field.  This can be done via the DisplayTexts property of a data source.  The KeyFieldIndex method is used to obtain the key field’s index within the lookup dataset and thus access its values.  This method makes use of the KeyField method in order to perform its task.


TcxWebDBLookup
 TcxWebDBLookup Object

Hierarchy          Properties          Methods          Events          See Also

Represents a lookup editor.

Unit

cxWebDBLookup

TcxWebDBLookup = class(TcxCustomWebDBLookup, IcxWebDataSourceSupport, IcxWebUpdateDataSupport, IcxWebViewDataSupport)

Description

Use the TcxWebDBLookup control when you need to add a lookup editor to your web page.  Lookup editors are data-aware, i.e. can be bound to a dataset field.  Moreover, they provide the ability to substitute edited values with their descriptions from another (lookup) dataset.  Values can be chosen from the dropdown window.

Use the TcxWebDBLookup control when editing a field containing values that are not readable (identifiers, for instance).  You can bind the editor to this field and to lookup dataset containing descriptions for edited values.  As the result, the control will display readable descriptions of edited values both within the editor and dropdown window.  Please refer to the DataBinding property description for details on binding the lookup editor to data.

If you want more than one column to be displayed within the dropdown window, consider using the TcxWebExtDBLookup control instead.


TcxWebDBLookup Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxWebFormControl

     |

TcxCustomWebListBox

     |

TcxCustomWebComboBox

     |

TcxCustomWebDBLookup


Properties for TcxWebDBLookup
TcxWebDBLookup Properties

TcxWebDBLookup          Legend

In TcxWebDBLookup

DataBinding

Derived from TcxCustomWebComboBox

Text

Derived from TcxCustomWebListBox

ItemHeight

ItemIndex

Items

MinSize

MultiSelect

SelCount

Size

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebDBLookup
TcxWebDBLookup Methods

TcxWebDBLookup          Legend

In TcxWebDBLookup

 CanGetData

 Create

 Destroy

 GetData

 RegisterRenderers

 ScriptsSubscription

 SetData

Derived from TcxCustomWebComboBox

CheckItemIndex

DoSetValues

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetItemIndex

GetMaxHeight

GetMinSize

RegisterValues

Derived from TcxCustomWebListBox

CheckNewSize

Clear

DoChange

GetMinHeight

GetSize

RegisterActions

RegisterEvents

SetItemIndex

SetSize

StyleChanged

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

SetState

ValidateContainer


Events for TcxWebDBLookup
TcxWebDBLookup Events

TcxWebDBLookup          Legend

Derived from TcxCustomWebListBox

OnChange

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebDBLookup.DataBinding

TcxWebDBLookup          See Also

Binds the lookup control to data.

property DataBinding: TcxWebLookupDataBinding;

Description

The TcxWebDBLookup control must be bound to both the data source containing its edited field and the lookup data source.  This can be performed via the DataBinding property.  Use this property to get access to the TcxWebLookupDataBinding object and modify this object’s properties as needed.

The DataSource, FieldName, ListSource, KeyFieldName and ListFieldName properties of the obtained object must be specified in order to provide the proper behavior of the lookup control.


TcxWebDBLookup.CanGetData

TcxWebDBLookup          See Also

Returns a value identifying whether the lookup control can return the data it displays.

function CanGetData: Boolean;

Description

This method implements the CanGetData method of the IcxWebUpdateDataSupport interface.  It is provided to determine whether the control has transmitted its data within the request.  Since the lookup editor’s base is a combo box, it always transmits its data within the request.  Thus the CanGetData method of the TcxWebDBLookup control simply returns True.

The CanGetData method’s return value is used to determine whether the GetData method should be called.


TcxWebDBLookup.Create

TcxWebDBLookup

Creates a new TcxWebDBLookup class instance.

constructor Create(AOwner: TComponent); override;

Description

Use the Create method to create a new TcxWebDBLookup control at runtime.  The AOwner parameter specifies the owner of the newly created control (typically a page module).

Do not forget to specify the Parent property of created controls.  Otherwise controls will not be displayed.


TcxWebDBLookup.Destroy

TcxWebDBLookup

Destroys the TcxWebDBLookup control.

desctructor Destroy; override;

Description

The Destroy method is used to dispose of the TcxWebDBLookup control and free any allocated memory. It releases the DataBinding property before calling the inherited constructor.

Do not use the Destroy method in applications.  Use the Free method instead.


TcxWebDBLookup.GetData

TcxWebDBLookup          See Also

Gets data displayed by the lookup control to update the associated data source.

function GetData: Variant;

Description

Each time the values of data-aware controls are posted to the associated data source, it should be updated.  The data source scans through all its clients for this purpose and gets their data.  It calls the GetData method of the IcxWebUpdateDataSupport interface implemented by data-aware controls.  The GetData method of the TcxWebDBLookup control implements this method.

The GetData method returns a value edited by the lookup control.  Note that this value usually doesn’t coincide with the control’s display value.  The reason is that lookup controls substitute their edit value with corresponding values from the lookup dataset.

The GetData method is called only if the CanGetData method returns True.


TcxWebDBLookup.RegisterRenderers

TcxWebDBLookup          See Also

Registers the renderer classes that generate HTML code representing the lookup control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers two classes used to render the HTML code for the lookup control.  One of these classes is specifically designed to render code for the Netscape Navigator 4.0 browser.  The other class is used to produce HTML code for all other browsers.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for a lookup control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxWebDBLookup.ScriptsSubscription

TcxWebDBLookup          See Also

Subscribes the lookup control to client side scripts.

procedure ScriptsSubscription; override;

Description

The ScriptsSubscription method subscribes the lookup control to a post back script.  This is required in order for the functionality to be available.  In addition, it calls the inherited method.

This method implements the ScriptsSubscription method of the IcxWebScripts interface.  You can override this method in descendant classes to subscribe your control to additional scripts.


TcxWebDBLookup.SetData

TcxWebDBLookup          See Also

Sets the properties of the control with respect to the field to which it is bound.

procedure SetData(Value: Variant; DisplayText: string);

Description

This method implements the SetData method of the IcxWebViewDataSupport interface.  It is provided to set the value of the lookup control to the value of the dataset field to which it is bound.  The value of the field is transmitted as the Value parameter.  The text to be displayed is passed as the DisplayText parameter.

As implemented in the TcxWebDBLookup class, the SetData method simply selects the item whose caption coincides with the DisplayText parameter.


TcxWebExtDBLookup
 TcxWebExtDBLookup Object

Hierarchy          Properties          Methods          Events          See Also

Represents the extended lookup control.

Unit

cxWebDBLookup

TcxWebExtDBLookup = class(TcxWebDBLookup, IcxWebDataSourceSupport)

Description

The extended lookup control is data-aware, i.e. it can be bound to a dataset field.  Moreover, it can be bound to another dataset to substitute the edited value with its description taken from this dataset’s field.  It also provides the dropdown window which is capable of displaying values of several lookup fields.

Use the TcxWebExtDBLookup control when it is necessary to edit field values that contain descriptions in another (lookup) dataset.  Suppose, the editor is bound to a field containing object IDs.  You can bind the control to a lookup dataset containing the same IDs and their descriptions.  You can choose this description field to substitute the edited value.  This makes edit values more readable.  Moreover, you can specify several lookup fields displayed within the dropdown window which allows you to choose the desired record.

Please refer to the DataBinding property description for more information on binding the TcxWebExtDBlookup control to a data source.

If you don’t need values of several fields to be displayed within the dropdown window, consider using the TcxWebDBLookup control.


TcxWebExtDBLookup Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxWebFormControl

     |

TcxCustomWebListBox

     |

TcxCustomWebComboBox

     |

TcxCustomWebDBLookup

     |

TcxWebDBLookup


Properties for TcxWebExtDBLookup
TcxWebExtDBLookup Properties

TcxWebExtDBLookup          Legend

In TcxWebExtDBLookup

ButtonImageIndex

ButtonStyles

ButtonWidth

DataBinding

EditorStyles

Images

LookupHeight

LookupWidth

Derived from TcxWebDBLookup

DataBinding

Derived from TcxCustomWebComboBox

Text

Derived from TcxCustomWebListBox

ItemHeight

ItemIndex

Items

MinSize

MultiSelect

SelCount

Size

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebExtDBLookup
TcxWebExtDBLookup Methods

TcxWebExtDBLookup          Legend

In TcxWebExtDBLookup

 Create

 Destroy

 DoSetValues

 RegisterRenderers

 RegisterValues

Derived from TcxWebDBLookup

 CanGetData

 GetData

 ScriptsSubscription

 SetData

Derived from TcxCustomWebComboBox

CheckItemIndex

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetItemIndex

GetMaxHeight

GetMinSize

Derived from TcxCustomWebListBox

CheckNewSize

Clear

DoChange

GetMinHeight

GetSize

RegisterActions

RegisterEvents

SetItemIndex

SetSize

StyleChanged

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

SetState

ValidateContainer


Events for TcxWebExtDBLookup
TcxWebExtDBLookup Events

TcxWebExtDBLookup          Legend

Derived from TcxCustomWebListBox

OnChange

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebExtDBLookup.ButtonImageIndex

TcxWebExtDBLookup          See Also

Specifies the image displayed as the lookup control’s dropdown button.

property ButtonImageIndex: Integer;

Description

Use the ButtonImageIndex property to specify the dropdown button image by its index within the source image collection.  The source images collection is specified via the Images property.

Note: if the ButtonImageIndex property value is negative or greater than the last available image index, the default dropdown image is displayed.  The default image is also used if the Images property is not specified.


TcxWebExtDBLookup.ButtonStyles

TcxWebExtDBLookup          See Also

Specifies the dropdown button’s style characteristics.

property ButtonStyles: TcxWebStyles;

Description

Use the ButtonStyles property to modify the dropdown button’s look & feel.  It provides access to the TcxWebStyles object.  Assign a style to the Default property of this object to change the dropdown button style.

Individual styles are created by means of the TcxWebStyleController component.


TcxWebExtDBLookup.ButtonWidth

TcxWebExtDBLookup          See Also

Specifies the dropdown button width in pixels.

property ButtonWidth: Integer;

Description

Use the ButtonWidth property to assign a custom width to the dropdown button.  This property cannot be set to a value less than the dropdown button image width.  Setting it to a value greater than the image width, doesn’t affect the image itself as this is centered within the button.

The dropdown button image is specified by the ButtonImageIndex property.


TcxWebExtDBLookup.DataBinding

TcxWebExtDBLookup          See Also

Binds the extended lookup control to data.

property DataBinding: TcxWebExtLookupDataBinding;

Description

The DataBinding property provides access to the TcxWebExtLookupDataBinding object whose properties are used to bind the extended lookup control to data.  The following is a list of the obtained object’s properties which must be specified:

•	The edited field and its owning data source (the FieldName and DataSource properties);

•	The lookup dataset and its fields whose values are displayed within the dropdown (the ListSource and ListFieldNames properties);

•	The lookup dataset field whose values are substituted into the editor (the ListFieldIndex property).


TcxWebExtDBLookup.EditorStyles

TcxWebExtDBLookup          See Also

Specifies the editor’s style characteristics.

property EditorStyles: TcxWebStyles;

Description

The EditorStyles property provides access to the TcxWebStyles object used to specify an object’s appearance.  Assign a style to the Default property of the obtained object to change the look & feel of the editor area.

Individual styles are created and adjusted by means of the TcxWebStyleController component.


TcxWebExtDBLookup.Images

TcxWebExtDBLookup          See Also

Represents the source of images for the extended lookup control.

property Images: TcxWebImageList;

Description

Extended lookup controls can display custom images in their dropdown buttons.  First, the TcxWebImageList component containing the desired image must be assigned to the Images property for this purpose.  The desired image’s index must be assigned to the ButtonImageIndex property.

Note: if the Images property is not set, the dropdown button will display its default image.


TcxWebExtDBLookup.LookupHeight

TcxWebExtDBLookup          See Also

Specifies the dropdown grid height in pixels.

property LookupHeight: Integer;

Description

Dropdown windows of lookup controls consist of the header panel containing column captions and a data grid which lists the lookup dataset records.  The header panel’s height cannot be changed.  However, you can change the data grid’s height via the LookupHeight property.

If the LookupHeight property value is 0 or negative, the dropdown window displays all records from the lookup dataset.


TcxWebExtDBLookup.LookupWidth

TcxWebExtDBLookup          See Also

Specifies the drop down window width in pixels.

property LookupWidth: Integer;

Description

Use the LookupWidth property to specify the dropdown window width.  This property value cannot be set to a value less than the lookup control’s width.

Note: dropdown windows’ left edge always coincides with the lookup control’s left edge.


TcxWebExtDBLookup.Create

TcxWebExtDBLookup

Creates a new TcxWebExtDBLookup object.

procedure Create(AOwner: TComponent); override;

Description

Use the constructor to create a new TcxWebExtDBLookup control at runtime.  The AOwner parameter specifies the owner of the newly created control (typically a page module).

Do not forget to set the Parent property of the control.  Otherwise it will not be displayed.


TcxWebExtDBLookup.Destroy

TcxWebExtDBLookup

Destroys the TcxWebExtDBLookup control.

procedure Destroy; override;

Description

The destroy method is used to dispose of the TcxWebExtDBLookup control and free any allocated memory.  It frees the DataBinding, ButtonStyles and EditorStyles properties before calling the inherited destructor.

Do not use the Destroy method in applications.  Use the Free method instead.


TcxWebExtDBLookup.DoSetValues

TcxWebExtDBLookup          See Also

Updates the lookup control with changes made by the end user.

procedure DoSetValues; override;

Description

The request contains the key field value corresponding to the last selected lookup record.  This information is used to set the value of the ItemIndex property in order to update the control with respect to changes made at the client browser.  This is performed by the DoSetValues method.

This method implements the IcxWebValues interface’s DoSetValues method.


TcxWebExtDBLookup.RegisterRenderers

TcxWebExtDBLookup          See Also

Registers the renderer classes that generate HTML code representing the control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers two renderer classes designed to render HTML code for the control.  One of these classes is specifically designed to render code for the Netscape Navigator 4.0 browser.  The other class is used to produce HTML code for all other browsers.

You can override the RegisterRenderers method in descendant classes to register your own renderer classes for a control.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxWebExtDBLookup.RegisterValues

TcxWebExtDBLookup          See Also

Registers HTML elements, which contain data related to the control.

procedure RegisterValues; override;

Description

The RegisterValues method is used to register HTML elements containing data related to the lookup control.  It registers the hidden INPUT tag containing the lookup key value corresponding to the currently selected record.  This is needed to determine the index of the selected item after end-user manipulations.  The DoSetValues method implements the update of the ItemIndex property.

This method implements the RegisterValues method of the IcxWebValues interface.  It can be overridden in descendant classes to register other or additional HTML elements.


TcxWebExtLookupDataBinding
TcxWebExtLookupDataBinding Object

Hierarchy          Properties          Methods          See Also

Binds the TcxWebExtDBLookup control to data.

Unit

cxWebDBLookup

TcxWebExtLookupDataBinding = class(TcxCustomWebDBLookupDataBinding)

Description

The TcxWebExtDBLookup control provides the ability to substitute the edited field value with the corresponding field value from the lookup dataset.  Moreover, its dropdown window can display values of several lookup fields arranged into records.  Thus the TcxWebExtLookupDataBinding class provides properties for binding the lookup control to a dataset field and to a number of fields of the lookup dataset.

The TcxWebExtLookupDataBinding class inherits all the functionality needed to bind the editor to a dataset field.  This is performed via the DataSource and FieldName properties.  Moreover, the functionality of binding the control to a lookup dataset is also inherited.  Use the ListSource and KeyFieldName properties for this purpose.  The introduced ListFieldNames and ListFieldIndex properties allow you to specify fields whose values will be displayed within the dropdown and to choose the field whose values are substituted into the editor.

You can access a TcxWebExtLookupDataBinding object via the DataBinding property of TcxWebExtDBLookup controls.


TcxWebExtLookupDataBinding Hierarchy
Hierarchy

TPersistent

     |

TcxAbstractWebDataBinding

     |

TcxCustomWebDataBinding

     |

TcxWebDataBinding

     |

TcxCustomWebDBLookupDataBinding


Properties for TcxWebExtLookupDataBinding
TcxWebExtLookupDataBinding Properties

TcxWebExtLookupDataBinding          Legend

In TcxWebExtLookupDataBinding

ListFieldCount

ListFieldIndex

ListFieldNames

ListFields

WebExtDBLookup

Derived from TcxCustomWebDBLookupDataBinding

KeyFieldName

ListSource

Derived from TcxWebDataBinding

Field

FieldIndex

FieldName

Derived from TcxCustomWebDataBinding

DataSource

Derived from TcxAbstractWebDataBinding

Component

DataSource


Methods for TcxWebExtLookupDataBinding
TcxWebExtLookupDataBinding Methods

TcxWebExtLookupDataBinding          Legend

In TcxWebExtLookupDataBinding

 ChangedDataLayout

 Create

 Destroy

 ListField

Derived from TcxCustomWebDBLookupDataBinding

 Destroy

 KeyField

 KeyFieldIndex

Derived from TcxWebDataBinding

 Assign

 ChangedDataLayout

 GetFieldIndex

 GetFirstVisibleRow

 GetPageSize

 UpdateData

Derived from TcxCustomWebDataBinding

 Assign

 ChangedDataLayout

 GetDataSource

 GetFieldIndex

 GetFirstVisibleRow

 GetPageSize

 SetDataSource

 UpdateData

 WriteScripts

Derived from TcxAbstractWebDataBinding

 Assign

 Create

 GetDataSource


TcxWebExtLookupDataBinding.ListFieldCount

TcxWebExtLookupDataBinding          See Also

Returns the number of fields displayed within the dropdown window.

property ListFieldCount: Integer;

Description

The ListFieldCount property is used to obtain the number of fields specified by the ListFieldNames property.  This value is equal to the number of column displayed within the lookup control’s dropdown window.

The ListFieldIndex property value must be less than the ListFieldCount property value.  Otherwise no data will be displayed by the TcxWebExtDBLookup control.

ReadOnly Property


TcxWebExtLookupDataBinding.ListFieldIndex

TcxWebExtLookupDataBinding          See Also

Specifies the field index whose values are displayed within the extended lookup control.

property ListFieldIndex: Integer;

Description

The TcxWebExtDBLookup control can display a number of columns within its dropdown.  Fields providing data for these column are specified via the ListFieldNames property.  The ListFieldIndex property, in turn, specifies which of these fields’ values will be displayed within the control itself.  The field is specified by its zero-based index.

Note: If the ListFieldIndex property value is not less than the number of fields (as it is zero-based), no data will be displayed within the lookup control.  The number of fields can be obtained via the ListFieldCount property.


TcxWebExtLookupDataBinding.ListFieldNames

TcxWebExtLookupDataBinding          See Also

Specifies the list of lookup fields that provide data for columns within the control’s dropdown window.

property ListFieldNames: string;

Description

Set the ListFieldNames  property to a string containing lookup field names separated by semicolons.  The number of names specifies the number of columns within the dropdown window.  Each column is bound to the field with the corresponding index.  Column captions are specified by corresponding field names.

The source of fields whose names are set via the ListFieldNames property is specified by the ListSource property.  The ListFieldIndex property is used to specify the field whose values are displayed within the editor.


TcxWebExtLookupDataBinding.ListFields

TcxWebExtLookupDataBinding          See Also

Provides indexed access to fields whose values are displayed within the dropdown window.

property ListFields[Index: Integer]: TcxCustomWebDataField;

Description

The ListFields property is used to obtain access to lookup fields displayed within the dropdown window.  The Index parameter represents the zero-based index of the required field.  Lookup fields and their order are specified via the ListFieldNames property.

If the lookup dataset (the ListSource property) is not assigned or the specified field index is out of range, the ListFields property returns nil.  Fields indexes range from 0 to one less than the ListFieldCount property value.

ReadOnly Property


TcxWebExtLookupDataBinding.WebExtDBLookup

TcxWebExtLookupDataBinding          See Also

Provides access to the lookup control bound to data by means of the TcxWebExtLookupDataBinding object.

property WebExtDBLookup: TcxWebExtDBLookup;

Description

The WebExtDBLookup property is used to access the owning TcxWebExtDBLookup control.  It converts the Component property to the proper type in order to return its value.  The Component property value, in turn, is initialized in the constructor.

ReadOnly Property


TcxWebExtLookupDataBinding.ChangedDataLayout

TcxWebExtLookupDataBinding          See Also

Responds to changes in associated data sources.

procedure ChangedDataLayout(Sender: TcxCustomWebDataSource); override;

Description

The ChangedDataLayout method is automatically called when changes occur in data sources specified by the DataSource and ListSource properties.  It is intended to update the control’s display values.  The Sender parameter can be used to identify the changed source of data.  The ChangedDataLayout method responds to changes in the lookup data source (the ListSource property) and calls its inherited method.  The inherited method updates the control because of changes in the data source containing the edited field (the DataSource property).

This method implements the ChangedDataLayout method of the IcxWebDataSourceSupport interface.  The TcxWebExtDBLookup control delegates this interface implementation to the TcxWebExtLookupDataBinding object via its DataBinding property.


TcxWebExtLookupDataBinding.Create

TcxWebExtLookupDataBinding

Creates an instance of the TcxWebExtLookupDataBinding class.

procedure Create(AComponent: TComponent); override;

Description

The Create method is used to create a new TcxWebExtLookupDataBinding object.  The AComponent parameter specifies the lookup control which will use the newly created object for data binding.  This value is assigned to the Component property.

Do not create instances of the TcxWebExtLookupDataBinding object in applications.  Such objects are created automatically when the TcxWebExtDBLookup control initializes its DataBinding property.


TcxWebExtLookupDataBinding.Destroy

TcxWebExtLookupDataBinding

Destroys the TcxWebExtLookupDataBinding object.

procedure Destroy; override;

Description

The Destroy method is used to dispose of the TcxWebExtLookupDataBinding class instance and free any allocated memory.  You don’t need to use this method in applications.  TcxWebExtLookupDataBinding objects are freed automatically when the owning TcxWebExtDBLookup control is destroyed.


TcxWebExtLookupDataBinding.ListField

TcxWebExtLookupDataBinding          See Also

Returns the lookup field whose values are displayed within the editor.

function ListField: TcxCustomWebDataField;

Description

The ListField property is used to obtain an object representing the lookup field whose values are displayed within the editor.  This field is specified by the ListFieldIndex property.  The ListField property makes use of the ListFields property to return its value.


TcxWebLookupDataBinding
TcxWebLookupDataBinding Object

Hierarchy          Properties          Methods          See Also

Binds the TcxWebDBLookup control to data.

Unit

cxWebDBLookup

TcxWebLookupDataBinding = class(TcxCustomWebDBLookupDataBinding)

Description

The TcxWebDBLookup control is used to edit dataset field values.  It provides the ability of substituting its edited value with the description from the lookup dataset’s field.  Thus the TcxWebDBLookupDataBinding class properties allow you to specify two data sources via its DataSource and ListSource properties.

The FieldName property of this class specifies a field from the dataset bound via the DataSource property.  This field value is edited by the lookup control.

Two fields from the ListSource data source must be specified.  The KeyFieldName property binds the edited field to the lookup dataset.  Values of the field set via the ListFieldName property are actually displayed within the editor and its dropdown window.

Use the DataBinding property of the TcxWebDBLookup control to access the TcxWebLookupDataBinding class properties.


TcxWebLookupDataBinding Hierarchy
Hierarchy

TPersistent

     |

TcxAbstractWebDataBinding

     |

TcxCustomWebDataBinding

     |

TcxWebDataBinding

     |

TcxCustomWebDBLookupDataBinding


Properties for TcxWebLookupDataBinding
TcxWebLookupDataBinding Properties

TcxWebLookupDataBinding          Legend

In TcxWebLookupDataBinding

ListFieldName

WebDBLookup

Derived from TcxCustomWebDBLookupDataBinding

KeyFieldName

ListSource

Derived from TcxWebDataBinding

Field

FieldIndex

FieldName

Derived from TcxCustomWebDataBinding

DataSource

Derived from TcxAbstractWebDataBinding

Component

DataSource


Methods for TcxWebLookupDataBinding
TcxWebLookupDataBinding Methods

TcxWebLookupDataBinding          Legend

In TcxWebLookupDataBinding

 ChangedDataLayout

 ListField

 ListFieldIndex

Derived from TcxCustomWebDBLookupDataBinding

 Destroy

 KeyField

 KeyFieldIndex

Derived from TcxWebDataBinding

 Assign

 ChangedDataLayout

 GetFieldIndex

 GetFirstVisibleRow

 GetPageSize

 UpdateData

Derived from TcxCustomWebDataBinding

 Assign

 ChangedDataLayout

 GetDataSource

 GetFieldIndex

 GetFirstVisibleRow

 GetPageSize

 SetDataSource

 UpdateData

 WriteScripts

Derived from TcxAbstractWebDataBinding

 Assign

 Create

 GetDataSource


TcxWebLookupDataBinding.ListFieldName

TcxWebLookupDataBinding          See Also

Specifies the lookup dataset’s field displayed within the lookup editor and its dropdown window.

property ListFieldName: string;

Description

The TcxWebDBLookup control is used to substitute the edited dataset field values with values from a lookup dataset.  The edited field is bound to a lookup dataset via the KeyFieldName property.  The ListFieldName property, in turn, specifies the field from the same dataset displayed within the editor and its dropdown window.

The editor displays the value from the lookup dataset record, with the same key field value as the edited field value.

Suppose the lookup control edits a field containing IDs.  This field and its owning dataset are specified via the FieldName and DataSource properties.  Consider another dataset containing fields with these IDs and their corresponding descriptions.  The ListSource, KeyFieldName and ListFieldName properties must be set to this dataset, the IDs field and the descriptions field respectively.  As the result, the lookup editor will display descriptions instead of IDs.  Its dropdown window will contain all the descriptions from the ListFieldName field.


TcxWebLookupDataBinding.WebDBLookup

TcxWebLookupDataBinding          See Also

Returns the lookup control bound to data by means of this TcxWebLookupDataBinding object.

property WebDBLookup: TcxWebDBLookup;

Description

The WebDBLookup property provides access to the TcxWebDBLookup control owning this data binding object.  This property converts the Component property value to a proper type to return its value.  The Component property value is initialized in the constructor.

ReadOnly Property


TcxWebLookupDataBinding.ChangedDataLayout

TcxWebLookupDataBinding          See Also

Responds to changes in the associated datasets.

procedure ChangedDataLayout(Sender: TcxCustomWebDataSource); override;

Description

The ChangedDataLayout method is called automatically when changes occur in data sources specified by the DataSource or ListSource properties.  It performs changes necessary to reflect the lookup dataset changes and calls the inherited method.  The inherited method, in turn, is used to update the control due to changes in the data source caused by editing field values.

This method implements the ChangedDataLayout method of the IcxWebDataSourceSupport interface.  The TcxWebDBLookup control delegates this interface implementation to the TcxWebLookupDataBinding object which is accessed via its DataBinding property.


TcxWebLookupDataBinding.ListField

TcxWebLookupDataBinding          See Also

Returns the field whose values are displayed within the editor and its dropdown window.

function ListField: TcxCustomWebDataField;

Description

The ListField method is used to obtain an object representing the lookup dataset’s field whose values are displayed within the editor.  This field is specified by its name via the ListFieldName property.


TcxWebLookupDataBinding.ListFieldIndex

TcxWebLookupDataBinding          See Also

Returns the index of the field whose values are displayed within the editor and its dropdown window.

function ListFieldIndex: Integer;

Description

Values from a data source can be accessed by specifying indexes of the desired field and record.  This can be performed via the DisplayTexts property of a data source, for instance.  The ListFieldIndex method gets the index of the field specified by the ListFieldName property, and thus allows access to its values.  It makes use of the ListField method call in order to perform the task.


cxWebteeChart Unit Overview
cxWebTeeChart Unit

Classes

TcxCustomWebChart

TcxWebChart


TcxCustomWebChart
TcxCustomWebChart Object

Hierarchy          Properties          Methods          Events          See Also

Serves as the base for chart controls.

Unit

cxWebTeeChart

TcxCustomWebChart = class(TcxCustomWebImage)

Description

The TcxCustomWebChart control implements the basic functionality of chart controls.  This functionality is the same as provided by the standard TCustomChart class.  Property values of the TcxCustomWebChart class are read /assigned via the corresponding properties of the TCustomChart object.  This object is accessed via the Chart property.

The TcxCustomWebChart class also implements the rendering procedure used by all chart controls.  Rendering is performed by generating HTML code required to represent the underlying control’s image on a web page.

When changing a property value of the TcxCustomWebChart class, the following actions are actually performed:

•	A new value is assigned to the corresponding property of the underlying control.

•	The underlying control is repainted due to property value change.

•	The web chart control is rendered using the underlying control’s new image.


TcxCustomWebChart Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxCustomWebImage


Properties for TcxCustomWebChart
TcxCustomWebChart Properties

TcxCustomWebChart          Legend

In TcxCustomWebChart

AxisVisible

BackImage

BackImageInside

BackImageMode

BackWall

BottomAxis

BottomWall

Chart

Chart3DPercent

ClipPoints

DepthAxis

Foot

Frame

Gradient

LeftAxis

LeftWall

Legend

MarginBottom

MarginLeft

MarginRight

MarginTop

MaxPointsPerPage

Monochrome

Page

RightAxis

SeriesList

Title

TopAxis

View3D

View3DOptions

View3DWalls

Derived from TcxCustomWebImage

AltText

DesignPicturePath

DisplayStyle

HorzSpace

PictureURL

VertSpace

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxCustomWebChart
TcxCustomWebChart Methods

TcxCustomWebChart          Legend

In TcxCustomWebChart

 Create

 CreateChart

 Destroy

 DoBeforeRender

Derived from TcxCustomWebImage

RegisterRenderers

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

Create

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

ScriptsSubscription

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterActions

RegisterEvents

RegisterValues

SetState

ValidateContainer


Events for TcxCustomWebChart
TcxCustomWebChart Events

TcxCustomWebChart          Legend

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxCustomWebChart.AxisVisible

TcxCustomWebChart          See Also

Specifies whether chart axes are visible.

property AxisVisible: Boolean;

Description

Set this property to False to hide all chart axes at once.  If this property value is True, axes visibility is specified by the Visible property of chart axes.  Objects representing individual axes can be obtained via the LeftAxis, TopAxis, RightAxis and BottomAxis properties.


TcxCustomWebChart.BackImage

TcxCustomWebChart          See Also

Specifies the background image displayed by the chart control.

property BackImage: TPicture;

Description

Use the BackImage property to display an image within your chart control.  The specified image can be displayed either on the chart’s back wall or outside the chart frame area.  Use the BackImageInside property to specify where it must be shown.


TcxCustomWebChart.BackImageInside

TcxCustomWebChart          See Also

Specifies whether the background image is displayed within the chart back wall.

property BackImageInside: Boolean;

Description

Set the BackImageInside property to True to display the image specified by the BackImage property within the chart back wall.  Otherwise this image will be displayed as the background for the whole chart panel.


TcxCustomWebChart.BackImageMode

TcxCustomWebChart          See Also

Specifies the display mode of the chart background image.

TTeeBackImageMode = (pbmStretch, pbmTile, pbmCenter);

property BackImageMode: TTeeBackImageMode;

Description

Use the BackImageMode property to specify whether the background image should be stretched to fill the entire background, tiled or centered.  Please refer to the TTeeBackImageMode type description for details.

The background image is specified by the BackImage property.  The area it occupies is determined by the BackImageInside property value.


TcxCustomWebChart.BackWall

TcxCustomWebChart          See Also

Provides access to the object that contains settings for the back wall of the chart.

property BackWall: TChartWall;

Description

Use the BackWall property to obtain an object whose properties are used for customizing the back wall of the chart.  Note, that the View3D and View3DWalls properties must be set to True in order to display chart walls.


TcxCustomWebChart.BottomAxis

TcxCustomWebChart          See Also

Provides access to the object that contains settings for the bottom axis of the chart.

property BottomAxis: TChartAxis;

Description

Use the BottomAxis property to obtain access to properties that allow you to customize the bottom chart axis.  Please refer to the TChartAxis class description for details.

The chart control provides the top and bottom horizontal axes.  Series are associated with the bottom axis by default.  However, you can use the HorzAxis property of the TChartSeries object to associate a series with either the top or bottom axis.  If no series is associated with an axis, the axis is not displayed.


TcxCustomWebChart.BottomWall

TcxCustomWebChart          See Also

Provides access to the object that contains settings for the bottom wall of the chart.

property BottomWall: TChartWall;

Description

Use the BottomWall property to obtain an object whose properties are used for customizing the bottom wall of the chart.  Note, that the View3D and View3DWalls properties must be set to True in order to display chart walls.


TcxCustomWebChart.Chart

TcxCustomWebChart          See Also

Returns the TCustomChart descendant used to implement the web chart functionality.

property Chart: TCustomChart;

Description

Web chart controls use TCustomChart descendants in order to implement its functionality.  When assigning a web chart property value, it is really assigned to the underlying chart control’s property.  Reading a property value involves reading the corresponding property value of the underlying control.  The web chart control is rendered by obtaining the underlying chart control’s image and by displaying it on a web page.

The Chart property provides access to the underlying chart control.  It can be overridden in derived classes to return a value of the proper type.

ReadOnly Property


TcxCustomWebChart.Chart3DPercent

TcxCustomWebChart

Specifies the size ratio between the chart depth and its dimensions.

property Chart3DPercent: Integer;

Description

Use the Chart3DPercent property to specify the chart depth relative to its dimensions.  This property value can vary from 1 to 100.  Setting the Chart3DPercent property to 1 changes the chart look & feel nearly to flat.

This property is in effect only when the View3D property value is True.  In other words, series must be painted emulating the 3D effect.


TcxCustomWebChart.ClipPoints

TcxCustomWebChart

Specifies whether chart points are drawn within chart boundaries.

property ClipPoints: Boolean;

Description

When creating point series, some of points may overlap axes and other chart regions outside the chart boundaries.  If the ClipPoints property is set to True, the chart control prohibits such behavior and points are clipped within the chart boundaries.


TcxCustomWebChart.DepthAxis

TcxCustomWebChart          See Also

Provides access to the object containing the depth axis settings.

property DepthAxis: TChartDepthAxis;

Description

Use the DepthAxis property to access the TChartDepthAxis object whose properties are used to customize the depth axis.  This axis is useful when displaying multiple series that must be labeled.


TcxCustomWebChart.Foot

TcxCustomWebChart          See Also

Provides access to the chart footer settings.

property Foot: TChartTitle;

Description

Use the Foot property to customize the chart footer.  Footer settings are represented by properties of the TChartTitle object returned by this property.  These properties allow you to specify the footer text and its look & feel.


TcxCustomWebChart.Frame

TcxCustomWebChart          See Also

Specifies the chart borders settings.

property Frame: TChartPen;

Description

Use the Frame property to access the TChartPen object whose properties specify chart border characteristics.  You can use these properties to specify the border color, style, width, visibility, etc.  Please refer to the TChartPen class description for details.

Borders can be painted around the chart only when it is painted flat.  Thus the Frame property settings have visual effect only when the View3D property value is False.


TcxCustomWebChart.Gradient

TcxCustomWebChart          See Also

Specifies the gradient filling settings for the chart control.

property Gradient: TChartGradient;

Description

Use the Gradient property to obtain the TChartGradient object whose properties control the gradient filling of the chart.  These properties allow you to specify the starting and ending colors of the gradient, its direction and visibility.  Please refer to the TChartGradient class description for details on implementing gradient background for the chart control.


TcxCustomWebChart.LeftAxis

TcxCustomWebChart          See Also

Provides access to the object containing settings of the left axis.

property LeftAxis: TChartAxis;

Description

Use the LeftAxis property to obtain access to properties that allow you to customize the left chart axis.  Please refer to the TChartAxis class description for details.

The chart control provides right and left vertical axes.  Series are associated with the left axis by default.  However, you can use the VertAxis property of the TChartSeries object to associate a series with either the left or right axis.  If no series is associated with an axis, the axis is not displayed.


TcxCustomWebChart.LeftWall

TcxCustomWebChart          See Also

Provides access to the object that contains settings for the left wall of the chart.

property LeftWall: TChartWall;

Description

Use the LeftWall property to obtain an object whose properties are used for customizing the left wall of the chart.  Note, that the View3D and View3DWalls properties must be set to True in order to display chart walls.


TcxCustomWebChart.Legend

TcxCustomWebChart

Provides access to the object that contains legend settings.

property Legend: TChartLegend;

Description

Use the Legend property to obtain the object whose properties are used to customize the legend displayed by the chart control.  These properties allow you to set the legend visibility, customize its look & feel and specify the data that it displays.  Please refer to the TChartLegend class description for details.


TcxCustomWebChart.MarginBottom

TcxCustomWebChart          See Also

Specifies the bottom margin of the chart control in pixels.

property MarginBottom: Integer;

Description

Use the MarginBottom property to specify the height of the space between the control’s bottom edge and any of its elements.  If this property value is negative, the bottom of chart elements will be located below the control’s bottom edge.


TcxCustomWebChart.MarginLeft

TcxCustomWebChart          See Also

Specifies the left margin of the chart control in pixels.

property MarginLeft: Integer;

Description

Use the MarginLeft property to specify the width of the space between the control’s left edge and any of its elements.  If this property value is negative, the left part of chart elements will be located outside the control’s left edge.


TcxCustomWebChart.MarginRight

TcxCustomWebChart          See Also

Specifies the right margin of the chart control in pixels.

property MarginRight: Integer;

Description

Use the MarginRight property to specify the width of the space between the control’s right edge and any of its elements.  If this property value is negative, the right part of chart elements will be located outside the control’s right edge.


TcxCustomWebChart.MarginTop

TcxCustomWebChart          See Also

Specifies the top margin of the chart control in pixels.

property MarginTop: Integer;

Description

Use the MarginTop property to specify the height of the space between the control’s top edge and any of its elements.  If this property value is negative, the top of chart elements will be located above the control’s top edge.


TcxCustomWebChart.MaxPointsPerPage

TcxCustomWebChart          See Also

Specifies the number of points that are displayed within a single page.

property MaxPointsPerPage: LongInt;

Description

If the MaxPointsPerPage property value is 0, the chart control displays all the points from the point series.  Otherwise (if it is greater than zero), point series are divided into pages each containing the number of points specified by the MaxPointsPerPage property value.  The page currently displayed is specified by the Page property.


TcxCustomWebChart.Monochrome

TcxCustomWebChart

Help is not yet available.

property Monochrome: Boolean;

Description

Help is not yet available.


TcxCustomWebChart.Page

TcxCustomWebChart          See Also

Specifies the currently displayed page by its index.

property Page: LongInt;

Description

Point series can be split into several pages by setting the MaxPointsPerPage property to a value greater than 0.  You can switch between pages using the Page property in such an instance.  This property cannot be set to a value less than 1 (the first page’s index).


TcxCustomWebChart.RightAxis

TcxCustomWebChart          See Also

Provides access to the object containing settings of the right axis.

property RightAxis: TChartAxis;

Description

Use the RightAxis property to obtain access to properties that allow you to customize the right chart axis.  Please refer to the TChartAxis class description for details.

The chart control provides right and left vertical axes.  Series are associated with the left axis by default.  However, you can use the VertAxis property of the TChartSeries object to associate a series with either the left or right axis.  If no series is associated with an axis, the axis is not displayed.


TcxCustomWebChart.SeriesList

TcxCustomWebChart

Provides access to the collection of series displayed by the chart control.

property SeriesList: TChartSeriesList;

Description

Use the SeriesList property to obtain the TChartSeriesList object representing the collection of series in this chart control.  Please refer to the TChartSeriesList class description for more information on manipulating series.

ReadOnly Property


TcxCustomWebChart.Title

TcxCustomWebChart          See Also

Provides access to the chart title settings.

property Title: TChartTitle;

Description

Use the Title property to customize the chart title.  Title settings are represented by properties of the TChartTitle object returned by this property.  These properties allow you to specify the title text and its look & feel.


TcxCustomWebChart.TopAxis

TcxCustomWebChart          See Also

Provides access to the object containing settings for the top axis of the chart.

property TopAxis: TChartAxis;

Description

Use the TopAxis property to obtain access to properties that allow you to customize the top chart axis.  Please refer to the TChartAxis class description for details.

The chart control provides top and bottom horizontal axes.  Series are associated with the bottom axis by default.  However, you can use the HorzAxis property of the TChartSeries object to associate a series with either the top or bottom axis.  If no series is associated with an axis, the axis is not displayed.


TcxCustomWebChart.View3D

TcxCustomWebChart          See Also

Specifies whether the chart and its series are drawn emulating a 3D effect.

property View3D: Boolean;

Description

Use the View3D property to specify whether the chart control paints series with a 3D effect.  If this property is set to False, series are drawn flat.  If the series are painted in 3D, you can control the proportion of chart depth to its dimensions via the Chart3DPercent property.

If the 3D effect is not emulated, chart walls cannot be painted.  Thus the View3DWalls property is not in effect in such an instance.


TcxCustomWebChart.View3DOptions

TcxCustomWebChart          See Also

Specifies the spatial position and orientation of the chart.

property View3DOptions: TView3dOptions;

Description

Use the View3DOptions property to access the TView3dOptions object whose properties control the spatial position and orientation of the chart.  These properties allow you to rotate and move the chart in all dimensions.  Please refer to the TView3dOptions class description for details.

Note: the View3D property value must be True to display chart series emulating the 3D effect.


TcxCustomWebChart.View3DWalls

TcxCustomWebChart          See Also

Specifies whether chart walls are displayed.

property View3DWalls: Boolean;

Description

If the chart is painted in 3D, it can be bounded by a box (the View3D property value must be True for this purpose).  The chart control can display the left, bottom and back walls of the bounding box.  These walls’ settings can be controlled via the LeftWall, BottomWall and BackWall properties, thus allowing you to control the appearance and visibility of each individual wall.

If the View3DWalls property value is False, no walls are displayed regardless of the settings of the individual walls.


TcxCustomWebChart.Create

TcxCustomWebChart

Creates a new chart control.

procedure Create(AOwner: TComponent); override;

Description

Use the constructor to add a new chart control onto the form at runtime.  The AOwner parameter specifies the owner of the control (typically a page module).  The Create method initializes the Chart property using the CreateChart method call after the inherited constructor has been executed.

Don’t forget to specify the Parent property of the newly created control.  Otherwise it will not be displayed.


TcxCustomWebChart.CreateChart

TcxCustomWebChart          See Also

Creates the web chart control’s underlying control.

function CreateChart(AOwner: TComponent): TCustomChart; virtual; abstract;

Description

The web chart control uses its underlying chart control (TCustomChart descendant) in order to implement its functionality.  All properties of the web chart control simply map to the underlying control’s properties.  The web control is rendered as an image resulting from the underlying control’s appearance.

The underlying control of the web chart can be obtained via the Chart property.  The CreateChart method is provided to initialize this property value.

The CreateChart method is abstract in the TcxCustomWebChart class.  Descendants must override this method to create and return proper TCustomChart descendants.


TcxCustomWebChart.Destroy

TcxCustomWebChart

Destroys the chart control.

procedure Destroy; override;

Description

The Destroy method is used to dispose of the chart control and free any allocated memory.  It frees the Chart property before calling the inherited constructor.

Do not use the Destroy method in applications. Use the Free method instead.


TcxCustomWebChart.DoBeforeRender

TcxCustomWebChart          See Also

Performs operations required prior to the chart control rendering.

procedure DoBeforeRender; override;

Description

The DoBeforeRender method is called automatically before the control is rendered.  It is used by the web chart control to assign a proper value to the inherited PictureURL property.  The underlying chart control’s appearance is saved to an image for  this purpose.  Thus the web chart control is rendered as an image.  The rendering procedure is implemented in its ancestor TcxWebImage class.


TcxWebChart
 TcxWebChart Object

Hierarchy          Properties          Methods          Events          See Also

Represents the web chart control.

Unit

cxWebteeChart

TcxWebChart = class(TcxCustomWebChart)

Description

Use the TcxWebChart control to add a chart onto a web page.  This control is based upon the standard TChart control and thus provides the same functionality.  It also provides you the same advanced designer for customizing the control’s look & feel and displayed series.

The basic functionality of the web chart control is implemented in its ancestor TcxCustomWebChart class.  The TcxWebChart class simply overrides the Chart property in order to use the TChart as its underlying control.


TcxWebChart Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl

     |

TcxCustomWebImage

     |

TcxCustomWebChart


Properties for TcxWebChart
TcxWebChart Properties

TcxWebChart          Legend

In TcxWebChart

Chart

Derived from TcxCustomWebChart

AxisVisible

BackImage

BackImageInside

BackImageMode

BackWall

BottomAxis

BottomWall

Chart

Chart3DPercent

ClipPoints

DepthAxis

Foot

Frame

Gradient

LeftAxis

LeftWall

Legend

MarginBottom

MarginLeft

MarginRight

MarginTop

MaxPointsPerPage

Monochrome

Page

RightAxis

SeriesList

Title

TopAxis

View3D

View3DOptions

View3DWalls

Derived from TcxCustomWebImage

AltText

DesignPicturePath

DisplayStyle

HorzSpace

PictureURL

VertSpace

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebChart
TcxWebChart Methods

TcxWebChart          Legend

Derived from TcxCustomWebChart

 Create

 CreateChart

 Destroy

 DoBeforeRender

Derived from TcxCustomWebImage

RegisterRenderers

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

Create

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

ScriptsSubscription

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

DoSetValues

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterActions

RegisterEvents

RegisterValues

SetState

ValidateContainer


Events for TcxWebChart
TcxWebChart Events

TcxWebChart          Legend

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebChart.Chart

TcxWebChart          See Also

Returns the chart control used to implement the web chart functionality.

property Chart: TChart;

Description

The TcxWebChart control uses the TChart control in order to implement its functionality.  When assigning a web chart property value, it is really assigned to the underlying chart control’s property.  Reading a property value involves reading the corresponding property value of the underlying control.  The web chart control is rendered by obtaining the underlying chart control’s image and displaying it on a web page.

The Chart property provides access to the underlying control.  It overrides the base class property to return a value of the proper type.

ReadOnly Property


cxWebNavBar Unit Overview
cxWebNavBar Unit

Classes

TcxWebNavBar

TcxWebNavBarGroup

TcxWebNavBarGroupItem

TcxWebNavBarGroupItems

TcxWebNavBarGroups


TcxWebNavBar
 TcxWebNavBar Object

Hierarchy          Properties          Methods          Events          See Also

Represents an NavBar control.

Unit

cxWebNavBar

TcxWebNavBar = class(TcxWebControl)

Description

The TcxWebNavBar class represents a control capable of displaying groups of items.  Groups are displayed one under another.  Each group can be expanded and collapsed in order to show or hide its items.  End users can also change the order of the groups via drag & drop.

Each group of the NavBar control can contain a number of items.  Items are arranged vertically within a group.  Each item can display custom text, images and serve as a link.


TcxWebNavBar Hierarchy
Hierarchy

TComponent

     |

TcxWebComponent

     |

TcxWebControl


Properties for TcxWebNavBar
TcxWebNavBar Properties

TcxWebNavBar          Legend

In TcxWebNavBar

Groups

HeaderCollapsedStyles

HeaderStyles

Images

LeftCollapsedImageIndex

LeftExpandedImageIndex

RightCollapsedImageIndex

RightExpandedImageIndex

SeparatorWidth

Derived from TcxWebControl

AbsLeft

AbsTop

Attributes

BoundsRect

Caption

Color

ControlState

ControlStyle

DefaultColor

Enabled

Font

Height

Hint

Left

MaxHeight

MaxWidth

MinHeight

MinWidth

Parent

ParentBoundsRect

PopupMenu

PopupShowingType

ShowHint

StyleAttributes

TabOrder

TabStop

Top

Visible

Width

ZIndex

Derived from TcxWebComponent

CustomEvents

Styles

WebActionsHelper

WebComponentState

WebEventsHelper

WebRendererClasses

WebRenderHelper

WebScriptsHelper

WebValuesHelper


Methods for TcxWebNavBar
TcxWebNavBar Methods

TcxWebNavBar          Legend

In TcxWebNavBar

 Create

 Destroy

 DoSetValues

 RegisterRenderers

 RegisterValues

Derived from TcxWebControl

AdjustBounds

AsContainer

CanSetValues

CheckNewSize

GetColor

GetDefaultColor

GetDefaultHorzBordersSize

GetDefaultVertBordersSize

GetHorzBordersSize

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetParentWebPageModule

GetVertBordersSize

HasAsParent

HasParent

Hide

IsContainer

ScriptsSubscription

SetAttribute

SetBounds

SetParentComponent

SetStyleAttribute

Show

StyleChanged

UpdateControlPosition

UpdateDesignerContext

Derived from TcxWebComponent

GetProviders

GetState

GetVariableName

GetWebActionsHelper

GetWebEventsHelper

GetWebRenderHelper

GetWebScriptsHelper

GetWebValuesHelper

ImplGetProviders

ImplGetVariableName

IsDesigning

IsLoading

Loaded

Notification

RegisterActions

RegisterEvents

SetState

ValidateContainer


Events for TcxWebNavBar
TcxWebNavBar Events

TcxWebNavBar          Legend

Derived from TcxWebComponent

OnAfterRender

OnBeforeRender


TcxWebNavBar.Groups

TcxWebNavBar          See Also

Provides access to the collection of groups displayed by the NavBar control.

property Groups: TcxWebNavBarGroups;

Description

The Groups property is represented by the TcxWebNavBarGroups object, which maintains the collection of groups displayed within the control.  Each group is represented by a TcxWebNavBarGroup object, which, in turn, provides access to its collection of items.

Use properties and methods of the object relating to this property to add, delete and access individual groups.


TcxWebNavBar.HeaderCollapsedStyles

TcxWebNavBar          See Also

Specifies the style of collapsed group headers.

property HeaderCollapsedStyles: TcxWebStyles;

Description

Groups can either be expanded or collapsed in order to show or hide their items.  You can collapse or expand a group via the Expanded property of the corresponding TcxWebNavBarGroup object or by clicking corresponding header buttons.

Use the HeaderCollapsedStyles property to change the appearance of collapsed group headers.  It returns the TcxWebStyles object and the adjusted style must be assigned to its Default property.  Use the TcxWebStyleController component to create and adjust individual styles.


TcxWebNavBar.HeaderStyles

TcxWebNavBar          See Also

Specifies the style of expanded group headers.

property HeaderStyles: TcxWebStyles;

Description

Groups can either be expanded or collapsed in order to show or hide their items.  You can collapse or expand a group via the Expanded property of the corresponding TcxWebNavBarGroup object or by clicking corresponding header buttons.

Use the HeaderStyles property to change the appearance of expanded group headers.  It returns the TcxWebStyles object and an adjusted style must be assigned to its Default property.  Use the TcxWebStyleController component to create and adjust individual styles.


TcxWebNavBar.Images

TcxWebNavBar          See Also

Specifies the source of images displayed within the NavBar control.

property Images: TcxWebImageList;

Description

The NavBar control can display the following custom images:

•	Images in the left part of group captions.  They are specified via the LeftCollapsedImageIndex and LeftExpandedImageIndex properties;

•	Images in the right part of group captions used as expanding/collapsing buttons.  They are specified via the RightCollapsedImageIndex and RightExpandedImageIndex properties;

•	Item images.  They are specified via the ImageIndex property of the TcxWebNavBarGroupItem object.

Each image is specified by its index in the source collection represented by the Images property.  You must use the TcxWebImageList component to assign a value to this property.


TcxWebNavBar.LeftCollapsedImageIndex

TcxWebNavBar          See Also

Specifies the image displayed in the left part of collapsed group headers.

property LeftCollapsedImageIndex: Integer;

Description

The NavBar control enables images to be displayed in the left part of group captions.  Images corresponding to the collapsed and expanded states of a group are specified via the LeftCollapsedImageIndex and LeftExpandedImageIndex properties.  Both these properties specify images by their zero-based indexes within the source images collection.  The source of images is represented by the Images property.

If the LeftCollapsedImageIndex property value is –1, the default image is displayed.

The default value of the LeftCollapsedImageIndex property is –1.


TcxWebNavBar.LeftExpandedImageIndex

TcxWebNavBar          See Also

Specifies the image displayed in the left part of expanded group headers.

property LeftExpandedImageIndex: Integer;

Description

The NavBar control enables images to be displayed in the left part of group headers.  Images corresponding to the collapsed and expanded states of a group are specified via the LeftCollapsedImageIndex and LeftExpandedImageIndex properties.  Both these properties specify images by their zero-based indexes within the source images collection.  The source of images is represented by the Images property.

If the LeftExpandedImageIndex property value is –1, the default image is displayed.

The default value of the LeftExpandedImageIndex property is –1.


TcxWebNavBar.RightCollapsedImageIndex

TcxWebNavBar          See Also

Specifies the expanding button image.

property RightCollapsedImageIndex: Integer;

Description

NavBar control groups can be expanded or collapsed to show or hide their items by clicking the expanding and collapsing buttons located to the right of group headers.  These button images are specified via the RightCollapsedImageIndex and RightExpandedImageIndex properties.  Both these properties specify images by their zero-based indexes within the source images collection.  The source of images is represented by the Images property.

The image specified by the RightCollapsedImageIndex property is displayed within collapsed group headers.  Clicking this image expands the corresponding group.

If the RightCollapsedImageIndex property value is –1, the default image is displayed.

The default value of the RightCollapsedImageIndex property is –1.


TcxWebNavBar.RightExpandedImageIndex

TcxWebNavBar          See Also

Specifies the collapsing button image.

property RightExpandedImageIndex: Integer;

Description

NavBar control groups can be expanded or collapsed to show or hide their items by clicking the expanding and collapsing buttons located to the right of group headers.  These button images displayed as these buttons are specified via the RightCollapsedImageIndex and RightExpandedImageIndex properties.  Both these properties specify images by their zero-based indexes within the source images collection.  The source of images is represented by the Images property.

The image specified by the RightExpandedImageIndex property is displayed within expanded group headers.  Clicking this image collapses the corresponding group.

If the RightExpandedImageIndex property value is –1, the default image is displayed.

The default value of the RightExpandedImageIndex property is –1.


TcxWebNavBar.SeparatorWidth

TcxWebNavBar

Specifies the space between group items in pixels.

property SeparatorWidth: Integer;

Description

NavBar control groups can display a number of items, which are arranged vertically.  Use the SeparatorWidth property to alter the distance between items.  This property value is set in pixels.

The default value of the SeparatorWidth property is 1.


TcxWebNavBar.Create

TcxWebNavBar          See Also

Creates a new TcxWebNavBar control.

constructor Create(AOwner: TComponent); override;

Description

Use the Create method to create a new TcxWebNavBar control at runtime.  The AOwner property specifies the owner of the newly created control (which is typically a page module).  The constructor sets properties to their default values and initializes a collection of groups.

Remember to specify the Parent property of the newly created control, otherwise, it will not be displayed.


TcxWebNavBar.Destroy

TcxWebNavBar          See Also

Destroys the TcxWebNavBar control.

destructor Destroy; override;

Description

The Destroy method is used to dispose of the TcxWebNavBar control and free any memory allocated.  This method releases all resources used by the control.

Do not use the Destroy method in applications. Instead, call the Free method.


TcxWebNavBar.DoSetValues

TcxWebNavBar          See Also

Updates the TcxWebNavBar control based on the changes made by the end user.

procedure DoSetValues; override;

Description

Requests contain information about each group and specifies its order within the control and also whether the group is expanded.  This information is used to update the control with the changes made via the client browser.  This is performed by the DoSetValues method.

This method implements the IcxWebValues interface’s DoSetValues method.


TcxWebNavBar.RegisterRenderers

TcxWebNavBar          See Also

Registers the renderer classes generating the HTML code which represents the TcxWebNavBar control within specific browsers.

procedure RegisterRenderers; override;

Description

The RegisterRenderers method registers a single renderer class which is designed to render HTML code for a specific control.  The registered renderer is used to generate HTML code for all possible browser types.

This method overrides the RegisterRenderers method of the TcxWebComponent class.


TcxWebNavBar.RegisterValues

TcxWebNavBar          See Also

Registers the HTML elements containing data related to a control.

procedure RegisterValues; override;

Description

The RegisterValues method is used to register HTML elements which contain data related to the TcxWebNavBar control.  The hidden input stores information on a group’s expand state and order.  The DoSetValues method updates the control based on its contents.

This method implements the RegisterValues method of the IcxWebValues interface.  It can be overridden in descendant classes to register additional HTML elements.


TcxWebNavBarGroup
TcxWebNavBarGroup Object

Hierarchy          Properties          Methods          See Also

Represents a group within the TcxWebNavBar control.

Unit

cxWebNavBar

TcxWebNavBarGroup = class(TCollectionItem)

Description

Each TcxWebNavBar control maintains a collection of groups.  It is represented by the TcxWebNavBarGroups object and is accessed via the control’s Groups property.  The Items property provides access to individual groups which are represented by TcxWebNavBarGroup object.

The TcxWebNavBarGroup class provides properties that allow you to:

•	specify the text displayed within a group header (the Text property);

•	expand and collapse groups (the Expanded property);

•	access the collection of items displayed within a group (the Items property).


TcxWebNavBarGroup Hierarchy
Hierarchy

TCollectionItem


Properties for TcxWebNavBarGroup
TcxWebNavBarGroup Properties

TcxWebNavBarGroup          Legend

In TcxWebNavBarGroup

Expanded

Items

Text


Methods for TcxWebNavBarGroup
TcxWebNavBarGroup Methods

TcxWebNavBarGroup          Legend

In TcxWebNavBarGroup

 Create

 Destroy


TcxWebNavBarGroup.Expanded

TcxWebNavBarGroup

Specifies whether a group is expanded.

property Expanded: Boolean;

Description

Groups can be expanded or collapsed to show or hide their items by clicking the button to the right of its group header.  You can also control the state of a group via its Expanded property.  Set this property to True to expand a group, otherwise it will be collapsed.

The default value of the Expanded property is False.


TcxWebNavBarGroup.Items

TcxWebNavBarGroup          See Also

Provides access to the collection of items displayed within a group.

property Items: TcxWebNavBarGroupItems;

Description

Use the Items property to access the TcxWebNavBarGroupItems object.  This object represents the collection of items displayed within a specific group.  The methods and properties of this object can be used to add, delete and access individual items.


TcxWebNavBarGroup.Text

TcxWebNavBarGroup          See Also

Specifies the text displayed within a group header.

property Text: string;

Description

Each group can display custom text within its header.  Use the Text property to specify the string to be displayed.

Style characteristics of the displayed text are controlled by the HeaderCollapsedStyles and HeaderStyles properties of the TcxWebNavBar control.


TcxWebNavBarGroup.Create

TcxWebNavBarGroup          See Also

Creates an instance of the TcxWebNavBarGroup class.

constructor Create(Collection: TCollection); override;

Description

The Create method is used to create a new TcxWebNavBarGroup object.  The Collection parameter specifies the collection to which the created group belongs.

Do not use the constructor in applications.  Use the Add method of the TcxWebNavBarGroups object instead.  This method creates a new group, adds it to the collection and returns the corresponding TcxWebNavBarGroup object.


TcxWebNavBarGroup.Destroy

TcxWebNavBarGroup          See Also

Destroys the TcxWebNavBarGroup object.

desctructor Destroy; override;

Description

The destructor is used to dispose of the TcxWebNavBarGroup object and free any allocated memory.  It releases the collection of items before calling the inherited destructor.

Do not destroy TcxWebNavBarGroup objects in applications.  Instead use the methods of the corresponding collection to delete a group.


TcxWebNavBarGroupItem
TcxWebNavBarGroupItem Object

Hierarchy          Properties          Methods          See Also

Represents an item displayed within a group of the TcxWebNavBar control.

Unit

cxWebNavBar

TcxWebNavBarGroupItem = class(TCollectionItem)

Description

Each group of the TcxWebNavBar control stores a collection of items.  This collection is accessed via the Items property of the corresponding TcxWebNavBarGroup object.  The returned TcxWebNavBarGroupItems object has its own Items property which is used to access individual items represented by TcxWebNavBarGroupItem objects.

The TcxWebNavBarGroupItem object enables you to customize the look and feel of items, and specify their hints and URLs.


TcxWebNavBarGroupItem Hierarchy
Hierarchy

TCollectionItem


Properties for TcxWebNavBarGroupItem
TcxWebNavBarGroupItem Properties

TcxWebNavBarGroupItem          Legend

In TcxWebNavBarGroupItem

Hint

ImageIndex

Text

URL


Methods for TcxWebNavBarGroupItem
TcxWebNavBarGroupItem Methods

TcxWebNavBarGroupItem          Legend

In TcxWebNavBarGroupItem

 Create

 Destroy


TcxWebNavBarGroupItem.Hint

TcxWebNavBarGroupItem          See Also

Specifies the text displayed as a hint when the mouse pointer hovers over an item.

property Hint: string;

Description

Use the Hint property to specify the hint text displayed when the mouse pointer hovers over an item.  If no text is specified the hint is not displayed.

The default value of the Hint property is an empty string.


TcxWebNavBarGroupItem.ImageIndex

TcxWebNavBarGroupItem          See Also

Specifies the image displayed before item text.

property ImageIndex: Integer;

Description

Use the ImageIndex property to specify the image to be displayed before item text.  This property value is a zero-based index of an image from the source images collection.  These images are sourced via the Images property of the TcxWebNavBar control.  If the ImageIndex property is set to –1, no image is displayed within an item.

The default value of the ImageIndex property is –1.


TcxWebNavBarGroupItem.Text

TcxWebNavBarGroupItem          See Also

Specifies the text displayed by an item.

property Text: string;

Description

Use the Text property to specify the text string to be displayed within an item.  If this property value is an empty string, the item displays no text.  The Styles property of the TcxWebNavBar control enables you to vary the style of the text.

The default value of the Text property is an empty string.


TcxWebNavBarGroupItem.URL

TcxWebNavBarGroupItem          See Also

Specifies the HTML link invoked by an item.

property URL: TcxURL;

Description

Use the URL property to specify a hypertext link.  This property is represented by a TcxURL object.  This object allows you to specify the destination document and the window in which it is opened.


TcxWebNavBarGroupItem.Create

TcxWebNavBarGroupItem          See Also

Creates an instance of the TcxWebNavBarGroupItem class.

procedure Create(Collection: TCollection); override;

Description

The Create method is used to create a new TcxWebNavBarGroupItem object.  The Collection parameter specifies the collection to which a specific item belongs.

Do not create TcxWebNavBarGroupItem objects in applications.  Use the Add method of the TcxWebNavBarGroupItems object instead.  This method creates a new item, adds it to the collection and returns the corresponding object.


TcxWebNavBarGroupItem.Destroy

TcxWebNavBarGroupItem          See Also

Destroys the TcxWebNavBarGroupItem object.

procedure Destroy; override;

Description

The Destroy method is used to dispose of the TcxWebNavBarGroupItem object and free any allocated memory.

Do not destroy TcxWebNavBarGroupItem objects in applications.  Instead use methods of the corresponding TcxWebNavBarGroupItems collection to remove an item.


TcxWebNavBarGroupItems
TcxWebNavBarGroupItems Object

Hierarchy          Properties          Methods          See Also

Represents a collection of items within group maintained by the TcxWebNavBar control.

Unit

cxWebNavBar

TcxWebNavBarGroupItems = class(TCollection)

Description

Each group maintained by the TcxWebNavBar control is represented by the TcxWebNavBarGroup object.  A group owns a collection of items displayed within it.  This collection is accessed via the Items property of the TcxWebNavBarGroup object.  The return value of this property is of the TcxWebNavBarGroupItems type.

Use methods and properties of the TcxWebNavBarGroupItems object to add, delete, and access individual items within the collection.


TcxWebNavBarGroupItems Hierarchy
Hierarchy

TCollection


Properties for TcxWebNavBarGroupItems
TcxWebNavBarGroupItems Properties

TcxWebNavBarGroupItems          Legend

In TcxWebNavBarGroupItems

Items

WebNavBarGroup


Methods for TcxWebNavBarGroupItems
TcxWebNavBarGroupItems Methods

TcxWebNavBarGroupItems          Legend

In TcxWebNavBarGroupItems

 Add

 Create


TcxWebNavBarGroupItems.Items

TcxWebNavBarGroupItems          See Also

Provides indexed access to items within a collection.

property Items[Index: Integer]: TcxWebNavBarGroupItem;

Description

Use the Items property to obtain an item by its index within a collection.  Indexes are zero-based.  If the specified index is either negative or exceeds the last available index, an exception is raised.  The last available item index is always one less than the Count property value.


TcxWebNavBarGroupItems.WebNavBarGroup

TcxWebNavBarGroupItems

Returns the group to which a collection of items belongs.

property WebNavBarGroup: TcxWebNavBarGroup;

Description

The WebNavBarGroup property is used to determine the group in which collection items are displayed.  This property value is initialized in the constructor.

ReadOnly Property


TcxWebNavBarGroupItems.Add

TcxWebNavBarGroupItems          See Also

Creates a new item and appends it to the collection.

function Add: TcxWebNavBarGroupItem;

Description

Use the Add method to create a new TcxWebNavBarGroupItem object.  This newly created item then becomes the last item in the collection of items contained within a group.  This method returns the newly created object with default settings.  Customize an item by adjusting this object’s property values.


TcxWebNavBarGroupItems.Create

TcxWebNavBarGroupItems          See Also

Creates an instance of the TcxWebNavBarGroupItems class.

procedure Create(AWebNavBarGroup: TcxWebNavBarGroup);

Description

The Create method is used to create a new TcxWebNavBarGroupItems object.  The AWebNavBarGroup parameter specifies the group to which a collection of items belongs.  The parameter value is assigned to the WebNavBarGroup property.

Do not create TcxWebNavBarGroupItems objects in applications.  These objects are created automatically when the TcxWebNavBarGroup object initializes its Items property.


TcxWebNavBarGroups
TcxWebNavBarGroups Object

Hierarchy          Properties          Methods          See Also

Represents a collection of groups within the TcxWebNavBar control.

Unit

cxWebNavBar

TcxWebNavBarGroups = class(TCollection)

Description

TcxWebNavBar controls maintain collections of groups.  These collections are represented by TcxWebNavBarGroups objects and are accessed via the control’s Groups property.  You can use methods and properties of these collections to add, delete and access individual groups.  Each group, in turn, maintains a collection of items, which provide access to individual items.


TcxWebNavBarGroups Hierarchy
Hierarchy

TCollection


Properties for TcxWebNavBarGroups
TcxWebNavBarGroups Properties

TcxWebNavBarGroups          Legend

In TcxWebNavBarGroups

Items

WebNavBar


Methods for TcxWebNavBarGroups
TcxWebNavBarGroups Methods

TcxWebNavBarGroups          Legend

In TcxWebNavBarGroups

 Add

 Create


TcxWebNavBarGroups.Items

TcxWebNavBarGroups          See Also

Provides access to individual groups stored in a collection via an index.

property Items[Index: Integer]: TcxWebNavBarGroup; default;

Description

Use the Items property to obtain a group by its index within a collection.  Indexes are zero-based.  If the specified index is either negative or exceeds the last available index, an exception is raised.  The last available group index is always one less than the Count property value.


TcxWebNavBarGroups.WebNavBar

TcxWebNavBarGroups

Gets the control to which a groups collection belongs.

property WebNavBar: TcxWebNavBar;

Description

The WebNavBar property is used to determine to which control a collection of groups belongs.  This property value is initialized in the constructor.

ReadOnly Property


TcxWebNavBarGroups.Add

TcxWebNavBarGroups          See Also

Creates a new group and adds it to the end of the collection.

function Add: TcxWebNavBarGroup;

Description

Use the Add method to create a new TcxWebNavBarGroup object.  This object is added to the end of the group’s collection.  This method returns the newly created object with default settings.  Adjust this object’s property values to customize a group.


TcxWebNavBarGroups.Create

TcxWebNavBarGroups          See Also

Creates an instance of the TcxWebNavBarGroups class.

procedure Create(AWebNavBar: TcxWebNavBar);

Description

The Create method is used to create a new TcxWebNavBarGroups object.  The AWebNavBar parameter specifies the control whose collection of groups will be represented by the created object.  The parameter value is assigned to the WebNavBar property.

Do not use this method in applications.  TcxWebNavBarGroups objects are created automatically when TcxWebNavBar controls initialize their Groups property.


cxWebModule Unit Overview
cxWebModule Unit

Classes

TcxCustomWebDataModule

TcxCustomWebFramesetModule

TcxCustomWebHomeDataModule

TcxCustomWebPageModule

TcxWebComponentsPersistent

TcxWebComponentsPersistentItem

TcxWebComponentsPersistentItems

TcxWebDataModule

TcxWebFramesetModule

TcxWebHomeDataModule

TcxWebModuleHelper

TcxWebModuleRenderHelper

TcxWebPageModule

TcxWebPageModuleContainerHelper

TcxWebPageModuleHelper

Other Types

TcxWebDefaultPersistentMode

TcxWebEncodingType


TcxWebDataModule
TcxWebDataModule Object

Hierarchy          Properties          Methods          Events

Represents a container for components used by other modules.

Unit

cxWebModule

TcxWebDataModule = class(TcxCustomWebDataModule)

Description

The TcxWebDataModule class represents a container for components shared across your application.  It serves the same purpose in EWF applications that ordinary data modules serve in regular Delphi applications.  You can include any number of web data modules in your server application.

Data modules provide a design surface for adding, removing, and selecting components.  The web data module differs from a standard data module in the structure of the unit and the interfaces that the web data module implements.


TcxWebDataModule Hierarchy
Hierarchy

TDataModule

     |

TcxCustomWebDataModule


Properties for TcxWebDataModule
TcxWebDataModule Properties

TcxWebDataModule          Legend

Derived from TcxCustomWebDataModule

ModuleHelper

Request

Response

Session


Methods for TcxWebDataModule
TcxWebDataModule Methods

TcxWebDataModule          Legend

Derived from TcxCustomWebDataModule

Create

CreateNew

Destroy

GetModuleHelper

GetModuleHelperClass


Events for TcxWebDataModule
TcxWebDataModule Events

TcxWebDataModule          Legend

Derived from TcxCustomWebDataModule

OnActivate

OnDeactivate


TcxWebHomeDataModule
TcxWebHomeDataModule Object

Hierarchy          Properties          Methods          Events          See Also

Provides a means by which to manage your web application.

Unit

cxWebModule

TcxWebHomeDataModule = class(TcxCustomWebHomeDataModule)

Description

An instance of the TcxWebHomeDataModule class is created automatically when a new web application is created.  It specifies the default page, default timeout, maximum number of sessions, etc.  It also provides a number of events that allow you to have greater control over page access and dispatching.

In addition, it provides the same capabilities as a simple data module (the TcxWebDataModule class).  The only difference is that you can have an unlimited number of data modules in your application but only one home data module.

The TcxWebHomeDataModule class doesn’t introduce any new functionality.  It simply publishes several inherited properties and events.


TcxWebHomeDataModule Hierarchy
Hierarchy

TDataModule

     |

TcxCustomWebDataModule

     |

TcxCustomWebHomeDataModule


Properties for TcxWebHomeDataModule
TcxWebHomeDataModule Properties

TcxWebHomeDataModule          Legend

Derived from TcxCustomWebHomeDataModule

DefaultPage

DefaultTimeout

DispatchActions

MaxSessions

UseCookie

Derived from TcxCustomWebDataModule

ModuleHelper

Request

Response

Session


Methods for TcxWebHomeDataModule
TcxWebHomeDataModule Methods

TcxWebHomeDataModule          Legend

Derived from TcxCustomWebHomeDataModule

Create

CreateNew

GetWebAppServices

RedirectToPage

Derived from TcxCustomWebDataModule

Destroy

GetModuleHelper

GetModuleHelperClass


Events for TcxWebHomeDataModule
TcxWebHomeDataModule Events

TcxWebHomeDataModule          Legend

Derived from TcxCustomWebHomeDataModule

OnAfterDispatch

OnAfterDispatchPage

OnAfterRedirectToPage

OnBeforeDispatch

OnBeforeDispatchPage

OnBeforeRedirectToPage

OnCanViewPage

OnException

OnGetFileStream

OnLocateFile

OnPageLoginRequired

OnPageNotFound

OnSessionEnd

OnSessionStart

Derived from TcxCustomWebDataModule

OnActivate

OnDeactivate


TcxWebModuleHelper
TcxWebModuleHelper Object

Hierarchy          Properties          Methods          Events

Represents the class to which the common functionality of web modules is delegated.

Unit

cxWebModule

TcxWebModuleHelper = class(TObject)

Description

The TcxWebModuleHelper class implements the common functionality of web modules.  In addition, it implements the methods declared in the IcxWebModule interface.  Thus, web modules (TcxCustomWebDataModule descendants) delegate the implementation of this interface to the TcxWebModuleHelper object (or its descendant).  This object is accessed via the ModuleHelper property of a web module class.

The TcxWebModuleHelper class also serves as the base for more specific helper classes.  The available descendant is the TcxWebPageModuleHelper class.


TcxWebModuleHelper Hierarchy
Hierarchy

TObject


Properties for TcxWebModuleHelper
TcxWebModuleHelper Properties

TcxWebModuleHelper          Legend

In TcxWebModuleHelper

Request

Response

Session

WebModule


Methods for TcxWebModuleHelper
TcxWebModuleHelper Methods

TcxWebModuleHelper          Legend

In TcxWebModuleHelper

Activate

Create

Deactivate


Events for TcxWebModuleHelper
TcxWebModuleHelper Events

TcxWebModuleHelper          Legend

In TcxWebModuleHelper

OnActivate

OnDeactivate


TcxWebModuleHelper.OnActivate

TcxWebModuleHelper          See Also

Fires right after the associated web module has been activated.

property OnActivate: TNotifyEvent;

Description

The OnActivate event is referenced by the OnActivate event of the TcxCustomWebDataModule class and its descendants.  Thus you should write an OnActivate event handler for the desired web module in order to perform specific actions each time the module has been activated.

The event handler is invoked by the Activate method of the TcxWebModuleHelper class.


TcxWebModuleHelper.OnDeactivate

TcxWebModuleHelper          See Also

Fires right before the associated web module is deactivated.

property OnDeactivate: TNotifyEvent;

Description

The OnDeactivate event is referenced by the OnDeactivate event of the TcxCustomWebDataModule class and its descendants.  Thus, you should write an OnDeactivate event handler for the desired web module in order to perform specific actions each time the module is being deactivated.

The event handler is invoked by the Deactivate method of the TcxWebModuleHelper class.


TcxWebModuleHelper.Request

TcxWebModuleHelper          See Also

Contains information about the request.

property Request: TWebRequest;

Description

The Request property is referenced by the Request property of the TcxCustomWebDataModule class and its descendants.  This property provides information about the HTTP request message.  The request object provides access to the headers of the request message, as well as the content of the message.

The Request property is initialized by the Activate method, via a WebContext function call.

ReadOnly Property


TcxWebModuleHelper.Response

TcxWebModuleHelper          See Also

Provides access to the current response.

property Response: TWebResponse;

Description

The Response property is referenced by the Response property of the TcxCustomWebDataModule class and its descendants.  It contains information about the response message that the application builds as a reply to the message that the Request property specifies.

The Response property is initialized by the Activate method, via a WebContext function call.

ReadOnly Property


TcxWebModuleHelper.Session

TcxWebModuleHelper          See Also

Provides access to the current web session.

property Session: TAbstractWebSession;

Description

The Session property is referenced by the Session property of the TcxCustomWebDataModule class and its descendants.  This property is used to obtain information from or add information to the current web session (it describes the current user).  Web sessions persist over multiple calls from the same end user until they are terminated (for example, when the user logs out or when a timeout period elapses).

The Session property is initialized by the Activate method, via a WebContext function call.

ReadOnly Property


TcxWebModuleHelper.WebModule

TcxWebModuleHelper          See Also

Returns the web module owning the helper object.

property WebModule: TComponent;

Description

The WebModule property contains a reference to the web module using the helper object.  Web modules are TcxCustomWebDataModule descendants in EWF.

This property is initialized within the constructor of the TcxWebModuleHelper class.

ReadOnly Property


TcxWebModuleHelper.Activate

TcxWebModuleHelper          See Also

Initializes the web module.

procedure Activate;

Description

The Activate method implements the Activate method of the IcxWebModule interface.  It is called right after the web module is created.  It is designed to initialize the properties of the web module.

The Activate method initializes the Request, Response and Session properties using a WebContext function call.  It also invokes the OnActivate event handler if assigned.


TcxWebModuleHelper.Create

TcxWebModuleHelper          See Also

Creates an instance of the TcxWebModuleHelper object.

constructor Create(AWebModule: TComponent); virtual;

Description

The create method is used to initialize the TcxWebModuleHelper object.  The AWebModule parameter specifies the web module, which uses the helper object.  The value of the parameter is assigned to the WebModule property.

The TcxWebModuleHelper object is created automatically when the ModuleHelper property of the TcxCustomWebDataModule is accessed.  The same is true for descendant web modules.


TcxWebModuleHelper.Deactivate

TcxWebModuleHelper          See Also

Performs necessary clean-up procedures when the web module is deactivated.

procedure Deactivate;

Description

The Deactivate method implements the Deactivate method of the IcxWebModule interface.  It is called right before the web module is destroyed.  It is designed to perform necessary clean-up actions to free objects initialized in the Activate method.

The Deactivate method sets the Request, Response and Session properties to nil.  It also invokes the OnDeactivate event handler if assigned.


TcxWebModuleRenderHelper
TcxWebModuleRenderHelper Object

Hierarchy          Properties          Methods          See Also

Implements the functionality of the web page module concerning HTML code rendering.

Unit

cxWebModule

TcxWebModuleRenderHelper = class(TObject)

Description

Page modules delegate their functionality concerning HTML code rendering to the TcxWebModuleRenderHelper object.  This object stands for the ModuleRenderHelper property of the TcxCustomWebPageModule class and its descendants.

The TcxWebModuleRenderHelper object implements the methods declared in the IcxContainerCodeProvider interface.  The TcxCustomWebPageModule class and its descendants delegate the implementation of this interface to the TcxWebModuleRenderHelper object.


TcxWebModuleRenderHelper Hierarchy
Hierarchy

TObject


Properties for TcxWebModuleRenderHelper
TcxWebModuleRenderHelper Properties

TcxWebModuleRenderHelper          Legend

In TcxWebModuleRenderHelper

Module

WebClientData

WebPageModule


Methods for TcxWebModuleRenderHelper
TcxWebModuleRenderHelper Methods

TcxWebModuleRenderHelper          Legend

In TcxWebModuleRenderHelper

WriteBeginHTML

Create

WriteEndHTML


TcxWebModuleRenderHelper.Module

TcxWebModuleRenderHelper          See Also

Returns the page module owning the helper object.

property Module: TComponent;

Description

The Module property is used to get access to the page module, which delegates code rendering functionality to the helper object.  This property is initialized within the constructor of the TcxWebModuleRenderHelper class.

The Module property is used, in particular, to access to interfaces implemented by the associated page module.  This is performed via WebClientData and WebPageModule properties.

ReadOnly Property


TcxWebModuleRenderHelper.WebClientData

TcxWebModuleRenderHelper          See Also

Returns a reference to the IcxWebClientData interface implemented by the associated page module.

property WebClientData: IcxWebClientData;

Description

The WebClientData property provides access to the methods of the IcxWebClientData interface implemented by the associated page module.  The associated page module is specified by the Module property.

This property provides easier access to methods required to render code for the page module.

ReadOnly Property


TcxWebModuleRenderHelper.WebPageModule

TcxWebModuleRenderHelper          See Also

Returns a reference to the IcxWebPageModule interface implemented by the associated page module.

property WebPageModule: IcxWebPageModule;

Description

The WebPageModule property provides access to the methods of the IcxWebPageModule interface implemented by the associated page module.  The associated page module is specified by the Module property.

This property provides easier access to methods required to render code for the page module.

ReadOnly Property


TcxWebModuleRenderHelper.WriteBeginHTML

TcxWebModuleRenderHelper          See Also

Renders HTML code preceding the code of page module’s child controls and contained HTML code.

procedure WriteBeginHTML(HTMLTextBuilder: TcxHTMLTextBuilder);

Description

A page module can have a number of child controls and custom HTML code placed within it.  The WriteBeginHTML method renders HTML code preceding the code representing child controls and custom HTML.  The code is written to the HTMLTextBuilder parameter.  The methods of the TcxHTMLTextBuilder class are used for this purpose.

The WriteBeginHTML method renders the opening FORM tag and the number of hidden input fields required to transmit general data between the server and client parts of application.


TcxWebModuleRenderHelper.Create

TcxWebModuleRenderHelper          See Also

Creates an instance of the TcxWebModuleRenderHelper class.

constructor Create(AModule: TComponent);

Description

The Create method is used to initialize the TcxWebModuleRenderHelper object.  The AModule parameter specifies the page module delegating its functionality to the created object.  The value of the parameter is assigned to the Module property.

The TcxWebModuleRenderHelper class is instantiated automatically when a page module references its ModuleRenderHelper property.


TcxWebModuleRenderHelper.WriteEndHTML

TcxWebModuleRenderHelper          See Also

Renders HTML code following the code of a page module’s child controls and contained HTML code.

procedure WriteEndHTML(HTMLTextBuilder: TcxHTMLTextBuilder);

Description

A page module can have a number of child controls and custom HTML code placed within it.  The WriteEndHTML method renders HTML code following the code representing child controls and custom HTML.  The code is written to the HTMLTextBuilder parameter.  The methods of the TcxHTMLTextBuilder class are used for this purpose.

The WriteEndHTML method renders the closing FORM tag.


TcxWebPageModule
TcxWebPageModule Object

Hierarchy          Properties          Methods          Events          See Also

Represents a web page.

Unit

cxWebModule

TcxWebPageModule = class(TcxCustomWebPageModule)

Description

The TcxWebPageModule class provides all the functionality of a web page.  It behaves as a form in standard Delphi applications.  This means that each web page is a descendant of the TcxWebPageModule class.  The TcxWebPageModule can be visually represented in two ways: as a form or as HTML.

You should use the TcxWebDataModule in order to provide centralized access to a set of non-visual components.


TcxWebPageModule Hierarchy
Hierarchy

TDataModule

     |

TcxCustomWebDataModule

     |

TcxCustomWebPageModule


Properties for TcxWebPageModule
TcxWebPageModule Properties

TcxWebPageModule          Legend

Derived from TcxCustomWebPageModule

ComponentPersistent

ContainerControlHelper

DesignerID

EncodingType

IsFirstRequest

LeftPos

ModuleHelper

ModuleRenderHelper

PositioningType

ScrollLeft

ScrollTop

TopPos

Values

Derived from TcxCustomWebDataModule

ModuleHelper

Request

Response

Session


Methods for TcxWebPageModule
TcxWebPageModule Methods

TcxWebPageModule          Legend

Derived from TcxCustomWebPageModule

Create

CreateNew

Destroy

FindVariable

FindVariableContainer

GetActiveControl

GetAsString

GetBrowser

GetDesignerID

GetEncoding

GetIsFirstRequest

GetLeftPos

GetModuleHelper

GetModuleHelperClass

GetModuleRenderHelper

GetPositioningType

GetReferer

GetScrollLeft

GetScrollTop

GetShiftState

GetTopPos

GetValues

GetVariable

GetVariableCount

IsComponentPersistent

LoadState

PerformScript

ReadState

RedirectToPage

SetActiveControl

SetAsString

SetDesignerID

SetIsDesignerPreviewModule

SetLeftPos

SetShiftState

SetTopPos


Events for TcxWebPageModule
TcxWebPageModule Events

TcxWebPageModule          Legend

Derived from TcxCustomWebPageModule

OnAfterGenerateContent

OnAfterGenerateRedirectedContent

OnAfterGetValues

OnAfterProcessAction

OnAfterRender

OnBeforeGenerateContent

OnBeforeGenerateRedirectedContent

OnBeforeGetValues

OnBeforeProcessAction

OnBeforeRender

OnHTMLTag

Derived from TcxCustomWebDataModule

OnActivate

OnDeactivate


TcxWebPageModuleContainerHelper
TcxWebPageModuleContainerHelper Object

Hierarchy          See Also

Implements the functionality of a page module regarding child component management.

Unit

cxWebModule

TcxWebPageModuleContainerHelper = class(TcxCustomWebContainerControlHelper)

Description

The TcxWebPageModuleContainerHelper object implements the functionality of container controls managing child components.  Page modules delegate the implementation of the IcxWebContainerControl interface to the TcxWebPageModuleContainerHelper object via the ContainerControlHelper property.

The TcxWebPageModuleContainerHelper object doesn’t implement its own functionality.  It simply inherits the functionality of its parent.


TcxWebPageModuleContainerHelper Hierarchy
Hierarchy

TcxCustomWebContainerControlHelper


TcxWebPageModuleHelper
TcxWebPageModuleHelper Object

Hierarchy          Properties          Methods         Events           See Also

Implements the common functionality of web page modules.

Unit

cxWebModule

TcxWebPageModuleHelper = class(TcxWebModuleHelper)

Description

The TcxWebPageModuleHelper class implements the common functionality of page modules.  Descendants of the TcxCustomWebPageModule class delegate the implementation of the IcxWebModule and IcxWebPage interfaces to the TcxWebPageModuleHelper object via the ModuleHelper property.

The methods of the IcxWebModule interface are implemented in the TcxWebModuleHelper class, the ancestor.  Thus the TcxWebPageModuleHelper object only implements the methods of the IcxWebPage interface.


TcxWebPageModuleHelper Hierarchy
Hierarchy

TObject

     |

TcxWebModuleHelper


Properties for TcxWebPageModuleHelper
TcxWebPageModuleHelper Properties

TcxWebPageModuleHelper          Legend

In TcxWebPageModuleHelper

PageProducer

Derived from TcxWebModuleHelper

Request

Response

Session

WebModule


Methods for TcxWebPageModuleHelper
TcxWebPageModuleHelper Methods

TcxWebPageModuleHelper          Legend

In TcxWebPageModuleHelper

Create

Destroy

DispatchPage

GetTemplate

ImplDispatchPage

ImplIncludePage

ImplRedirectToPage

IncludePage

RedirectToPage

Derived from TcxWebModuleHelper

Activate

Deactivate


Events for TcxWebPageModuleHelper
TcxWebPageModuleHelper Events

TcxWebPageModuleHelper          Legend

In TcxWebPageModuleHelper

OnAfterGenerateContent

OnAfterGenerateRedirectedContent

OnAfterRender

OnBeforeGenerateContent

OnBeforeGenerateRedirectedContent

OnBeforeRender

Derived from TcxWebModuleHelper

OnActivate

OnDeactivate


TcxWebPageModuleHelper.OnAfterGenerateContent

TcxWebPageModuleHelper          See Also

Fires after the requested page’s content has been generated.

type

  TcxWebPageEvent = procedure(Sender: TObject; const APageName: string) of object;

property OnAfterGenerateContent: TcxWebPageEvent;

Description

The OnAfterGenerateContent event is referenced by the OnAfterGenerateContent event of the TcxCustomWebPageModule class and its descendants.  Thus you should write an OnAfterGenerateContent event handler for the associated page module in order to perform specific actions each time the content of the requested page has been generated.

The Sender parameter specifies the web module, which invoked the event.  The APageName parameter allows you to determine the name of a web page whose content has been generated.

The OnAfterGenerateContent event is invoked by the ImplDispatchPage method.


TcxWebPageModuleHelper.OnAfterGenerateRedirectedContent

TcxWebPageModuleHelper          See Also

Fires after the content of the page, to which redirection was performed, has been generated.

type

  TcxWebPageEvent = procedure(Sender: TObject; const APageName: string) of object;

property OnAfterGenerateRedirectedContent: TcxWebPageEvent;

Description

The OnAfterGenerateRedirectedContent event is referenced by the OnAfterGenerateRedirectedContent event of the TcxCustomWebPageModule class and its descendants.  Thus you should write an OnAfterGenerateRedirectedContent event handler for the associated page module.  This allows you to perform specific actions each time the content of the page has been generated.

The Sender parameter specifies the web module, which invoked the event.  The APageName parameter allows you to determine the name of a web page whose content has been generated.

The OnAfterGenerateRedirectedContent event is invoked by ImplRedirectToPage method.


TcxWebPageModuleHelper.OnAfterRender

TcxWebPageModuleHelper          See Also

Fires after a web page has been rendered.

type TNotifyEvent = procedure (Sender: TObject) of object;

property OnAfterRender: TNotifyEvent;

Description

The OnAfterRender event is referenced by the OnAfterRender event of the TcxCustomWebPageModule class and its descendants.  Thus you should write an OnAfterRender event handler for the associated page module.  This allows you to perform specific actions each time a web page has been rendered.

The Sender parameter specifies the web module that invoked the event.

The OnAfterRender event is invoked by the ImplDispatchPage method.


TcxWebPageModuleHelper.OnBeforeGenerateContent

TcxWebPageModuleHelper          See Also

Fires before the requested page’s content is generated.

type

  TcxWebPageHandledEvent = procedure(Sender: TObject; const APageName: string; var AHandled: Boolean) of object;

property OnBeforeGenerateContent: TcxWebPageHandledEvent;

Description

The OnBeforeGenerateContent event is referenced by the OnBeforeGenerateContent event of the TcxCustomWebPageModule class and its descendants.  Thus you should write an OnBeforeGenerateContent event handler for the associated page module in order to perform specific actions each time the content of the requested page is generated.

The Sender parameter specifies the web module that invoked the event.  The APageName parameter allows you to determine the name of the web page whose content is about to be generated.  The AHandled parameter specifies whether generating the content of the page should be continued.  Set this parameter to True to prohibit the continuation of content generation.

The OnBeforeGenerateContent event is invoked by the ImplDispatchPage method.


TcxWebPageModuleHelper.OnBeforeGenerateRedirectedContent

TcxWebPageModuleHelper          See Also

Fires before the content of the page, to which the redirection was performed, is generated.

type

  TcxWebPageParamsHandledEvent = procedure(Sender: TObject; const APageName: string; const AParams: string; var AHandled: Boolean) of object;

property OnBeforeGenerateRedirectedContent: TcxWebPageParamsHandledEvent;

Description

The OnBeforeGenerateRedirectedContent event is referenced by the OnBeforeGenerateRedirectedContent event of the TcxCustomWebPageModule class and its descendants.  Thus, you should write an OnBeforeGenerateRedirectedContent event handler for the associated page module.  This allows you to perform specific actions each time the content of the page, to which the redirection was performed, is generated.

The Sender parameter specifies the web module that invoked the event.  The APageName parameter allows you to determine the name of the web page whose content has been generated.  The AParams parameter transmits the string containing request parameters.  The AHandled parameter specifies whether generating the content of the page should be continued.  Set this parameter to True to prohibit the continuation of content generation.

The OnAfterGenerateRedirectedContent event is invoked by ImplRedirectToPage method.


TcxWebPageModuleHelper.OnBeforeRender

TcxWebPageModuleHelper          See Also

Fires before a web page is rendered.

type TNotifyEvent = procedure (Sender: TObject) of object;

property OnBeforeRender: TNotifyEvent;

Description

The OnBeforeRender event is referenced by the OnBeforeRender event of the TcxCustomWebPageModule class and its descendants.  Thus, you should write an OnBeforeRender event handler for the associated page module.  This allows you to perform specific actions each time a web page is rendered.

The Sender parameter specifies the web module that invoked the event.

The OnAfterRender event is invoked by the ImplDispatchPage method.


TcxWebPageModuleHelper.PageProducer

TcxWebPageModuleHelper          See Also

Provides a means of generating HTML code.

property PageProducer: TcxWebModulePageProducer;

Description

The PageProducer property represents the object generating the contents of HTML pages based on templates.

ReadOnly Property


TcxWebPageModuleHelper.Create

TcxWebPageModuleHelper          See Also

Creates an instance of the TcxWebPageModuleHelper class.

constructor Create(AWebModule: TComponent); override;

Description

The Create method is used to initialize the TcxWebPageModuleHelper object.  The AWebModule parameter specifies the web page module implementing its functionality to the helper object.  The value of the parameter is assigned to the WebModule property.  The constructor also initializes the PageProducer property.

The TcxWebPageModuleHelper object is instantiated automatically when the ModuleHelper property of the associated page module is accessed.


TcxWebPageModuleHelper.Destroy

TcxWebPageModuleHelper          See Also

Destroys the TcxWebPageModuleHelper object.

destructor Destroy; override;

Description

The Destroy method is used to dispose of the TcxWebPageModuleHelper object and free any allocated memory.  It frees the WebModule and PageProducer properties.

The TcxWebPageModuleHelper object is automatically destroyed when the associated page module is destroyed.


TcxWebPageModuleHelper.DispatchPage

TcxWebPageModuleHelper          See Also

Dispatches the specified page.

function DispatchPage(const APageName: string; AWebResponse: TWebResponse): Boolean;

Description

The DispatchPage method implements the DispatchPage method of the IcxWebPage interface.  It is designed to generate the contents of the web page specified by the APageName parameter to the response object specified by the AWebResponse parameter.

As implemented, the DispatchPage method simply calls the ImplDispatchPage method.  This is done since the DispatchPage method implements the interface method and thus cannot be overridden.  In turn, the ImplDispatchPage method is declared virtual.

The DispatchPage method returns True if it successfully fetches the requested page, False if it fails to obtain the requested page.


TcxWebPageModuleHelper.GetTemplate

TcxWebPageModuleHelper          See Also

Returns the streamed representation of the requested page’s template.

function GetTemplate(const APage: string; out AOwned: Boolean): TStream;

Description

The GetTemplate method is used to obtain the streamed template corresponding to the specified web page.  The web page is specified by its name via the APage parameter.  The AOwned parameter returns a value that indicates whether the caller should free the returned stream after reading the template. If the AOwned parameter returns True, the caller should free the stream object.  The obtained template is used to generate the contents of the requested web page.


TcxWebPageModuleHelper.ImplDispatchPage

TcxWebPageModuleHelper          See Also

Dispatches the specified page.

function ImplDispatchPage(const APageName: string; AWebResponse: TWebResponse): Boolean; virtual;

Description

The ImplDispatchPage implements the functionality of the DispatchPage method.  This is done since the DispatchPage method implements the interface method and thus cannot be overridden.  In turn, ImplDispatchPage method is declared virtual.

The ImplDispatchPage method invokes the OnBeforeGenerateContent and OnAfterGenerateContent event handlers before and after the page is dispatched respectively.  If the GetTemplate method doesn’t return nil, the OnBeforeRender and OnAfterRender event handlers are invoked before and after rendering the page respectively.  Otherwise, the default template is used to generate the response and the mentioned event handlers are not invoked.


TcxWebPageModuleHelper.ImplIncludePage

TcxWebPageModuleHelper          See Also

Returns the streamed representation of the specified page.

function ImplIncludePage(const APageName: string; var AOwned: Boolean): TStream; virtual;

Description

The ImplIncludePage implements the functionality of the IncludePage method.  This is done since the IncludePage method implements the interface method and thus cannot be overridden.  In turn, ImplIncludePage method is declared virtual.


TcxWebPageModuleHelper.ImplRedirectToPage

TcxWebPageModuleHelper          See Also

Fills out a response message so that it redirects the caller to another page in the application.

function ImplRedirectToPage(const APageName: string; const AParams: string; AResponse: TWebResponse): Boolean; virtual;

Description

The ImplRedirectToPage method implements the functionality of the RedirectToPage method.  This is done since the RedirectToPage method implements the interface method and thus cannot be overridden.  In turn, ImplRedirectToPage method is declared virtual.

The ImplRedirectToPage method invokes the OnBeforeGenerateRedirectedContent and OnAfterGenerateRedirectedContent event handlers before and after redirected content is generated respectively.


TcxWebPageModuleHelper.IncludePage

TcxWebPageModuleHelper          See Also

Returns the streamed representation of the specified page.

function IncludePage(const APageName: string; var AOwned: Boolean): TStream;

Description

The IncludePage method implements the IncludePage method of the IcxWebPage interface.  It returns the streamed representation of the page specified by the APageName parameter.  The AOwned parameter returns a value that indicates whether the caller should free the returned stream after reading it.  If the AOwned parameter returns True, the caller should free the stream object.

As implemented, the IncludePage method simply calls the ImplIncludePage method.  This is done since the IncludePage method implements the interface method and thus cannot be overridden.  In turn, the ImplIncludePage method is declared virtual.

The IncludePage method is only called when the entire content of a web page is inserted into another.  This can be performed via the following server-script command:

<!--#include file="pagename.html"-->


TcxWebPageModuleHelper.RedirectToPage

TcxWebPageModuleHelper          See Also

Fills out a response message so that it redirects the caller to another page in the application.

function RedirectToPage(const APageName: string; const AParams: string; AResponse: TWebResponse): Boolean;

Description

The RedirectToPage method implements the RedirectToPage method of the IcxWebPage interface.  It is designed to redirect the application to a specified page.  The web page is specified by its name via the APageName parameter.  The AParams parameter specifies the string containing request parameters.  The AResponse parameter transmits the response object to be filled.

The RedirectToPage method returns True if the redirection was completed successfully.  Otherwise it returns False.

As implemented, the RedirectToPage method simply calls the ImplRedirectToPage method.  This is done since the RedirectToPage method implements the interface method and thus cannot be overridden.  In turn, the ImplRedirectToPage method is declared virtual.


TcxWebDefaultPersistentMode
TcxWebDefaultPersistentMode type

Contains values specifying the default persistence mode of components.

Unit

cxWebModule

TcxWebDefaultPersistentMode = (pmSave, pmReset);

Description

TcxWebDefaultPersistentMode contains two values that specify whether components residing on a web page should be persisted or not by default.  These values are used to set the value of the DefaultMode property of the TcxWebComponentsPersistent object.

The following values are available:

Value	Description
pmSave	Components are persisted by default.
pmReset	Components are not persisted by default.


TcxWebEncodingType
TcxWebEncodingType type

Contains values specifying form data encoding.

Unit

cxWebModule

TcxWebEncodingType = (wetApplication, wetMultipart, wetText);

Description

Client and server sides transmit data to each other.  TcxWebEncodingType contains values specifying the type of data encoding.  These values are used to set the value of the EncodingType property of the TcxWebPageModule class.  The value of the EncodingType property, in turn affects the value of the ENCTYPE attribute of the FORM tag.

The following values are available:

Value	Description
wetApplication	Sets the ENCTYPE attribute of the FORM tag to application/x-www-form-urlencoded.  This is best when you just need to transmit the information contained in the form elements to the server script.
wetMultipart	Sets the ENCTYPE attribute of the FORM tag to multipart/form-data, which is best to use when your application must upload files to the server.
wetText	Sets the ENCTYPE attribute of the FORM tag to text/plain.  Use this value if your application is intended to use the mailto protocol (if it sends e-mail messages based on the data filled into the form elements).


TcxCustomWebFramesetModule
TcxCustomWebFramesetModule Object

Hierarchy          Properties          Methods          Events

Serves as the base for web modules providing frameset editing functionality.

Unit

cxWebModule

TcxCustomWebFramesetModule = class(TcxCustomWebDataModule, IcxWebDesignerModule, IcxWebModule, IcxWebPage, IWebVariablesContainer)

Description

Web modules provide HTML code generating functionality and enable you to edit web pages visually.  Frameset modules, as a peculiar type of web modules, give you the opportunity for visual frameset structure editing and generating appropriate HTML code.  Note, that you cannot use EWF controls when designing a frameset module.  The contents of each created frame is determined by the module which is the source for this frame.  Use the src attribute of a frame tag to specify the source of its contents (it is necessary to modify the module’s template for this purpose).  This attribute can specify either a web page module in your application or an HTML page.

The TcxCustomWebFramesetModule class inherits data module functionality from its ancestor TcxCustomWebDataModule class.  Moreover, it implements the IcxWebModule and IcxWebPage interfaces in order to function as a page module.  Mentioned page module functionality is the ability to generate HTML code representing the page.

The TcxWebCustomFramesetModule class is the base for frameset module class, which is of the TcxWebFramesetModule type.  Please refer to this type description for details on managing framesets.


TcxCustomWebFramesetModule Hierarchy
Hierarchy

TDataModule

     |

TcxCustomWebDataModule


Properties for TcxCustomWebFramesetModule
TcxCustomWebFramesetModule Properties

TcxCustomWebFramesetModule          Legend

In TcxCustomWebFramesetModule

DesignerID

ModuleHelper

ServerScript

Derived from TcxCustomWebDataModule

ModuleHelper

Request

Response

Session


Methods for TcxCustomWebFramesetModule
TcxCustomWebFramesetModule Methods

TcxCustomWebFramesetModule          Legend

In TcxCustomWebFramesetModule

 Create

 GetModuleHelper

 GetModuleHelperClass

 RedirectToPage

Derived from TcxCustomWebDataModule

CreateNew

Destroy


Events for TcxCustomWebFramesetModule
TcxCustomWebFramesetModule Events

TcxCustomWebFramesetModule          Legend

In TcxCustomWebFramesetModule

OnAfterGenerateContent

OnAfterGenerateRedirectedContent

OnAfterRender

OnBeforeGenerateContent

OnBeforeGenerateRedirectedContent

OnBeforeRender

Derived from TcxCustomWebDataModule

OnActivate

OnDeactivate


TcxCustomWebFramesetModule.DesignerID

TcxCustomWebFramesetModule

Specifies the mode in which an EWF web page works at design-time.

property DesignerID: Integer;

Description

Use the DesignerID property to specify whether EWF web pages work at design-time in HTML or Form mode.  Setting the DesignerID property affects the manner in which the designer displays the page within the IDE.

When the web page module has its DesignerID property set to HTML (the default), the form displays Designer toolbars at the top.  These toolbars provide full HTML editing at design-time.  Additionally you can make use of EWF HTML elements in this mode.

The Form mode doesn’t support frameset editing.  Thus if you don’t have Internet Explorer 5.5 (or higher) installed, which is required to run in the HTML mode, you will have no ability of visual framesets editing.


TcxCustomWebFramesetModule.ModuleHelper

TcxCustomWebFramesetModule

Returns the value of the ModuleHelper property.

property ModuleHelper: TcxWebPageModuleHelper;

Description

The GetModuleHelper method is used to return the value of the ModuleHelper property that represents an object which implements the delegated IcxWebModule and IcxWebPage interfaces.

The GetModuleHelper method calls the inherited GetModuleHelper method and casts the returned type to TcxWebPageModuleHelper.

Thus, the GetModuleHelper method returns the TcxWebPageModuleHelper object whose methods fully implement methods declared in the IcxWebModule and IcxWebPage interfaces.  These methods are designed to control web page active state and content.

ReadOnly Property


TcxCustomWebFramesetModule.OnAfterGenerateContent

TcxCustomWebFramesetModule

Fires after the requested page’s content has been generated.

type

  TcxWebPageEvent = procedure(Sender: TObject; const APageName: string) of object;

property OnAfterGenerateContent: TcxWebPageEvent;

Description

Write an OnAfterGenerateContent event handler for the frameset module in order to perform specific actions each time the content of the requested page has been generated. The Sender parameter specifies the web module that invoked the event.  The APageName parameter allows you to determine the name of a web page whose content has been generated.

The TcxCustomWebFramesetModule class delegates OnAfterGenerateContent event firing to a specific module helper object (the TcxWebPageModuleHelper class).  You should use the OnAfterGenerateContent event property of a particular web frameset module (a TcxCustomWebFramesetModule descendant) to assign a desired event handler at design time.

The referenced OnAfterGenerateContent event is invoked by the ImplDispatchPage method of the module helper object.


TcxCustomWebFramesetModule.OnAfterGenerateRedirectedContent

TcxCustomWebFramesetModule

Fires after the content of the page, to which redirection was performed, has been generated.

type

  TcxWebPageEvent = procedure(Sender: TObject; const APageName: string) of object;

property OnAfterGenerateRedirectedContent: TcxWebPageEvent;

Description

Write an OnAfterGenerateRedirectedContent event handler to perform specific actions each time the content of the page, to which redirection was performed, has been generated. The Sender parameter specifies the web module that invoked the event.  The APageName parameter allows you to determine the name of the web page whose content has been generated.

The TcxCustomWebFramesetModule class delegates OnAfterGenerateRedirectedContent event firing to a specific module helper object of the TcxWebPageModuleHelper type.  You should use the OnAfterGenerateRedirectedContent event property of a particular web frameset module (a TcxCustomWebFramesetModule descendant) to assign a desired event handler at design time.

The referenced OnAfterGenerateRedirectedContent event is invoked by the ImplRedirectToPage method of the module helper object.


TcxCustomWebFramesetModule.OnBeforeGenerateContent

TcxCustomWebFramesetModule

Fires before the requested page’s content is generated.

type

  TcxWebPageHandledEvent = procedure(Sender: TObject; const APageName: string; var AHandled: Boolean) of object;

property OnBeforeGenerateContent: TcxWebPageHandledEvent;

Description

Write an OnBeforeGenerateContent event handler to perform specific actions before the content of the requested page is generated. The Sender parameter specifies the web module that invoked the event.  The APageName parameter allows you to determine the name of the web page whose content is about to be generated.  The AHandled parameter specifies whether the default page content generation should be performed.  Set this parameter to True to prohibit default content generation.

The TcxCustomWebFramesetModule class delegates OnBeforeGenerateContent event firing to a specific module helper object (TcxWebPageModuleHelper type).

You should use the OnBeforeGenerateContent event property of a particular web frameset module (a TcxCustomWebFramesetModule descendant) to assign a desired event handler at design time.

The referenced OnBeforeGenerateContent event is invoked by the ImplDispatchPage method of the module helper object.


TcxCustomWebFramesetModule.OnBeforeGenerateRedirectedContent

TcxCustomWebFramesetModule

Fires before the content of the page, to which redirection was performed, is generated.

type

  TcxWebPageParamsHandledEvent = procedure(Sender: TObject; const APageName: string; const AParams: string; var AHandled: Boolean) of object;

property OnBeforeGenerateRedirectedContent: TcxWebPageParamsHandledEvent;

Description

Write an OnBeforeGenerateRedirectedContent event handler to perform specific actions each time the content of the page, to which redirection was performed, is generated.

The Sender parameter specifies the web module that invoked the event.  The APageName parameter allows you to determine the name of the web page whose content is about to be generated.  The AParams parameter transmits the string containing request parameters.  The AHandled parameter specifies whether the default page content generation should be performed.  Set this parameter to True to prohibit default content generation.

The TcxCustomWebFramesetModule class delegates OnBeforeGenerateRedirectedContent event firing to a specific module helper object (TcxWebPageModuleHelper type).

You should use the OnBeforeGenerateRedirectedContent event property of a particular web frameset module (a TcxCustomWebFramesetModule descendant) to assign a desired event handler at design time.

The referenced OnBeforeGenerateRedirectedContent event is invoked by the ImplRedirectToPage method of the module helper object.


TcxCustomWebFramesetModule.ServerScript

TcxCustomWebFramesetModule

Specifies the server script language.

type

  TcxServerScript = (JScript, VBScript);

property ServerScript: TcxServerScript;

Description

The EWF enables you to modify web page templates.  These templates contain both HTML and server script tags which control HTML code generation.  Server tags are enclosed into the ‘<%’ and ‘%>’ symbols.  Language syntax used in these tags is specified by the ServerScript property of a module.  You can use either the VBScript or JScript language syntax.  Set the ServerScript property to the VBScript or JScript value respectively.


TcxCustomWebFramesetModule.Create

TcxCustomWebFramesetModule

Creates an instance of the TcxCustomWebFramesetModule class.

procedure Create(AOwner: TComponent); override;

Description

The Create method is used to instantiate a frameset module.  This is required when creating a new frameset module at design-time or when it is recreated at runtime.  Modules are recreated at runtime each time a request arrives for it if you’ve chosen to destroy its instance when generating responses.

Do not use the constructor in applications.  Modules are instantiated automatically.


TcxCustomWebFramesetModule.GetModuleHelper

TcxCustomWebFramesetModule

Returns the value of the ModuleHelper property.

function GetModuleHelper: TcxWebPageModuleHelper;

Description

The GetModuleHelper method is used to return the value of the ModuleHelper property that represents an object which implements the delegated IcxWebModule and IcxWebPage interfaces.

The GetModuleHelper method calls the inherited GetModuleHelper method and casts the returned type to TcxWebPageModuleHelper.

Thus, the GetModuleHelper method returns the TcxWebPageModuleHelper object whose methods fully implement methods declared in the IcxWebModule and IcxWebPage interfaces.  These methods are designed to control web page active state and content.


TcxCustomWebFramesetModule.GetModuleHelperClass

TcxCustomWebFramesetModule

Returns a class-reference to a specific module helper object.

function GetModuleHelperClass: TcxWebModuleHelperClass; override;

Description

The GetModuleHelperClass method is used internally to return a class-reference type which holds a reference to a module helper class.  As implemented in the TcxCustomWebFramesetModule class this method returns the TcxWebPageModuleHelper type.  This type is used to initialize the ModuleHelper property value.


TcxCustomWebFramesetModule.RedirectToPage

TcxCustomWebFramesetModule

Redirects the end user to another page in the application.

function RedirectToPage(const APageName: string; const AParams: string): Boolean;

Description

Use the RedirectToPage method to redirect the application to the page specified by the APageName parameter.

The AParams parameter specifies the string containing request parameters.  The parameters are in Name=Value format.

The RedirectToPage method returns True if the redirection was completed successfully.  Otherwise it returns False.


TcxCustomWebFramesetModule.OnAfterRender

TcxCustomWebFramesetModule

Fires after a frameset page has been rendered.

type

  TNotifyEvent = procedure(Sender: TObject) of object;

property OnAfterRender: TNotifyEvent;

Description

Write an OnAfterRender event handler to perform specific actions each time a frameset page has been rendered.

The TcxCustomWebFramesetModule class delegates OnAfterRender event firing to a specific module helper object of the TcxWebPageModuleHelper type.  You should use the OnAfterRender event property of a particular web frameset module (a TcxCustomWebFramesetModule descendant) to assign a desired event handler at design time.

The referenced OnAfterRender event is invoked by the ImplDispatchPage method of the module helper object.


TcxCustomWebFramesetModule.OnBeforeRender

TcxCustomWebFramesetModule

Fires before a frameset page is rendered.

type

  TNotifyEvent = procedure(Sender: TObject) of object;

property OnBeforeRender: TNotifyEvent;

Description

Write an OnBeforeRender event handler to perform specific actions each time a frameset page is rendered.

The TcxCustomWebFramesetModule class delegates OnBeforeRender event firing to a specific module helper object of the TcxWebPageModuleHelper type.  You should use the OnBeforeRender event property of a particular web frameset module (a TcxCustomWebFramesetModule descendant) to assign a desired event handler at design time.

The referenced OnBeforeRender event is invoked by the ImplDispatchPage method of the module helper object.


TcxWebFramesetModule
TcxWebFramesetModule Object

Hierarchy          Properties          Methods          Events

Represents a web module that enables you to create and edit framesets.

Unit

cxWebModule

TcxWebFramesetModule = class(TcxCustomWebFramesetModule)

Description

You can add a frameset module represented by the TcxWebFramesetModule object into your EWF application.  It enables you to create predefined frame layout via the wizard and modify it using the module designer.  Frameset layout editing is performed via deleting frames or splitting then either horizontally or vertically.

EWF controls or HTML elements cannot be placed onto a frameset module.  You must specify the source of contents for individual frames instead.  These contents sources can be represented either by page modules of your applications or by standard HTML pages.  The name of the desired page must be assigned to the src attribute of the frame tag.  You must edit the frameset module template for this purpose.

The frameset module’s functionality is completely implemented by its ancestor class.  The TcxWebFramesetModule class simply publishes some properties.


TcxWebFramesetModule Hierarchy
Hierarchy

TDataModule

     |

TcxCustomWebDataModule

     |

TcxCustomWebFramesetModule


Properties for TcxWebFramesetModule
TcxWebFramesetModule Properties

TcxWebFramesetModule          Legend

Derived from TcxCustomWebFramesetModule

DesignerID

ModuleHelper

ServerScript

Derived from TcxCustomWebDataModule

ModuleHelper

Request

Response

Session


Methods for TcxWebFramesetModule
TcxWebFramesetModule Methods

TcxWebFramesetModule          Legend

Derived from TcxCustomWebFramesetModule

 Create

 GetModuleHelper

 GetModuleHelperClass

 RedirectToPage

Derived from TcxCustomWebDataModule

CreateNew

Destroy


Events for TcxWebFramesetModule
TcxWebFramesetModule Events

TcxWebFramesetModule          Legend

Derived from TcxCustomWebFramesetModule

OnAfterGenerateContent

OnAfterGenerateRedirectedContent

OnAfterRender

OnBeforeGenerateContent

OnBeforeGenerateRedirectedContent

OnBeforeRender

Derived from TcxCustomWebDataModule

OnActivate

OnDeactivate


Deploying EWF Applications

This paper will take you through, step-by-step, the process of deploying EWF applications to IIS and Apache on Windows.

Step 1: Converting the Project

The first step in deploying ExpressWeb applications is to make sure the project compiles to a type supported by the web server you wish to deploy to.  The following grid lists the types of projects that can be created in EWF, and the level of support each web server has for that type of application:

	IIS 4 and 5	Apache 1.X	Apache 2.X
ISAPI/NSAPI DLL:	Full support.	Partial support.	Full support
		DLL is unloaded after each call.
CGI Executable:	Full support.	Full support.	Full support
Apache 1.x DLL:	No Support	Full Support	No Support
Apache 2.x DLL:	No Support	No Support	Full Support
Web App Debugger Executable:	No Support	No Support	No Support

To convert a project from one type of application to another, select File, New, Other...

In the resulting dialog, switch to the ExpressWeb Framework tab and select the Web Application item.

Click OK.  This will bring up the New EWF Application dialog box.  In the Server Type drop-down list, select the type of application you wish to use for deployment.  If you are unsure, consult the grid above.  For this example I will choose ISAPI/NSAPI Dynamic Link Library: Next, select Do not create from the Create Module drop-down list.

Click OK.  This will create a new EWF application.  Since we are converting an existing project, we will want to use the HomeDataModule from that project, so the next step is to remove the HomeDataModule from the new project which was created automatically.  To open the Project Manager, click View, Project Manager.

In the Project Manager, right-click the unit which contains the HomeDataModule, then click Remove From Project.

A confirmation dialog will appear, click Yes.  If you are prompted to save changes to the unit, click No.  You should now have an empty project.

The next step is to save the new project.  To do this, click File, Save All...

Save the new project in the same directory as the existing project, however give it a different name.  For demonstration purposes, I will name this project DeployDemoISAPI.dpr.

Click the Save button to save the project under the entered name.

The next step is to add the units and modules from the old project to the new project.  To do that, open the Project Manager, right click the Project, and choose the Add...  menu item.

This will cause the Add to Project dialog to appear.  If necessary, navigate to the directory the projects are in.  Next, select all the files that need to be added to the project.  If you are converting from a Web App Debugger executable, then make sure you do not add the Form unit to the new project.

Click Open to add the units to the new project.

Finally, build the project by clicking Project, Build DeployDemoISAPI.

Special Steps for Apache 1

In your Apache project's DPR file, you must specify the ContentType global variable by setting it to <projectname>-handler and the ModuleName global variable to <projectname>_module where <projectname> represents the name of your project.  Use the following example for guidance:

exports

  apache_module name 'project1_module';

begin

  ModuleName := 'project1_module';

  ContentType := 'project1-handler'; // must be lower-case

  Application.Initialize;

  Application.Run;

end.

Note the "-" symbol.  This is the common way of naming Apache handlers and it is strongly recommended that you follow this rule.  Also note that all strings should be lower-case.

Note that:

1.	the value of the ContentType variable must be lower-case.  Eg.  ContentType := 'project1-handler'; and not, for instance, ContentType := 'Project1-Handler'.

2.	the value of the ContentType global variable from the DPR file is used by the SetHandler directive from the httpd.conf Apache’s main configuration file.  The value of the ModuleName global variable is used by the LoadModule directive from the httpd.conf file.  Taking these dependences into consideration you must ensure you used the same letter cases in the bound items, eg.  The value of the ContentType global variable must be the same as the value provided for the SetHandler directive.

the value of the ContentType and the ModuleName variables must be in the same case as defined in the DPR file.

Your project is now ready to be deployed!

Step 2: Server Configuration

Prior to deploying the application, the target server must be configured properly.  If the server is already configured, then this step can be skipped and you can move on to Step 3.

To configure a server to run EWF applications, you must create a virtual directory called ExpressWeb Framework and copy the contents of the Client directory of your ExpressWeb install to that virtual directory.  The client directory is located in the directory EWF was installed, under the Delphi version it was installed for.  For example, if you took the defaults when installing EWF, the Client directory is located in C:\Program Files\Developer Express Inc\ExpressWeb Framework\<delphi version>\Client.

The subdirectory structure must be the following:

Once these files are copied to the target server, it will be necessary to create the virtual directory.  To create the virtual directory, follow the instructions in one of the following sections, according to your target server:

•	IIS 5 on Windows 2000

•	Apache 1.X on Windows

•	Apache 2.X on Windows 2000

Configuring IIS 5 on Windows 2000

Start the Internet Services Manager by clicking Start, then navigating to Settings, Control Panel.

Open the Control Panel, and then double-click Administrative Tools.

Under Administrative Tools, double-click Internet Services Manager.

In the Internet Services Manager, expand the Tree to find the Web Site you wish to deploy to.  Right-click the Web Site and choose New, Virtual Directory from the popup-menu.

The Virtual Directory Creation Wizard will show.

Click Next to bring up the Virtual Directory Alias page in the Wizard.  In the Alias field, type ExpressWeb Framework.

Click Next to bring up the Web Site Content Directory page in the Wizard.  In the Directory field, enter path of the directory created earlier that contains the contents of the Client folder.

Click Next to bring up the Access Permissions page in the Wizard.  Make sure that the Read checkbox is checked, and that all other options are unchecked.

Click Next to bring up the final page of the Wizard.  Click Finish to complete the creation of the virtual directory.

The ExpressWeb Framework virtual directory should now appear in the Tree of the Internet Services Manager.

Configuring Apache 1.X on Windows

Open the httpd.conf file using a text editor such as notepad.  By default this file is located in the conf directory of your Apache installation.

In the httpd.conf file, scroll to the Aliases section, which is contained between <IfModule mod_alias.c> and </IfModule>.  In the Aliases section, add a new alias entry specifying the location of the ExpressWeb Framework directory.  Use the following example as a guide:

Alias "/ExpressWeb Framework/" "C:/Program Files/Apache Group/Apache/htdocs/ExpressWeb Framework/"

# since the alias contains gaps it should be quoted.

<Directory "C:/Program Files/Apache Group/Apache/htdocs/ExpressWeb Framework">

# Note that the <Directory> section’s value should end with no trailing slash

# this is not correct <Directory "C:/Program Files/Apache Group/Apache/htdocs/ExpressWeb Framework/">

# note also that paths with gaps should be quoted, that’s why it is saner to avoid such paths

    AllowOverride None

    Options None

    Order allow,deny

    Allow from all

</Directory>

Keep in mind that Apache came from the Linux world where everything is case sensitive.  Be sure your httpd.conf file is using the proper case, and that in any URLs within your application also use the correct case.  Also, be sure to use a forward- slash, "/", instead of a back-slash, "\", in folder references (another Linux characteristic).

Configuring Apache 2.X on Windows 2000

Open the httpd.conf file using a text editor such as notepad.  By default this file is located in the conf directory of your Apache2 installation.

In the httpd.conf file, add a new alias entry specifying the location of the ExpressWeb Framework directory.  Use the following example as a guide:

Alias "/ExpressWeb Framework/" "C:/Program Files/Apache Group/Apache/htdocs/ExpressWeb Framework/"

# since the alias contains gaps it must be quoted.

<Directory "C:/Program Files/Apache Group/Apache/htdocs/ExpressWeb Framework">

# while the 1.3.x bears trailing slashes in the <Directory> container in the 2.x the trailing slash must be removed!

  AllowOverride None

  Options None

  Order allow,deny

  Allow from all

</Directory>

Keep in mind that Apache came from the Linux world where everything is case sensitive.  Be sure your httpd.conf file is using the proper case, and that any URLs within your application also use the correct case.  Also, be sure to use a forward- slash, "/", instead of a back-slash, "\", in folder references (another Linux characteristic).  Finally, note that the syntax for adding aliases in Apache 2 is slightly different than in Apache 1.

Step 3: Application Deployment

Once the project has been compiled to a deployable format (Step 1) and the server has been configured to run EWF applications (Step 2), it is time to deploy.

To deploy your application on the remote web server you should know where to put your project’s files.  (THE LINES AFTER THE GREEN SHOULD BE CHANGED TO REFLECT RECENT CHANGES OR BE REMOVED) Your project contains two types of files: an executable (which is ended with .exe or .dll) and the supporting files which contain Cascading Style Sheet files, graphics files and htm(l) templates.  As a rule, these both types of file are placed in different directories on the web server due to their (access) nature.  By default the executable file require the htm templates to reside in the same directory it is located.  To specify the directory other than the default you should alter each page module file in your project in the following manner:

1.	scroll to the bottom of the page module file and find the initialization section

2.	find the WebRequestHandler.AddWebModuleFactory(TcxWebPageModuleFactory.Create(Tlogin, TcxWebPageInfo.Create('*.html'),  caDestroy)); string

3.	change the TcxWebPageInfo.Create('*.html') substring of the found string to TcxWebPageInfo.Create('C:\absolute\path\to\the template\files\directory\*.html').

4.	recompile the source

5.	upload the project to the remote web server

To deploy your application, start by creating a directory in which to put the application.  Once the directory has been created, copy over the files that make up your application.  Each file that should be deployed usually ends with one of the following extensions:

•	.css - Cascading Style Sheet files.  These files can control the look and feel of the pages that use them.

•	.dll - Dynamic Link Library files.  This is your application if you created an ISAPI or Apache DLL.

•	.exe - Executable files.  This is your application if you created a CGI application.  Do not confuse this with a Web App Debugger executable.

•	.gif - Graphics Interchange Format files.  These files contain images.

•	.htm - Hypertext Markup Language files.  These files contain the presentation layer of your application.

•	.html - See .htm.

•	.jpeg - Joint Photographic Experts Group Files.  These files contain images.

•	.jpg - See .jpeg.

•	.js - JavaScript files.  These files contain client-side JavaScript.

•	.png - Portable Network Graphics files.  These files contain images.

•	.xhtm - Extensible Hypertext Markup Language files.  These files contain a reformulation of HTML 4.01 in XML for the presentation layer of your application..

•	.xml - Extensible Markup Language files.  These files contain structured data in XML format.

•	.xsl - Extensible Stylesheet Language files.  These files contain XML for transforming XML documents into other XML documents or other formats.

Once the necessary files have been copied to a directory, you need to configure that directory to execute your application.  To configure the directory, follow the instructions in one of the following sections, according to your target server:

•	ISAPI or CGI to IIS 5 on Windows 2000

•	Apache 1.X DLL to Apache 1.X on Windows

•	ISAPI or CGI to Apache 1.X on Windows

•	Apache 2.X DLL to Apache 2.X on Windows

•	ISAPI or CGI to Apache 2.X on Windows

Deploy ISAPI or CGI to IIS on Windows 2000

Create a new Virtual Directory just as you did for Step 2 to create the ExpressWeb Framework virtual directory.  However, this time give it a name that reflects the name of your application, and point it to the path of the directory your application is in.  Also make sure to set the directory to have Execute permissions on the Access Permissions page of the wizard.

Once the virtual directory has been created, you should be able to access your application by navigating to the DLL (if your application is an ISAPI) or EXE file (if your application is a CGI) in the virtual directory, for example, http://myserver/MyApplication/MyApplicationISAPI.dll.

Deploy Apache 1.X DLL to Apache 1.X on Windows 2000 and NT4

Open the httpd.conf file using a text editor such as notepad.  In the httpd.conf file, add your application according to the following example:

LoadModule project1_module "C:/Program Files/My Application/Web/BenchmarkA1DSO.dll"

<Location /benchmark>

# note that if your module has more that a single page module and you navigate between them via hyperlinks you should pay special attention to the trailing slash in the <Location section>, so if this is the case you should have put it as follows: <Location /benchmark/>

  SetHandler project1-handler

</Location>

Note that the first parameter after LoadModule must match the apache_module name export and ModuleName global variable of your application exactly.  In the call to SetHandler, the parameter must match the ContentType global variable in your application exactly (see Special Steps for Apache 1).

Deploy Apache 2.X DLL to Apache 2.X on Windows

Delphi does not currently support the recommended version of Apache 2.  Until support is added to Delphi and for the sake of security, it is suggested that you use ISAPI under windows.

Deploy ISAPI or CGI to Apache 1.X on Windows

Open the httpd.conf file using a text editor such as notepad.  In the httpd.conf file, scroll to the Aliases section, then add a new script alias entry specifying the location of the applications directory.  Use the following example as a guide:

ScriptAlias /My-Application/ "C:/Program Files/My Application/Web/"

<Directory "C:/Program Files/My Application/Web/">

# note the trailing slash above.  While it is ok with the 1.3.x in the 2.0.x it should be removed

    AllowOverride None

    Options ExecCGI –Indexes –FollowSymLinks

# the directives in green are not necessary for the application to run but still advisable

    Order allow,deny

    Allow from all

</Directory>

Next, add an ISAPI handler for the .dll extention:

AddHandler isapi-isa .dll

For more information on using ISAPI applications in Apache 1, visit the Apache Documentation site (http://httpd.apache.org/docs/mod/mod_isapi.html).

Deploy ISAPI or CGI to Apache 2.X on Windows

Open the httpd.conf file using a text editor such as notepad.  In the httpd.conf file, then add a new script alias entry specifying the location of the applications directory.  Use the following example as a guide:

ScriptAlias /My-Application/ "C:/Program Files/My Application/Web/"

<Directory "C:/Program Files/My Application/Web/">

# the trailing slash above must be removed!

    AllowOverride None

    Options ExecCGI –Indexes –FollowSymLinks

# the directives in green are not necessary for the application to run but still advisable

    Order allow,deny

    Allow from all

</Directory>

Next, add an ISAPI handler for the .dll extension:

AddHandler isapi-isa .dll

For more information on using ISAPI applications in Apache 2, visit the Apache Documentation site (http://httpd.apache.org/docs/mod/mod_isapi.html).

Windows XP

Many have asked about deployment on Windows XP.  Windows XP is purely a desk-top operating system and is not designed to act as a server or host scalable applications, including web applications.  For this reason it is not recommended that web applications not be deployed to it.  IIS on Windows XP enforces a maximum of 10 simultaneous connections which can drastically inhibit the performance and usability of your applications.  If you do decide to use Windows XP, it is recommended that you use Apache to avoid the limitations built into IIS.

Tips & Tricks

•	You can avoid Step 1 by not using the Web App Debugger for debugging.  Instead, you can debug directly using IIS either manually (http://www.msdelphi.com/Articles/Web/DebuggingIIS/Debugging_IIS5_the_easy_way.htm) or using OnCompile Helpers (http://www.elitedev.com/products/oncompilehelpers/) from EliteDevelopments (http://www.elitedev.com/), or you can use WWSDebug which comes with EWF.

•	Step 2 must only be completed once per web site.  Once it has been completed, any number of EWF applications can be deployed to that site.

•	Multiple "sites" in IIS can point to the same directory for the ExpressWeb Framework virtual directory.  To accomplish this, follow Step 2 for each web site, entering the same value  for the Web Site Content Directory page in the Virtual Directory Creation wizard.

Other Resources

Secure your applications using SSL: Thawte (http://www.thawte.com/), Verisign (http://www.verisign.com/)

Apache Documentation: Apache 1.X (http://httpd.apache.org/docs/), Apache 2.X (http://httpd.apache.org/docs-2.0/)


EWF 1.2 Additional CSS Support

Cascading Style Sheets (CSS) allow for central control of colors, fonts, and other visual elements of a web page.  CSS files can be shared among multiple pages to provide a consistent look and a central point of control for a web site.  ExpressWeb Framework (EWF) supports CSS via the cxWebStyleController and cxWebStyleItem components.  EWF 1.2 adds additional support for CSS by adding new properties to cxWebStyleController and cxWebStyleItem which allow the developer to bypass the styles defined to use manually written external CSS files.

New Properties

The cxWebStyleController introduces one new property: CSSFileName.  This property is used to specify an external style sheet file to include in the page.  If the CSSFileName property is left blank, it has no effect on the page.  However, if the property is filled in, the cxWebStyleController will generate HTML to include the style sheet.  For example, if "/styles/Autumn.css" is specified, the following HTML will be generated when the page is rendered:

<link rel="stylesheet" href="/styles/Autumn.css" type="text/css" />

It is ok if you do not understand the HTML above.  Only know that it will include the Autumn.css file from the styles virtual directory.

Having a value in the CSSFileName property alone will not bypass the defined styles; it will only include the specified CSS file.  Styles defined in Delphi can be bypassed to external CSS styles by specifying the CSSClassName of a cxWebStyleItem.  By setting this property, EWF will set any component using this style to use the CSSClassName instead of the name that is automatically generated by the cxWebStyleItem.

Demonstration

To illustrate the use of these new properties, I have created a demo application with a CSS file that looks like this:

.AutumnTreeDefault {

  background-color : #FFCC66;

  color            : #FF0066;

  font-family      : Tahoma;

  font-size        : 10pt;

  text-decoration  : none;

  border           : 1px solid #FF9900

}

.AutumnTreeHover {

  background-color : #FFCC66;

  color            : #FF0066;

  font-family      : Tahoma;

  font-size        : 10pt;

  text-decoration  : none;

  border           : 1px solid #FF9900

}

.AutumnButtonDefault {

  background-color : #FF9933;

  color            : #FFFFCC;

  font-family      : MS Sans Serif;

  font-size        : 8pt;

  font-style       : normal;

  font-variant     : normal;

  font-weight      : normal;

  text-transform   : none;

  border           : 1px solid #FF9900

}

.AutumnButtonHover {

  background-color : #FFFFCC;

  color            : #FF9933;

  font-family      : MS Sans Serif;

  font-size        : 8pt;

  font-style       : normal;

  font-variant     : normal;

  font-weight      : normal;

  text-transform   : none;

  border           : 1px solid #FF9900

}

.AutumnLabelDefault {

  color            : #CC3300;

  font-family      : Tahoma;

  font-size        : 9pt;

  font-style       : normal;

  font-variant     : normal;

  font-weight      : normal;

  text-transform   : none

}

The CSS file was saved as Autumn.css.  I then created a new ExpressWeb Framework WAD application and designed the default PageModule to look like this:

In the PageStyles component, I defined several styles that define the page's colors without using the external style sheet.  When the Apply button is clicked, the following code is executed to either use the Delphi-defined styles or to bypass them, depending on which Radio item was selected:

procedure TDemoPage.ApplyButtonClick(Sender: TObject);

begin

  case StyleRadioButtons.ItemIndex of

  0:

    begin

      PageStyles.CSSFileName     := '';

      stButtonDef.CSSClassName   := '';

      stButtonHover.CSSClassName := '';

      stLabelDef.CSSClassName    := '';

      stTreeDef.CSSClassName     := '';

      stTreeHover.CSSClassName   := '';

    end;

  1:

    begin

      PageStyles.CSSFileName     := '/styles/Autumn.css';

      stButtonDef.CSSClassName   := 'AutumnButtonDefault';

      stButtonHover.CSSClassName := 'AutumnButtonHover';

      stLabelDef.CSSClassName    := 'AutumnLabelDefault';

      stTreeDef.CSSClassName     := 'AutumnTreeDefault';

      stTreeHover.CSSClassName   := 'AutumnTreeHover';

    end;

  end;

end;

This code will override the style settings without changing the styles defined in the cxWebStyleItems.  Instead, these properties are simply bypassed by the CSSClassName property.


Debugging ISAPI applications with WSSDebug

WSSDebug is a special edition Zero Configuration version of WinShock Web Server designed to enable developers to quickly run and test Web applications destined for deployment on ISAPI compatible web servers such as Microsoft IIS, Apache, Omni HTTPD, or WinShock Web Server.

WinShock Web Server is a commercial grade Web server written in Borland Delphi and available from Brain Patchwork (http://www.bpdx.com/).   WWSDebug is a special edition built in Borland C++Builder.

To debug your ISAPI application using WWSDebug, you need to create an ISAPI web application DLL, and configure Delphi to use WSSDebug.

See the topic "Deploying EWF ISAPI applications" for details on how to create an ISAPI application.

Unloading your ISAPI application

If you have previously deployed it to a local web server such as Microsoft IIS, you will want to make sure that you unload it.   In Microsoft IIS you simply need to select the properties of the virtual directory and check the unload button.

If that button is not grayed out then your web server has loaded your application, and you will need to click the button to tell it to release your DLL.

Configuring Delphi to use WWSDebug

To debug your DLL you must select "Run|Parameters…" from the Delphi menu and give Delphi a host application that will run your DLL, this will be WWSDebug.EXE.

Now the only thing left is to give WWSDebug parameters that will tell it the alias that your application will be hosted on and a path to find your DLL.

In this case we will use TestISAPIApp as the alias, but it could really be any meaningful name.

The second parameter is the path to your ISAPI application.   If you are using a path with space characters suche as "C:\My Documents\ISAPI\" make sure you add double quotes around it otherwise WWSDebug will only extract only the first part of the path and will give you the following error when it can’t find the ISAPI DLL.

Assuming you have everything set up properly, you can now simply hit F9 – Run and WWSDebug will execute, creating a virtual path with the same name as your applications main form that you passed, load your ISAPI Web Application DLL, and then tell your browser to navigate to the main page being served by the full web server inside  WWSDebug.  You can set break points and debug and run just like you would any other Delphi windows application.

When you are finished you will find the WWSDebug splash screen under your browser window.

Clicking on "Stop Debugger" or selecting "Run|Program reset" in Delphi will stop WWSDebug.


Configuring WWSDebug for additional paths

When you run WSSDebug it will create a virtual path for you to wherever your dll is.   However you may want to add additional paths to WSSDebug for example creating an Images path.   To do this you can use WWSDebugVirtPathEditor which is a simple ExpressQuantumGrid 4 application that will allow you to edit the virtual paths configuration file for WSSDEBUG.

In this case we have created a virtual path called Images that will point to a subdirectory called Images of our test directory.

You can delete a row by hitting the delete key while holding down the Control key, you can insert a row by moving to the last row and hitting the down arrow.

Note the VirtPath file is never cleared out, so as you debug more and more ISAPI applications you will find that this list will continue to grow so it makes sense to use the Virtual path editor every now and then to trim it down to the paths you are actively working with.


 WWSDebug logs

WSSDebug contains some of the logging facilities of its bigger brother WinShock Web Server.   There are 3 log files created when you access the WWSDebug server,

The first is the Apache style log that is named with the file name of the 8 digit date and the extension .log (eg: 11012002.log) this tells you which pages were requested and by which user agent (browser) and the result of that request..

example:

127.0.0.1 - - [01/Nov/2002:00:33:19 -0480] "/cxwebpagemodule2" 302 0 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; .NET CLR 1.0.3705)"

The Second log file is the Referers log which tells you which pages pointed the user to your site.

example:

 [10/24/2002 9:16:30 PM] http://127.0.0.1:3322/ -> cxwebpagemodule2/

The final log is the Browsers log which provides a list of all the user agents (Browsers) that accessed your server.

example:

 [10/24/2002 9:16:26 PM] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; .NET CLR 1.0.3705)

These logs, particularly the Apache log can provide a useful debugging aid.