1
votes

In my app, I added a validator to make sure the user entered the right informations into the TextFields.

I did it like this

        Validator v = new Validator();
        v.addConstraint(tf_name, new LengthConstraint(1, "Invalid Bandname"));

        v.addSubmitButtons(next);

        next.setUIID("nxtButtons");
        next.addActionListener((e) ->
                nextStep()
        );

tf_name is a TextField here, but when I run the app, the Button isn't clickable anymore, also the button does not look like he should with that UIID anymore, he looks like a simple Text with his name, when clicking nothing happens.

If I remove the

v.addSubmitButtons(next);

the Button looks and works normal, but of course without the validation.

What am I doing wrong?

Thanks in advance

1

1 Answers

1
votes

The submit button is disabled when the content is invalid so the disabled UIID is used for that button.

When you enter text into the text field the button should become enabled after accepting the text.