org.cruxframework.crux.core.client.errors
Interface ValidationErrorHandler

All Known Implementing Classes:
ErrorHandlerImpl

public interface ValidationErrorHandler

An ValidationErrorHandler is called to report errors caused by a bad use of the application (typically validations over the screen state, based in business rules, before performing an action).

To specify your own ValidationErrorHandler, configure in your application module descriptor something like:

 <replace-with class="YourValidationErrorHandlerClass">
     <when-type-assignable class="org.cruxframework.crux.core.client.errors.ValidationErrorHandler" />
 </replace-with>
 

Author:
Thiago da Rosa de Bustamante, Samuel Almeida Cardoso (samuel@cruxframework.org)

Method Summary
 void handleValidationError(String errorMessage)
          Handle a validation error
 com.google.gwt.user.client.ui.Widget handleValidationError(com.google.gwt.user.client.ui.Widget widget, String errorMessage)
          Handle a validation error inside a widget
 

Method Detail

handleValidationError

void handleValidationError(String errorMessage)
Handle a validation error

Parameters:
errorMessage - The error message.

handleValidationError

com.google.gwt.user.client.ui.Widget handleValidationError(com.google.gwt.user.client.ui.Widget widget,
                                                           String errorMessage)
Handle a validation error inside a widget

Parameters:
errorMessage - The error message.
widget - the corresponding widget to be marked as invalid
Returns:
the widget appended to the errorElement


Copyright © 2014. All rights reserved.