SilverStream
Application Server 3.5

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

Constructor Summary
AgoMissingDataException()
           
 
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.AgoDataException
getSource
 
Methods inherited from class com.sssw.rt.util.AgoException
copyTo, getExceptionHTML, getExceptionMessage, getExceptionMessage, getHTML, getMessage, getMessage, getParentException, printStackTrace, printStackTrace, printStackTrace, setHTML
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods implemented from interface com.sssw.rt.util.AgiParentedException
getExceptionParent
 

Constructor Detail

AgoMissingDataException

public AgoMissingDataException()
Method Detail

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

SilverStream
Application Server 3.5