View source | Discuss this page | Page history | Printable version   

How To Implement FICExtension Hook


This document explains how to implement the FICExtension Hook. The hook is executed in the execute method of the FormInitializationComponent class just before the response is built.

Hook Implementation

This hook is implemented by extending the FICExtension class. It has just one void method to implement: execute. This method receives as parameters the instances of the objects used to build the response.

The execution mode.
The Tab owner of the Form that it is being executed.
Map with the values of forms columns.
The BaseOBObject that it is being edited in the form.
The List of dynamic columns that fire the CHANGE event mode.
The List of messages returned by the callouts that have been executed.
The List with the attachments related to the record that it is being edited.
The List of JavaScript code returned by the callouts to be executed in the client.
The Map with all the hidden fields with their values.
count of notes available on the record that it is being edited.
The List of the Auxiliary Inputs overriden by callouts.


This example shows a message every time a new product is edited. You can find the code described below in the org.openbravo.platform.features module.

public class ProductFICExtensionExample implements FICExtension {
  public void execute(String mode, Tab tab, Map<String, JSONObject> columnValues, BaseOBObject row,
      List<String> changeEventCols, List<JSONObject> calloutMessages, List<JSONObject> attachments,
      List<String> jsExcuteCode, Map<String, Object> hiddenInputs, int noteCount,
      List<String> overwrittenAuxiliaryInputs) throws OBException {
    if ("180".equals(tab.getId())) {
      JSONObject jsonMessage = new JSONObject();
      try {
        jsonMessage.put("severity", "TYPE_WARNING");
        jsonMessage.put("text", "Product form opened");
      } catch (JSONException ignore) {

Retrieved from ""

This page has been accessed 2,890 times. This page was last modified on 7 May 2015, at 09:09. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.