Validate user's input via WOTextField

70 Views Asked by At

How can I check the input a user made via a WOTextField?

These are my bindings:

fristName : WOTextField {
    value = session.customerOrder.customer.firstName;
}

and here's the Javacode:

public WOComponent confirmationpage() {
        //Some code
        try {
            if (!session.customerOrder().customer().firstName().isEmpty()) {
                dataValid = true;
            }
        } catch (Exception e) {
            e.printStackTrace();
            whatsMissing += "Firstname ";
            dataValid = false;
        }
        //More code
}

How can I check the user's input without to store it into a var?

0

There are 0 best solutions below