BPM, Workflow, and Case

 View Only
Expand all | Collapse all

How to retrieve localized string in a coach view event code?

  • 1.  How to retrieve localized string in a coach view event code?

    Posted Wed May 06, 2020 09:21 AM
    Hi,

    I need to pass a localized string to the bpmext.ui.alert method in the onchange event of a text input which is within a custom coach view. How can I access localized resources of the containing (custom) coach view from an event of a view within it? Is it possible at all?

    Thx

    ------------------------------
    Laszlo
    ------------------------------


  • 2.  RE: How to retrieve localized string in a coach view event code?

    IBM Champion
    Posted Thu May 07, 2020 09:39 AM
    How about of those 2 options:
    1) get the localized string with a AJAX call first (it's easy to make a service flow resource bundle aware so you can return a localized string) - this one requires you to make sure you don't call bpmext.ui.alert() until after you know the call has returned
    or
    2) Use a lightweight but invisible control - like a Data Control - set its label or help text to an entry in your resource bundle then, in your client code, just retrieve its label or help text (e.g. ${Data1}.context.options._metadata.get("label"))

    ------------------------------
    Eric Ducos
    ------------------------------