Skip to content

Commit 45525b8

Browse files
authored
📝 Add the Input fields & TextArea documentation
#2 Add annotations properties description for : TextField fix #61 Number fix #62 Password fix #63 TextArea fix #64 [ci skip]
1 parent 791501a commit 45525b8

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed

docs/index.md

+74
Original file line numberDiff line numberDiff line change
@@ -1 +1,75 @@
1+
# Documentation
12

3+
In this section, we describe all the features of the SF-Java-Ui.
4+
5+
## Supported Fields
6+
We start with the supported fields. Each field is rendered based on annotations and the different properties provided and filled by the developer, so in the section below we define the different properties supported by each field.
7+
For more details please visit [the Angular Schema Form documentation](https://github.com/json-schema-form/angular-schema-form/blob/master/docs/index.md#form-types)
8+
9+
### TextField:
10+
11+
To render a field as a TextField the developer must add the [@TextField](../src/main/java/io/asfjava/ui/core/form/TextField.java) annotation to his field.
12+
13+
| Properties | Type | Usage |
14+
| ------------- |:-------------: | :-----|
15+
| title | String | The title of the field |
16+
| placeHolder | String | Placeholder on inputs |
17+
| description | String | A description, can be HTML |
18+
| minLength | Integer | Min text length |
19+
| maxLength | Integer | Max text length |
20+
| pattern | String (regEx) | Reg Ex used to validate the input |
21+
| validationMessage | String | A custom validation error message |
22+
| readOnly | Boolean | Make the field readOnly |
23+
| noTitle | Boolean | Set to true to hide title |
24+
| fieldAddonLeft | String | [Extend form controls](http://getbootstrap.com/components/#input-groups) by adding text on the left side of the Text Field |
25+
| fieldAddonRight | String | [Extend form controls](http://getbootstrap.com/components/#input-groups) by adding text on the right side of the Text Field |
26+
27+
### NumberField:
28+
29+
The given component can be used to fill numeric values, it can be applied to fields of type [java.lang.Number](https://docs.oracle.com/javase/7/docs/api/java/lang/Number.html) (Integer, Long, Double, Float, etc ...). The developer must use the [@Number](../src/main/java/io/asfjava/ui/core/form/Number.java) in this case.
30+
31+
| Properties | Type | Usage |
32+
| ------------- |:-------------: | :-----|
33+
| title | String | The title of the field |
34+
| placeHolder | String | Placeholder on inputs |
35+
| description | String | A description, can be HTML |
36+
| validationMessage | String | A custom validation error message |
37+
| readOnly | Boolean | Make the field readOnly |
38+
| noTitle | Boolean | Set to true to hide title |
39+
| fieldAddonLeft | String | [Extend form controls](http://getbootstrap.com/components/#input-groups) by adding text on the left side of the Number Field |
40+
| fieldAddonRight | String | [Extend form controls](http://getbootstrap.com/components/#input-groups) by adding text on the right side of the Number Field |
41+
42+
### PasswordField:
43+
44+
For some use cases, the developer need to use a encrypted UI input field to fill the user value. So he can use [@Password](../src/main/java/io/asfjava/ui/core/form/Password.java).
45+
46+
| Properties | Type | Usage |
47+
| ------------- |:-------------: | :-----|
48+
| title | String | The title of the field |
49+
| placeHolder | String | Placeholder on inputs |
50+
| description | String | A description, can be HTML |
51+
| minLength | Integer | Min text length |
52+
| maxLength | Integer | Max text length |
53+
| pattern | String (regEx) | Reg Ex used to validate the input |
54+
| validationMessage | String | A custom validation error message |
55+
| readOnly | Boolean | Make the field readOnly |
56+
| noTitle | Boolean | Set to true to hide title |
57+
| fieldAddonLeft | String | [Extend form controls](http://getbootstrap.com/components/#input-groups) by adding text on the left side of the Password Field |
58+
| fieldAddonRight | String | [Extend form controls](http://getbootstrap.com/components/#input-groups) by adding text on the right side of the Password Field |
59+
60+
### TextArea
61+
62+
The TextArea component is a multiline text field with a border and optional scroll bars. To use a this component the developer must use [@TextArea](../src/main/java/io/asfjava/ui/core/form/TextArea.java)
63+
64+
| Properties | Type | Usage |
65+
| ------------- |:-------------: | :-----|
66+
| title | String | The title of the field |
67+
| placeHolder | String | Placeholder on inputs |
68+
| description | String | A description, can be HTML |
69+
| minLength | Integer | Min text length |
70+
| maxLength | Integer | Max text length |
71+
| validationMessage | String | A custom validation error message |
72+
| readOnly | Boolean | Make the field readOnly |
73+
| noTitle | Boolean | Set to true to hide title |
74+
| fieldAddonLeft | String | [Extend form controls](http://getbootstrap.com/components/#input-groups) by adding text on the left side of the Text Area |
75+
| fieldAddonRight | String | [Extend form controls](http://getbootstrap.com/components/#input-groups) by adding text on the right side of the Text Area |

0 commit comments

Comments
 (0)