public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
if (isCommiting()) {
ActionErrors errs = null;
storeItems();
for (Iterator i = storedItems(); i.hasNext();) {
PropertyItem item = (PropertyItem) i.next();
PropertyDefinition def = item.getDefinition();
try {
Object propertyValue = item.getPropertyValue();
if (propertyValue instanceof String) {
propertyValue = String.valueOf(propertyValue).trim();
item.setValue(propertyValue);
}
def.validate(String.valueOf(propertyValue), getClass().getClassLoader());
} catch (CoreException ce) {
ce.getBundleActionMessage().setArg3(
CoreUtil.getMessageResources(request.getSession(), def.getMessageResourcesKey()).getMessage(