Interface FormListener
- All Superinterfaces:
ClientEventListener,EventListener
Listener interface for handling form submission events.
This interface defines the callback method for form submission events, allowing applications to process user-submitted form data. Form listeners are essential for handling user input, performing validation, executing business logic, and persisting data in response to form submissions.
Features:
- Handles form submission events
- Provides access to all form field values through the event
- Supports server-side validation and processing
- Integrates with the Oorian client event system
Usage: Implement this interface to create handlers that process form submissions. Register the listener with form components to receive submission events.
public class LoginFormHandler implements FormListener {
@Override
public void onEvent(FormEvent event) {
Parameters params = event.getParameters();
String username = params.getString("username");
String password = params.getString("password");
// Validate credentials and authenticate
if (authenticate(username, password)) {
// Successful login
redirectToHome();
} else {
// Show error message
showError("Invalid credentials");
}
}
}
- Since:
- 2007
- Version:
- 1.0
- Author:
- Marvin P. Warble Jr.
- See Also:
-
Method Summary
-
Method Details
-
onEvent
Invoked when a form is submitted.This method is called when a user submits a form. The FormEvent contains a Parameters object with all form field names and values, which can be accessed to validate and process the submitted data.
- Parameters:
event- the form event containing all submitted form data
-