
BBjWebComponent
Description
In BBj 24.00 and higher, the BBjWebComponent is a BBjControl that encapsulates a WebComponent or native HTML element in the BUI and DWC browser clients.
Implemented Interfaces
Creation
BBjAPI > BBjSysGui > BBjWindow > BBjWebComponent
A BBjWebComponent object is created through the following BBjWindow methods:
| Return Value | Method |
|---|---|
|
BBjWebComponent |
addWebComponent(int ID, int x, int y, int w, int h, String tagName) addWebComponent(int ID, int x, int y, int w, int h, String tagName, byte[] flags) addWebComponent(int ID, String tagName) addWebComponent(int ID, String tagName, byte[] flags) addWebComponent(String tagName) addWebComponent(String tagName, byte[] flags) |
Creation Flags
| Flag | Description |
|---|---|
| $0001$ | Sets the control to be initially disabled. |
| $0010$ | Sets the control to be initially invisible. |
| $0800$ | Draws a recessed client edge around the control. |
| $1000$ | Draws a raised edge around the control. |
Methods of BBjWebComponent
| Return Value | Method |
|---|---|
|
void |
clearCallback(String eventType) clearCallback(String eventType, int callbackID) |
|
int |
executeAsyncScript(String script) executeAsyncScript(String script, boolean await) executeAsyncScript(String script, boolean await, boolean event) |
|
Object |
executeScript(String script) executeScript(String script, boolean await) |
| boolean | getDisableOnClick() |
|
String |
getHtml() |
|
String |
|
|
int |
setCallback(String eventType, String subroutineName) setCallback(String eventType, String subroutineName, BBjWebEventOptions options) setCallback(String eventType, CustomObject customObject, String methodName) setCallback(String eventType, CustomObject customObject, string methodName, BBjWebEventOptions options) setCallback(String eventType, Object object, String methodName) setCallback(String eventType, Object object, String methodName, BBjWebEventOptions options) |
| void | setDisableOnClick(boolean disable) |
|
void |
setHtml(String html) |
|
void |
setSlot(BBjControl control) setSlot(String slot, BBjControl control) |
Methods of BBjWebComponent implemented for Focusable
| Return Value | Method |
|---|---|
|
boolean |
|
|
void |
setFocusable(boolean focus) |
Methods of BBjWebComponent implemented for TabTraversable
| Return Value | Method |
|---|---|
|
boolean |
|
|
void |
setTabTraversable(boolean trav) |
Methods of BBjWebComponent inherited from BBjControl
Events
| Callback Code | Object-oriented Event | Read Record Event | Code |
|---|---|---|---|
| ON_DEFINED | BBjWebComponentDefinedEvent | Web Component Defined Event | x |
| ON_EXECUTE_SCRIPT | BBjExecuteScriptEvent | Execute Script Event | x |
| ON_GAINED_FOCUS | BBjGainedFocusEvent | Control Focus Gained/Lost Event | f |
| ON_LOST_FOCUS | BBjLostFocusEvent | Control Focus Gained/Lost Event | f |
| ON_MOUSE_ENTER | BBjMouseEnterEvent | Mouse Enter/Exit Event | E |
| ON_MOUSE_EXIT | BBjMouseExitEvent | Mouse Enter/Exit Event | E |
| ON_POPUP_REQUEST | BBjPopupRequestEvent | Popup Request Event | r |
| ON_RIGHT_MOUSE_DOWN | BBjRightMouseDownEvent | Right Mouse Button Down Event | R |
| ON_WEB_EVENT (See Note) | BBjWebEvent | Web Event | x |
Note:
The ON_WEB_EVENT callback code is only a placeholder. Web Events are registered for String eventType codes using BBjWebComponent::setCallback.
Remarks
The developer is responsible for ensuring that the web component is available for use. The example program does this with the appropriate BBjWebManager::injectScriptUrl calls.
Constants inherited from BBjControl
Example 1 (Shoelace)
|
Example 2 (Web Awesome)
|
Version History
- BBj 26.02 : Added setDisableOnClick and getDisableOnClick methods for BBjWebComponent.
- BBj 24.11: Added an optional
eventargument for executeAsyncScript.
See Also
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.