This commit is contained in:
Keith Donald
2008-08-12 05:06:43 +00:00
parent c3ba766e36
commit 173fd665ad
16 changed files with 223 additions and 549 deletions

View File

@@ -19,6 +19,8 @@ import java.text.NumberFormat;
import java.util.Locale;
/**
* Produces NumberFormat instances that format integer values.
*
* @see NumberFormat
* @author Keith Donald
*/

View File

@@ -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();

View File

@@ -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()) {