Java Reference
In-Depth Information
At this point we are prompted to hit Ctrl + Shift , then drag the mouse from the
message component to the field the message will be associated to. After doing so, our
page now looks like this:
An alternate way of assigning message components to their
corresponding input fields is to set the for property to the field's
component id in the Properties window.
After executing our application and attempting to submit the form with required
values missing, we will see an error message next to each field with failed validation.
Notice that the field id's are shown in the error message. This default behavior is not
very user friendly, since field id's are not known to the user. We can override this
default behavior by setting the label property of each input field; the value of this
property should match each component's label text.
 
Search WWH ::




Custom Search