0.1.0 • Published 5 months ago

@bitech-ag/bitech.ui5.lc v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

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

src/ActionForm.js

Generates a form for collecting data for an OData action and offers the option of calling the action with the entered parameters.

Constructor

ParameterTypeDescription
idstringOptional 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!
settingsobjectOptional object with initial settings for the new control

Metadata

PropertyTypeDefaultValueDescription
actionstringFull qualified name of OData action
autoSubmitbooleanfalseSubmits the form as soon as all mandatory fields have been filled and the Enter key has been pressed.
AggregationTypeMultipleDescription
toolbarsap.ui.core.ControltrueControls for the toolbar of form
contentsap.ui.core.ControltrueNot intended for use

Default aggregation: content

EventDescription
sentInforms about successful submission of the form

Annotations

AnnotationTypeDescription
fieldsstring[]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

src/Field.js

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

AnnotationTypeDescription
labelstringLabel for input field
kindOfStringstringType of string as described for property type of sap.m.input
readonlybooleanself-explanatory
0.1.0

5 months ago

0.0.1

5 months ago