com.sssw.rt.util
Class AgoMissingDataException
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Exception
|
+--com.sssw.rt.util.AgoException
|
+--com.sssw.rt.util.AgoApiException
|
+--com.sssw.rt.util.AgoDataException
|
+--com.sssw.rt.util.AgoMissingDataException
- All Implemented Interfaces:
- AgiParentedException, Serializable
- public class AgoMissingDataException
- extends AgoDataException
The subclass of AgoDataException that indicates that
a value for a required field was not supplied.
Example:
// This code attached to a save button on a form checks to see if data in
// the dataset has changed, and if so, updates the data source.
try {
// If any data changed
if (agData.haveRowsChanged()) {
agData.updateRows();
}
}
catch (AgoMissingDataException e) {
// A user failed to enter a value in the form. Tell the user.
agGeneral.showMessage ("Error",
"Required data not entered in the form. Please try again.");
}
- See Also:
- Serialized Form
Method Summary |
String |
getFieldName()
Returns the name of the required field whose missing data resulted in the exception. |
void |
setFieldName(String f)
Sets the name of the field whose data is missing. |
Methods inherited from class com.sssw.rt.util.AgoException |
copyTo,
getExceptionHTML,
getExceptionMessage,
getExceptionMessage,
getHTML,
getMessage,
getMessage,
getParentException,
printStackTrace,
printStackTrace,
printStackTrace,
setHTML |
AgoMissingDataException
public AgoMissingDataException()
getFieldName
public String getFieldName()
- Returns the name of the required field whose missing data resulted in the exception.
- Example:
try {
...
}
catch (AgoMissingDataException e) {
String fieldName = e.getFieldName();
...
}
- See Also:
AgoMissingDataException.setFieldName(String)
setFieldName
public void setFieldName(String f)
- Sets the name of the field whose data is missing.
- Parameters:
f
- the name of the field whose data is missing- Example:
e.setFieldName ("myField");
- See Also:
AgoMissingDataException.getFieldName()