Form model library

Form model library is a form definition API and a form binding API

License

License

Categories

Categories

ORM Data
GroupId

GroupId

ru.d-shap
ArtifactId

ArtifactId

form-model
Last Version

Last Version

1.0
Release Date

Release Date

Type

Type

jar
Description

Description

Form model library
Form model library is a form definition API and a form binding API
Project URL

Project URL

https://github.com/d-shap/form-model
Source Code Management

Source Code Management

https://github.com/d-shap/form-model

Download form-model

How to add to project

<!-- https://jarcasting.com/artifacts/ru.d-shap/form-model/ -->
<dependency>
    <groupId>ru.d-shap</groupId>
    <artifactId>form-model</artifactId>
    <version>1.0</version>
</dependency>
// https://jarcasting.com/artifacts/ru.d-shap/form-model/
implementation 'ru.d-shap:form-model:1.0'
// https://jarcasting.com/artifacts/ru.d-shap/form-model/
implementation ("ru.d-shap:form-model:1.0")
'ru.d-shap:form-model:jar:1.0'
<dependency org="ru.d-shap" name="form-model" rev="1.0">
  <artifact name="form-model" type="jar" />
</dependency>
@Grapes(
@Grab(group='ru.d-shap', module='form-model', version='1.0')
)
libraryDependencies += "ru.d-shap" % "form-model" % "1.0"
[ru.d-shap/form-model "1.0"]

Dependencies

test (2)

Group / Artifact Type Version
junit : junit jar 4.12
ru.d-shap : assertions jar 1.2

Project Modules

There are no modules declared in this project.

Form model library

Form model library is a form definition API and a form binding API.

Form model represents the essential part of the GUI or any other source. For example, HTML page can contain many elements, but only some of them make sence for an application. Form model is a description of this essential elements. Then the source HTML page is binded with this description. The result of binding is the binded elements. An application can use this binded elements and do not care about how this elements were obtained from the source HTML page.

Form model library mediates between the source and the application and encapsulates the complexity of the source.

Form model library provides a form binding API, but does not bind the source with the form description itself. The binding extension is needed to bind specific source with the form description.

XML definition

Namespace: http://d-shap.ru/schema/form-model/1.0

form

The top-level element. Defines the form.

Attributes:

  • group - the form's group, optional
  • id - the form's ID, mandatory

Attributes group and id identify the form and should be unique.

Child elements:

  • element
  • single-element
  • form-reference

element

Element is a form part, that make sence for the application.

Attributes:

  • id - the element's ID, optional
  • lookup - the element's lookup string, used by the binding extension, mandatory
  • type - the element's type, optional

Valid values for the type attribute depend on the parent element. Possible values are:

  • required - there should be exactly one element.
  • required+ - there should be at least one element.
  • optional - there could be one element or no element at all.
  • optional+ - there could be more then one element or no element at all.
  • prohibited - there should not be any element.

Child elements:

  • attribute
  • element
  • single-element
  • form-reference

attribute

The element's attribute.

Attributes:

  • id - the attribute's ID, optional
  • lookup - the attribute's lookup string, used by the binding extension, mandatory
  • type - the attribute's type, optional

Valid values for the type attribute depend on the parent element. Possible values are:

  • required - there should be exactly one element.
  • optional - there could be one element or no element at all.
  • prohibited - there should not be any element.

single-element

Single element is a container for other elements. Only one child element should present (but child element could be optional+).

Attributes:

  • id - the single element's ID, optional
  • type - the single element's type, optional

Valid values for the type attribute depend on the parent element. Possible values are:

  • required - there should be exactly one element.
  • optional - there could be one element or no element at all.
  • prohibited - there should not be any element.

Child elements:

  • element
  • single-element

form-reference

The reference to another form definition. The elements of the referenced form are included in the current form as child elements of the form-reference element.

Attributes:

  • group - the form's group, optional
  • id - the form's ID, mandatory

Latest release

Form model library:

  • <groupId>: ru.d-shap
  • <artifactId>: form-model
  • <version>: 1.0

Donation

If you find my code useful, you can bye me a coffee

Versions

Version
1.0