Open topic with navigation

TIBCO Business Studio™ - BPM Edition 5.4.0

# initialize()

The `initialize()` method must be implemented by the ControlWrapper. It is invoked once per control instance. It is invoked after all the Control Type resource dependencies have been loaded, but before the form data model has been initialized.

Any configuration properties that are defined statically will be provided at this time, although any properties that support binding or API support might be updated after the `initialize()` method is called. The implementation needs to add the markup to the DOM at this point for the given renderMode, although there are cases when the control is being rendered in a grid pane where the markup needs to be handled in the `refresh()` method.

Method Arguments:

- component: an object of type Component. Component represents the form-level Control or Pane object that hosts this custom control. The form model objects obtained through the component represent read-only versions of the form models. The initial configuration of the control can be accessed using the control object in the component, including any custom properties defined by the Control Type.
- renderMode: This is a string that specifies the mode in which the control is to be rendered. The possible values are:
  - normal
  - grid-edit

For Control Types that specify any of the renderModes static, view-text, and view-html, those modes will not be passed into the `initialize()` method, but will instead be handled as follows:

- static: If the control is being rendered in a static pane, then no instance of the control wrapper is instantiated and the renderStatic() method defined on the ControlWrapper Class is called instead.
- view-text and view-html: The form will access the getFormattedValue() method of the ControlWrapper when a view-only version of the control is needed.

Once a control instance has been asked to render in a particular mode, that instance will not be asked to render in a different mode.

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO Business Studio™ - BPM Edition

Copyright © 2015-2023. Cloud Software Group, Inc. All Rights Reserved.