Groupbox |
The Groupbox control is used for grouping multiple controls. A Groupbox control can have its own layout and alignment, independent of its parent container or XForm. The Groupbox control is visible during runtime.
Groupbox controls can be data-bound or free-form controls. When data-bound, a Groupbox control is bound to a model from which it fetches data. If you do not specify any model, the model of the parent control is associated, by default. You can use a free-form Groupbox control to display any arbitrary data. A Groupbox control can have both an Element bar and a Navigation bar. This enables navigation between records, and provides the ability to insert and delete objects.
By default, the first available business object in the model is bound to the Groupbox control. The controls in the Groupbox, for which the reference attribute is defined, are bound to and display the values of the business object.
In order to improve the performance and reduce the loading time of a Web page containing a Groupbox control, you can set the control as an load-on-demand control. This means that for load-on-demand controls, all child controls in it are rendered as plain HTML when an application is loaded for the first time. However, as no data or API is available for the child controls, they are not ready for use. On expanding the control, the child controls are initialized and their APIs are available for use.
Properties, Events, and Methods of the Control
The Groupbox control has certain properties, events, and methods associated with it. They define the behavior of the control and can be set through the property page of the control or programmatically using the APIs.
Table 1. List of Properties
Design-time property |
Runtime property |
Description |
---|---|---|
|
Sets the string that identifies the control on an XForm. If not specified, a unique ID is automatically generated. |
|
|
Sets the ID of the data model from which the data (specified using the Reference property) is displayed in the control. If model is not specified, it is inherited from the parent control's model. |
|
|
Sets the location or expression for the XPath that contains the data (value) displayed in the control. The XPath refers to the child node or descendants of the immediate parent control's reference. |
|
Parent | Specifies the data binding from the parent. The selected parent is used as the starting point for data references. |
|
Sets or retrieves the class name applied on the control. |
||
Sets the tool tip that appears on a control when the mouse is moved over it. Programmatically, this property is set by specifying the title property of the control. |
||
Resizable |
|
Select to enable the resizing of control at run time. Note:
|
Task Part |
|
Creates a task part for the control. Selecting the check box, displays the Task Part pane. |
|
Denotes whether the Groupbox control is collapsible. If checked, the Groupbox displays a toggle button on the right side of its title bar; clicking the toggle button collapses and expands the control. By default, it is unchecked. |
|
|
Denotes whether a collapsible Groupbox control will appear in the expanded mode when the XForm is loaded. This property is enabled only a Groupbox that is collapsible. By default, it is checked, and the Groupbox remains in the expanded mode when the XForm loads. |
|
Load content when group is expanded |
|
Sets the control as a load-on-demand control. This means that when a page is loaded for the first time at run time, the control is initialized (loaded with content) only when you expand it. |
|
Denotes whether a Groupbox control contains a control bar. When checked, a control bar appears on top of the Groupbox control. By default, it is unchecked. |
|
|
Denotes whether a Groupbox control contains a pagination bar. When checked, a pagination bar appears on top of the Groupbox control. By default, it is unchecked. |
|
|
Retrieves the root node of the XML data associated with the control; the location of the data is specified by the Reference property. |
|
|
Retrieves the immediate parent of the data that the control represents. This data is the child node of the business object. |
|
|
Retrieves an object through which the Control bar and Pagination bar button objects can be accessed at runtime. |
|
|
Retrieves the view object of the data model bound to the control. |
|
|
Retrieves the XML node of the data (value) that the control represents. The location (XPath) of this XML inside the business object is set through the Reference property. |
Event |
Description |
---|---|
Data Bind | This event is activated before the data is bound to a control. |
This event is activated when you collapse a Groupbox control. |
|
This event is fired after a load-on-demand control is selected and its content loaded. You can use this event to perform operations such as setting default values, and retrieving data from Web services and binding it to the child controls. |
|
This event is activated when you expand a Groupbox control. |
Method |
Description |
---|---|
This method registers the control to receive notifications for an event. |
|
This method collapses the Groupbox control such that only the header is visible. This method applies only if the |
|
This method is available for data-bound controls only. It creates an instance of the business object for the control. |
|
This method disables the control on which it is invoked. |
|
This method enables the control on which it is invoked. |
|
This method expands the Groupbox to display it. This method applies only if the |
|
This method displays the Find dialog box. This is equivalent to clicking in the navigation bar. |
|
This method retrieves data or business object. |
|
This method clears the current model's data and retrieves the first set of records from the application service. |
|
This method returns the label object that is associated with the control. |
|
This method clears the current model's data and retrieves the last set of records from the application service. |
|
This methods sends a request to the application service for the next set of records, if available. |
|
This methods sends a request to the application service for the previous set of records, if available. |
|
This method hides controls and all associated child controls. |
|
This method retrieves the value that denotes whether the control is enabled or not. |
|
isinitialized() |
This method returns the initialization status of child controls in the control that is set to load on demand, that is for which the Load content when group is expanded option is selected in the property sheet. Possible return values are:
|
This method is available for all controls bound to a model. This method refreshes the control with data from the business object that is passed as a parameter. If no parameter is passed, the business object of the model's activeTuple node is used and the control is refreshed. |
|
This method reverts the latest unsaved changes, and binds the control to the latest business object. |
|
This method is available only for data-bound controls. It removes the instances marked for deletion. |
|
This method unregisters the control to cease receiving notifications for its events. |
|
This method causes an element to receive focus. |
|
This method sets the text (that is passed as a parameter) to the label object of the control. |
|
This method makes the control and its children controls visible. |