startBrixxbox (Legacy)

Starts a Gebra Suite app. (Legacy)

This is a legacy function. Please use for new implementations startApp.

Parameters

  1. startOptions - This is a json object with the start parameters:

    • appName - name of the config as string

    • noInitialRefresh - the grids of the target apps are not refreshed on startup. Can be used if you send additionalValues for the selection and you want to avoid to fetch data, that will be imidiately replaced with the correct filtered data.

    • parentApp - the parent for the new api. If not set, this will be set to app from the caller, your current api.

    • id - (optional) id of the record to load in the new app

    • startMode - (optional)

      • "modal" will start in a modal overlay window (default),

      • "tab" will start the app in a new tab. You will not get a app object as a result in this case!

      • "page" will replace the content in the current browser tab

      • "invisible" will not show the app

    • appMode - (optional)

      • "form" will start the app as a Form (default),

      • "list" will start the app as a List of Records,

    • additionalValues (optional): json object of control values that should be set in the new app

    • parameters: (optional): json array of parameter flags (the flags you can choose in the menu endpoint editor) to set for the new app

    • container: (optional): a jQuery object to a div, where the new Gebra Suite will be embedded

Return value

If a Gebra Suite is started in "modal" mode, the function returns the app object of the new app. You have to await the result (Example 3) to use it.

Example Usages

This will start the app "myapp" in a modal dialog.

app.startBrixxbox({ appName: "myapp" }); //starts myapp as a form

app.startBrixxbox({ appName: "myapp", appMode: "list" }); //starts myapp as a list

This will start the app "myapp" in a modal dialog, load the record with id 1 and set the values of the 2 controls "addressNo" and "orderNo" inside the new app

let startOptions = {
  appName: "myapp",
  id: 1,
  startMode: "modal",
  additionalValues: {
    addressNo: 123,
    orderNo: 456,
  },
  parameters: ["openOrders", "shippedORders"],
};
app.startBrixxbox(startOptions);

This will start the app "myapp" in a modal dialog, and add an addEventListener for the save event.

let modalApp = await app.startBrixxbox({ appName: "myapp" });
modalapp.addEventListener("onRecordSaved", function (modalApp, eventArgs) {
  alert("Record saved in " + modalApp.appName);
});

Last updated