org.apache.empire.struts2.jsp.controls
Class InputControl.FieldValueError

java.lang.Object
  extended by org.apache.empire.struts2.jsp.controls.InputControl.FieldValueError
All Implemented Interfaces:
ErrorInfo
Enclosing class:
InputControl

public static final class InputControl.FieldValueError
extends java.lang.Object
implements ErrorInfo

This class wraps a parsing or validation error. You should not use this class directly but through the error function of InputControl


Constructor Summary
InputControl.FieldValueError(ErrorType errorType, java.lang.String[] msgParams, java.lang.String value, java.lang.Class source)
           
 
Method Summary
 java.lang.String[] getErrorParams()
          Returns the parameters used to build the error text.
 java.lang.String getErrorSource()
          Returns the source object's class name that raised the error
 ErrorType getErrorType()
          Returns the last error code.
 java.lang.String getValue()
           
 boolean hasError()
          Returns wether or not an error is set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputControl.FieldValueError

public InputControl.FieldValueError(ErrorType errorType,
                                    java.lang.String[] msgParams,
                                    java.lang.String value,
                                    java.lang.Class source)
Method Detail

hasError

public boolean hasError()
Description copied from interface: ErrorInfo
Returns wether or not an error is set.

Specified by:
hasError in interface ErrorInfo
Returns:
true if an error has been set, or otherwise false

getErrorType

public ErrorType getErrorType()
Description copied from interface: ErrorInfo
Returns the last error code.

Specified by:
getErrorType in interface ErrorInfo
Returns:
the error code of ERR_NONE if no error has been set.

getValue

public java.lang.String getValue()

getErrorParams

public java.lang.String[] getErrorParams()
Description copied from interface: ErrorInfo
Returns the parameters used to build the error text.

Specified by:
getErrorParams in interface ErrorInfo
Returns:
the error message or null if no error has been set.

getErrorSource

public java.lang.String getErrorSource()
Description copied from interface: ErrorInfo
Returns the source object's class name that raised the error

Specified by:
getErrorSource in interface ErrorInfo
Returns:
the error message or null if no error has been set.


Copyright © 2008-2009 Apache Software Foundation. All Rights Reserved.