polish
This commit is contained in:
@@ -19,6 +19,8 @@ import java.text.NumberFormat;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Produces NumberFormat instances that format integer values.
|
||||
*
|
||||
* @see NumberFormat
|
||||
* @author Keith Donald
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@ public interface NumberFormatFactory {
|
||||
/**
|
||||
* Factory method that returns a fully-configured {@link NumberFormat} instance to use to format an object for
|
||||
* display.
|
||||
* @return returns the number for a
|
||||
* @return the number format
|
||||
*/
|
||||
public NumberFormat getNumberFormat();
|
||||
|
||||
|
||||
@@ -53,13 +53,15 @@ public class MessageContextErrors extends AbstractErrors {
|
||||
* Creates a new message context errors adapter.
|
||||
* @param messageContext the backing message context
|
||||
* @param objectName the object name
|
||||
* @param boundObject the model object
|
||||
* @param expressionParser the expression parser
|
||||
* @param mappingResults object mapping results
|
||||
*/
|
||||
public MessageContextErrors(MessageContext messageContext, String objectName, Object boundObject,
|
||||
ExpressionParser expressionParser, MappingResults mappingResults) {
|
||||
this.messageContext = messageContext;
|
||||
this.messageContext = messageContext;
|
||||
this.boundObject = boundObject;
|
||||
this.objectName = objectName;
|
||||
this.boundObject = boundObject;
|
||||
this.expressionParser = expressionParser;
|
||||
this.mappingResults = mappingResults;
|
||||
}
|
||||
@@ -118,6 +120,7 @@ public class MessageContextErrors extends AbstractErrors {
|
||||
}
|
||||
|
||||
public Object getFieldValue(String field) {
|
||||
// requires boundObject, and expressionParser to work
|
||||
if (mappingResults != null) {
|
||||
List results = mappingResults.getResults(new FieldErrorResult(field));
|
||||
if (!results.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user