Skip to content

CodeCoupler UI Update from 2.4 (cc-ui)

Changes in 2.4.13

The property transport.include in the DataSource Mixin loopback was renamed to include.

Changes in DataSourc Mixins from 2.4.???

Exported class names changed the Prefix DataSourceMixin into a shorter DSM. Example: DataSourceMixinMockup => DSMMockup.

The DataSource Mixin ExtendedFields is not included anymore.

Changes in System from 2.4.???

The system constructor have now only one argument. The previous first argument element is now the property container in the previous second argument options.

Some settings defined in the previous second argument options are moved into the new property settings. This applies in particular to settings that apply throughout the system and not just for the initialization of the system. Please read the documentation of the System class for details.

The structure in system wide messages settings have changed.

The static defaults which define now only syste, wide settings and not options anymore was renamed to settings.

The method getData() do not exist anymore. Use the getter dataSources.

Changes in all Components from 2.4.???

All components init() methods do not receive any arguments anymore. The previous argumnet env is now accessible over this.env. The previous argumnet options is now accessible over this.options.

Changes in Stages from 2.4.???

Stages defined as vue applications do not receive anymore the env and options properties. Instead of they receive a component property which is a pointer to the base Stage class. So you have to rewrite this.env to this.component.env and this.env.stage to this.component.

Changes in Widgets from 2.4.???

Widgets defined as vue applications do not receive anymore the env and options properties. Instead of they receive a component property which is a pointer to the base Widget class. So you have to rewrite this.env to this.component.env and this.env.widget to this.component.

The static field ui was removed. Use the async prepare() override to disable scrolling container.

The Event visibilitychanged and the getter fullvisible do not exist anymore. The concept was replaced by he getter and event visibility.

The static isWidget do not exist anymore. Use instanceof Widget instead.

The event destroy will not triggered anymore. Use the async destroy() method instead.

Changes in Authentication Modules from 2.4.???

The Loopback authentication module was renamed from AuthLoopback to AuthModLoopback.

Changes in Applications from 2.4.???

Split init into init and start

Do not call super.init() within your init() method anymore. All code behind the super call should placed in a new method called start(). The init() method must now return the application configuration object previous used as argument for the super.init() call.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
export default class extends Application {
  asnyc init(options) {
    return {
      /* Return config instead calling super.init() */
    }
  }
  async start(options) {
    /* Put your code here what you would do after the old super.init() call */
  }
}

Application Configuration object

The object that was used as argument for the call super.init() and to create the panel do not exist anymore. Only the value of the property panel is now the return value of the init(). All other properties have to be replaced as follows:

  • The property messages do not exists anymore. Messages will be taken from this.settings.messages.APP.BUTTONS.*
  • The property buttons do not exists anymore. Button shortcuts are now defined in this.settings.buttons.shortcuts and templates in this.settings.buttons.templates, where this.settings.buttons.templates.default is the previous template defined in etc.buttonTemplate.
  • The property widget (widget creation shortcut) do not exists anymore. With removing this widget the mechanism to add an widget into a container marked with "data-role=widget" also omitted. Use from now on the widget factory method of the application instance:
1
2
3
4
5
6
7
8
await this.widget({
  container: this.panel.content, //Set this
  id: "...",
  widget: YourWidget,
  options: {
    /*...*/
  },
});
  • The construct of layout, widgets and version as shortcut to create an layout widget do not exist anymore. This is now part of the layout widget.
  • Replacements handles.onError, handles.onSuccess, handles.onNoChanges and handles.onInputError will be defined here later.

On the Fly Applications

The application start configurations property init was removed. Instead defining the init method you can write this direct in the app object. Its not much more code. Furthermore the init semantic have changed and you can define further initialization methods like start.

Instead:

1
2
3
await app.app({
  init: async () => {},
});

Write now:

1
2
3
4
5
6
await app.app({
  app: class extends Application {
    async init() {}
    async start() {}
  },
});

Application as Function

You cannot define an application in the start definition object as simple function anymore. This had never started a real application and was used only for testing purposes.

Removed depricated

The deprecated application start configurations property layout and the application instance property layoutwas removed. Use widget: Layout instead.

Splash

  • getSplashContent method removed
  • splash method added
  • start config splash have two sub-properties init and start that can set to false

Removed

Static property isApp is removed.

Removed Widgets from 2.4.???

  • GenericWidget
  • GenericWidgetNoScroll
Back to top