Writing an OFBiz Java Event is as simple as writing a Java method and then configuring OFBiz to be able to find the Event on the Java CLASSPATH. When would you want to write a Java Event? Any time you want to process input from a web application, such as the submission of an HTML form entry or as a result of a URL request, an Event may be coded to accept the HTTP/HTTPS request and return a response object to the browser.
When writing your first Event, it is often easier to add your Event's method to an existing Java class file. Any existing class file will work. Remember that the OFBiz convention is to add an "
Events.java" suffix to class files containing Events.
To start writing Events, the following have ...