Skip to content

Commit 8ed05a0

Browse files
committed
add @Number demo form #62 📝
1 parent 4c5b607 commit 8ed05a0

File tree

3 files changed

+61
-12
lines changed

3 files changed

+61
-12
lines changed

demo/src/main/java/io/asfjava/ui/demo/screen/DemoForm.java

+22-8
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,37 @@
22

33
import java.io.Serializable;
44

5-
import io.asfjava.ui.core.form.Action;
6-
import io.asfjava.ui.core.form.ActionsGroup;
75
import io.asfjava.ui.core.form.TextField;
86

9-
@ActionsGroup({ @Action(title = "Next", type = "button", onClick = "goToNext()"),
10-
@Action(title = "Previous", type = "button", onClick = "goToPrevious()") })
11-
@Action(title = "Previous", type = "button", onClick = "goToPrevious()")
12-
@Action(title = "Next", type = "button", onClick = "goToNext()")
13-
@Action(title = "Send", type = "submit")
147
public class DemoForm implements Serializable {
158

16-
@TextField(title = "mail", pattern="^\\S+@\\S+$")
9+
@TextField(title = "Full Name", minLenght = 3)
10+
private String fullName;
11+
12+
@TextField(title = "Email", pattern = "^\\S+@\\S+$")
1713
private String mail;
1814

15+
@TextField(title = "Repository", fieldAddonLeft = "https://github.com/")
16+
private String githubRepository;
17+
18+
@TextField(title = "Github user name", fieldAddonRight = "@Github.com")
19+
private String githubUserName;
20+
1921
public String getMail() {
2022
return mail;
2123
}
2224

25+
public String getFullName() {
26+
return fullName;
27+
}
28+
29+
public String getGithubRepository() {
30+
return githubRepository;
31+
}
32+
33+
public String getGithubUserName() {
34+
return githubUserName;
35+
}
36+
2337
private static final long serialVersionUID = -5073515619469444978L;
2438
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package io.asfjava.ui.demo.screen;
2+
3+
import java.io.Serializable;
4+
import io.asfjava.ui.core.form.Number;
5+
6+
public class NumberDemoForm implements Serializable {
7+
8+
9+
@Number(title = "Full Name")
10+
private String fullName;
11+
12+
private String mail;
13+
14+
private String githubRepository;
15+
16+
private String githubUserName;
17+
18+
public String getMail() {
19+
return mail;
20+
}
21+
22+
public String getFullName() {
23+
return fullName;
24+
}
25+
26+
public String getGithubRepository() {
27+
return githubRepository;
28+
}
29+
30+
public String getGithubUserName() {
31+
return githubUserName;
32+
}
33+
34+
private static final long serialVersionUID = 8246871107045000185L;
35+
}

pom.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>io.sfjava.ui</groupId>
66
<artifactId>sf-java-ui</artifactId>
7-
<version>0.1.0</version>
7+
<version>0.1.0-SNAPSHOT</version>
88
<packaging>jar</packaging>
99

1010
<name>sf-java-ui</name>
@@ -170,9 +170,9 @@
170170
</build>
171171
<distributionManagement>
172172
<repository>
173-
<id>bintray-jsonschema-javaui-SF-Java-UI</id>
174-
<name>jsonschema-javaui-SF-Java-UI</name>
175-
<url>https://api.bintray.com/maven/jsonschema-javaui/SF-Java-UI/sf-java-ui/;publish=1</url>
173+
<id>bintray-jsonschema-javaui-sf-java-ui</id>
174+
<name>jsonschema-javaui-sf-java-ui</name>
175+
<url>https://api.bintray.com/maven/jsonschema-javaui/sf-java-ui/sf-java-ui/;publish=1</url>
176176
</repository>
177177
</distributionManagement>
178178

0 commit comments

Comments
 (0)