B25.FormEventHandler

Overview

To add your own event handlers, first create your own class which extends B25.FormEventHandler. Then, inside the customize method (as defined in the B25.Form.Customizer interface), you can bind an instance of your class to an action on the form.

To extend this class, you must override the handleEvent method. Inside the handleEvent method you can then add your own logic to respond to events and manipulate the contents of the form.

Example

1 2 3 4 5 global with sharing class MyEventHandler extends B25.FormEventHandler { global override void handleEvent(B25.FormEvent event, B25.Form form) { form.getField(B25__Reservation__c.B25__Title__c).updateValue('Hello World!'); } }

Methods

handleEvent

1 abstract void handleEvent(B25.FormEvent event, B25.Form form)

This method must be overridden in your own event handlers. Inside this method, you can inspect the event (as well as the current state of the form) and react to it by manipulating the form.

Parameters:

Name

Type

Description

event

B25.FormEvent

The event that your handler is responding to.

form

B25.Form

The form, which you can manipulate.


getHandlerName

1 String getHandlerName()

Returns the name of this handler. All default handlers that have been added by Booker25 have a descriptive name, which allows you to recognize them. This is useful if you want to disable specific handlers defined by Booker25. See https://gen25-jira.atlassian.net/wiki/spaces/BPD/pages/1895268396/Default+Handlers for an overview of which handlers are added by default.

Return value: String