小编Jan*_*ski的帖子

如何验证vaadin中的字段

我正在用vaadin创建一个Java项目.现在我有一个用户注册表格,如下所示:

public class RegistrationComponent extends CustomComponent implements View {

    public static final String VIEW_NAME = "Registration";
    public RegistrationComponent(){
        Panel panel = new Panel("Registration Form");
        panel.setSizeUndefined();
        FormLayout content = new FormLayout();
        CheckBox checkBox1, checkBox2, checkBox3;
        checkBox1 = new CheckBox("Check Box 1");
        checkBox2 = new CheckBox("Check Box 2");
        checkBox3 = new CheckBox("Check Box 3");
        checkBox1.setRequired(true);
        checkBox2.setRequired(true);
        TextField mailTextField = new TextField("Email Address");
        TextField passwordTextField = new TextField("Password");
        TextField confirmPasswordTextField = new TextField("Confirm Password");
        final Button submitButton = new Button("Submit");
        content.addComponent(mailTextField);
        content.addComponent(passwordTextField);
        content.addComponent(confirmPasswordTextField); …
Run Code Online (Sandbox Code Playgroud)

java forms validation vaadin vaadin7

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

forms ×1

java ×1

vaadin ×1

vaadin7 ×1

validation ×1