org.xulux.api.gui
Interface IInvalidValueStrategy


public interface IInvalidValueStrategy

This interface is used to determine how to handle invalid values entered by the user. An implementation of this interface will be called on leaving a field or when the Ok button (with defaultaction set to save) is clicked. You can only set one strategy per part. Both methods are always called, so if you don't want to use a checking on a form level, just return true form that method.

Version:
$Id: IInvalidValueStrategy.java,v 1.1 2005/12/18 12:58:15 mvdb Exp $
Author:
Martin van den Bemt

Method Summary
 boolean checkForm(IPart part)
          Check the specified form for invalid values.
 boolean checkWidget(IWidget widget)
          Checks the specified widget for invalid values.
 boolean handleInvalidValueException(IWidget widget, InvalidValueException exception)
          Handles an invalidvalueexception, so we can eg display a message to the user
 

Method Detail

checkForm

boolean checkForm(IPart part)
Check the specified form for invalid values.

Parameters:
part - the applicationpart to check
Returns:
true if all fields in the part have valid values, false if it doesn't

checkWidget

boolean checkWidget(IWidget widget)
Checks the specified widget for invalid values.

Parameters:
widget - the widge to check
Returns:
true if the widget contains a valid value, false it it doesn't

handleInvalidValueException

boolean handleInvalidValueException(IWidget widget,
                                    InvalidValueException exception)
Handles an invalidvalueexception, so we can eg display a message to the user

Parameters:
widget - the widget with the exception
exception - the exception
Returns:


Copyright © 2002-2007 Martin van den Bemt. All Rights Reserved.