Author: nbelaevski
Date: 2008-03-08 09:31:11 -0500 (Sat, 08 Mar 2008)
New Revision: 6628
Modified:
trunk/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingBaseComponent.java
Log:
Changes from r5918 reverted
Update model error messages changed to valid ones
Modified:
trunk/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingBaseComponent.java
===================================================================
---
trunk/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingBaseComponent.java 2008-03-08
02:12:08 UTC (rev 6627)
+++
trunk/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingBaseComponent.java 2008-03-08
14:31:11 UTC (rev 6628)
@@ -319,7 +319,7 @@
*
*/
protected void validateValue(FacesContext context, Object newValue) {
- /* // If our value is valid, enforce the required property if present
+ // If our value is valid, enforce the required property if present
if (isValid() && isRequired() && isEmpty(newValue)) {
FacesMessage message = MessageUtil.getMessage(context,
UIInput.REQUIRED_MESSAGE_ID,
@@ -375,7 +375,7 @@
}
}
}
- }*/
+ }
}
/**
@@ -427,14 +427,14 @@
}
protected void updateModel(FacesContext context, UpdateModelCommand command) {
- /*try {
+ try {
command.execute(context);
} catch (EvaluationException e) {
String messageStr = e.getMessage();
FacesMessage message = null;
if (null == messageStr) {
message =
- MessageUtil.getMessage(context, UIInput.CONVERSION_MESSAGE_ID,
+ MessageUtil.getMessage(context, UIInput.UPDATE_MESSAGE_ID,
new Object[] {MessageUtil.getLabel(context, this)});
}
else {
@@ -446,26 +446,26 @@
}
catch (FacesException e) {
FacesMessage message =
- MessageUtil.getMessage(context, UIInput.CONVERSION_MESSAGE_ID,
+ MessageUtil.getMessage(context, UIInput.UPDATE_MESSAGE_ID,
new Object[] {MessageUtil.getLabel(context, this)});
message.setSeverity(FacesMessage.SEVERITY_ERROR);
context.addMessage(getClientId(context), message);
setValid(false);
} catch (IllegalArgumentException e) {
FacesMessage message =
- MessageUtil.getMessage(context, UIInput.CONVERSION_MESSAGE_ID,
+ MessageUtil.getMessage(context, UIInput.UPDATE_MESSAGE_ID,
new Object[] {MessageUtil.getLabel(context, this)});
message.setSeverity(FacesMessage.SEVERITY_ERROR);
context.addMessage(getClientId(context), message);
setValid(false);
} catch (Exception e) {
FacesMessage message =
- MessageUtil.getMessage(context, UIInput.CONVERSION_MESSAGE_ID,
+ MessageUtil.getMessage(context, UIInput.UPDATE_MESSAGE_ID,
new Object[] {MessageUtil.getLabel(context, this)});
message.setSeverity(FacesMessage.SEVERITY_ERROR);
context.addMessage(getClientId(context), message);
setValid(false);
- }*/
+ }
}
/**
@@ -493,7 +493,7 @@
protected void addConversionErrorMessage(FacesContext context,
ConverterException ce, Object value) {
- /* FacesMessage message = ce.getFacesMessage();
+ FacesMessage message = ce.getFacesMessage();
if (message == null) {
message = MessageUtil.getMessage(context, UIInput.CONVERSION_MESSAGE_ID,
new Object[] {MessageUtil.getLabel(context, this)});
@@ -503,7 +503,7 @@
}
message.setSeverity(FacesMessage.SEVERITY_ERROR);
- context.addMessage(getClientId(context), message);*/
+ context.addMessage(getClientId(context), message);
}
protected boolean isEmpty(Object value) {