Index...
Centrallix Documentation
|
widget/component
component :: A widget which instantiates a custom component
Metadata:
type: | widget/component |
visual: | yes |
container: | no |
form element: | no |
Overview:
This widget is used to instantiate a custom component that has already been defined using a widget/component-decl widget, typically inside a ".cmp" file. The instantiation can be either static or dynamic: a static component is rendered along with the component or application that it resides inside, whereas a dynamic component is loaded as needed from the client. Components may also allow multiple instantiation when dynamic, which is especially beneficial with components whose top-level widget happens to be a widget/childwindow.
Usage:
A component can be either visual or non-visual, and can be placed at almost any point in the application.
At the time of writing, only connectors may be placed inside a widget/component. It is planned that it be possible to place widgets inside a widget/component which then appear inside specially designated containers within the component itself. However that capability is not available at present.
Properties:
Property | Type | Description |
x |
integer |
x-coordinate of the upper left corner of the component. If unset, defaults to 0. |
y |
integer |
y-coordinate of the upper left corner of the component. If unset, defaults to 0. |
form |
integer |
Can specify another form to be a child of (if different than the implied form in which this control is nested). |
width |
integer |
width, in pixels, of the component. If unset, this defaults to the width of the component's containing widget. |
height |
integer |
height, in pixels, of the component. If unset, this defaults to the height of the component's containing widget. |
path |
string |
The path, in the OSML, to the component's definition (.cmp) file. (e.g. /sys/cmp/smart_field.cmp, /sys/cmp/form_controls.cmp, /samples/button.cmp) |
mode |
string |
Either "static" or "dynamic". A static component is rendered with the application, whereas a dynamic one is loaded as needed from the client. Defaults to 'static'. |
multiple_instantiation |
yes/no |
If enabled (dynamic components only), the component can be instantiated more than once on the client. Defaults to 'no'. |
auto_destroy |
yes/no |
If enabled (dynamic single-instantiation components only), when a component is instantiated a second time, the original component is automatically destroyed so there is at most one instance at a time in existence. Defaults to 'yes'. |
text |
string |
Set the Initial starting value contained in this component (Can this be directly accessed? as :widget_name:text?). |
visible |
true/false |
(e.g. visible=false). |
field |
string |
The osrc field to which this this smartfield is linked/connected. |
tooltip |
string |
The message to display when the user hovers their mouse over the smart field. |
popup_source |
string |
PopUp tree of possible selections (in one example, it references a .qyt file). |
popup_text |
string |
The text to display above the popup selection tree. |
popup_order |
string |
(e.g. desc) |
label_height |
integer |
The height of the label in pixels. |
label_width |
integer |
The width of the label in pixels. |
Child Properties:
(of /sys/cmp/smart_field.cmp child widgets)
Property | Type | Description |
ctl_type |
string |
Type of smart field (e.g. label, editbox, checkbox, datetime). |
type |
string |
(e.g. readonly). Must have field be set in order to be "readonly". |
value |
string |
This is something which can accessed as :this_widget:value (returns the value of text which can't be directly accessed?), but can not be set directly through this property -- see SetValue listed under the Action section. |
(of /sys/cmp/form_controls.cmp child widgets)
Property | Type | Description |
deletable |
yes/no |
|
multienter |
integer |
(e.g. 1) |
object_name |
string |
Title to put across the form control bar (Note: the form_controls.cmp allows the user to perform row operations on a given record set) |
(of /apps/kardia/modules/base/editbox_tree.cmp child widgets)
Property | Type | Description |
content |
string |
This is something which can accessed as :this_widget:content (returns the value of text which can't be directly accessed?), but can not be set directly through this property -- see SetValue listed under the Action section. |
Actions:
Action | Description |
Instantiate |
Instantiates the component. |
Destroy |
Destroys the component. If multiple instances exist, then all instances are destroyed. |
SetValue |
Called by a connector to this a smartfield with the parameter 'Value' set to the new value. |
Events:
Event | Description |
LoadComplete |
This event is triggered when a dynamic component completes loading from the server. |
DataChange |
This event is triggered when ... |
LoseFocus |
|
Sample Code:
// Instantiate the form_controls.cmp component
formctl "widget/component"
{
x=0; y=0; width=800; height=26;
mode=static;
path="/sys/cmp/form_controls.cmp";
form=my_form;
}
Comments...
(none yet)
Add a Comment...
|