0.1.0 • Published 5 months ago
@bitech-ag/bitech.ui5.lc v0.1.0
Bitech UI5 low code library
The library contains a number of the elements that are used to automatically generate user interfaces based on the OData annotations. The library supports OData version 4 only.
ActionForm
extends: sap.ui.core.Control
Generates a form for collecting data for an OData action and offers the option of calling the action with the entered parameters.
Constructor
Parameter | Type | Description |
---|---|---|
id | string | Optional ID for the new control; generated automatically if no non-empty ID is given. Note: this can be omitted, no matter whether settings will be given or not! |
settings | object | Optional object with initial settings for the new control |
Metadata
Property | Type | DefaultValue | Description |
---|---|---|---|
action | string | Full qualified name of OData action | |
autoSubmit | boolean | false | Submits the form as soon as all mandatory fields have been filled and the Enter key has been pressed. |
Aggregation | Type | Multiple | Description |
---|---|---|---|
toolbar | sap.ui.core.Control | true | Controls for the toolbar of form |
content | sap.ui.core.Control | true | Not intended for use |
Default aggregation: content
Event | Description |
---|---|
sent | Informs about successful submission of the form |
Annotations
Annotation | Type | Description |
---|---|---|
fields | string[] | An array of parameter names. If specified, only these parameters will be displayed and in exactly the order specified. |
The form generates the Field elements for each input field. These evaluate further annotations. See Field Annotations.
Example
<mvc:View controllerName="bitech.bitlab.example.controller.Login"
xmlns="sap.m"
xmlns:mvc="sap.ui.core.mvc"
xmlns:lc="bitech.ui5.lc" displayBlock="true">
<Page id="loginPage" showHeader="false">
<FlexBox id="flexbox" alignItems="Center" justifyContent="Center" direction="Row" height="90%">
<lc:ActionForm id="loginForm"
binding="{/node.odata.login(...)}"
action="node.odata.login"
sent="handleLoginPress">
<lc:toolbar>
<ToolbarSpacer id="toolbarSpacer" />
<Link id="register" href="#/register" text="{i18n>register}" class="register" />
</lc:toolbar>
</lc:ActionForm>
</FlexBox>
</Page>
</mvc:View>
Field
extends: sap.ui.core.Control
Internally generates a suitable element for entering data. The Field control is currently not intended for direct use. Its interface can change at any time. Only the annotations that are used at the input field level are described here.
Annotations
Annotation | Type | Description |
---|---|---|
label | string | Label for input field |
kindOfString | string | Type of string as described for property type of sap.m.input |
readonly | boolean | self-explanatory |