1. What will you learn
You will explore the different modes of data validation and use server
side validation and the error display components. You will become familiar
with xPages' error handling concepts and capabilities.
2. Task Description
You will create in your xScrapbook database a new page to explore the 2
server side error handling controls and their use. This exercise doesn't
constitute a part of our sample application.
3. Detailed Steps
1. Open the Scrapbook database and create a
new xPage called “validationTest”
Name, TagLine, Color (drop down list with red, yellow, green), myCheckbox
(a checkbox) and itemCount
the Name field a mandatory field and add an error message
the TagLine field a minimum length of 4 and a maximum of 40, create a error
the itemCount a numeric display (in data)
and check out the dataConverter xp:convertNumber (in all properties)
Preview the results in the browser – we will introduce server side validation
a “Display Error” control next to the Name control. Set its “Show error
messages for” property to “name”
the name control and in “all properties” - data section, set “disable
clientSideValidation” to true
Add a Submit button and then test it in the browser.
a “Display Errors” control into some space between the fields and the
the “disableClientSideValidation” on the TagLine control
Test in browser
4. The Result
5. Things To Explore
a Script library for validation
would you use client side and when server side validation?