IBM Support

RS02188: VALUE EDITORS HANDLED INCORRECTLY IN DATAGRID DT

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • There are several issues related to value editors in the
    datagrid DT editor.
    1/ positionning bug
    The editor should open above, not below. It's related to the
    width of the widget, and the positionning options that are
    invalid.
    Reproduce :
    - open a DT
    - define a 1st column as a date
    - resize your browser window to make the viewport small enough,
    
    so that the VE would need to pop above the cell, and not below.
    
    This means you need to place the cell close to the bottom of
    the viewport.
    => the date VE is displayed below instead of above the cell,
    and gets clipped.
    Fix:
    Fix positionning options.
    2/ a js error on loadDropDown
    JS error whenever you open a value editor from a cell.
    Fix:
    override loadDropDown and no-op. We misuse DropDownButton
    apparently for accessibility reasons (see the comments in
    js/com/ibm/rules/bdsl/dt/celledit/AutoSizeTextBoxWithValueEditor
    
    .js:37), but this leads to some unwanted behaviors with the
    drop down that's never actually used (we place things ourselves
    
    instead of relying on DropDownButton, which might be causing
    the bug...).
    3/ leaked ve containers
    When displaying a VE, we create a "ve container" dom node, and
    place the VE node inside this container. Those are never
    destroyed.
    Reproduce :
    - open a DT with date value editor
    - open dev tools
    - check that no ve container is present : $$('.
    dtCellValueEditor').length == 0
    - open a VE (edit a date and click the VE button)
    - check that 1 ve container is present : $$('.
    dtCellValueEditor').length == 1
    - cancel the VE
    => the container is still present : $$('.dtCellValueEditor').
    length == 1
    - open the VE a second time
    => you now have 2 ve containers : $$('.dtCellValueEditor').
    length == 2
    Fix:
    Do the necessary cleanup : destroy the veContainer node when
    the VE is closed.
    4/ The datagrid 'dispose' lifecycle
    The dispose() method is called when we open a VE. We basically
    try to dispose the previous VE if any.
    I'm not sure why : I think we should dispose() when the popup
    is closed.
    Fix:
    call dispose() when the VE is closed.
    tmp workaround:
    override commit() and cancel() and have them invoke this.
    dispose() :
            commit: function() {
                this.inherited(arguments);
                this.dispose();
            },
            cancel: function() {
                this.inherited(arguments);
                this.dispose();
            }
    These are called when the popup closes, and can be used for
    "early cleanup".
    Be aware that this causes dispose() to be called multiple times
    
    on the same VE : once when closed (commit/cancel), and once
    when the next VE is open. So you may have to do the necessary
    checks in there (e.g. prevent undefs or double-destroys).
    VE Lifecycle explained
    ----------------------
    VEs registered into the factory are objects singleton objects.
    There is one "ve" object in the factory for the lifetime of the
    
    app. Then, the caller (intellitext or DT) calls lifecycle
    methods on this object (in short - we also have get/set value
    etc but that's not the point here) :
    - getDomNode
    - startEdit
    - dispose
    Our built-in VEs (eg Dates) create a new dom node and keeps a
    ref to it when getDomNode() is called. They destroy the created
    
    widgets in their dispose() method.
    The general lifecycle of a VE should be :
    - openVE :
    * get ve from factory
    * getDomNode
    * startEdit
    - close VE :
    * dispose
    Here's how it currently works in the various components using
    VEs.
    -- Intellitext
    - open VE :
    * get ve from factory
    * create container
    * call ve.getDomNode()
    * place ve in container
    * call ve.startEdit()
    - close VE
    * call ve.dispose()
    * destroy container node
    -- datagrid
    - open VE
    * create container
    * dispose previous VE if any
    * get ve from factory
    * call ve.getDomNode()
    * place in container
    * call ve.startEdit()
    - close VE
    * hide ve container
    See 4/ above => datagrid lifecycle is flawed.
    -- gridx
    - open VE
    * get ve from factory
    * clone ve (why ??)
    * destroy previous drop down (ValueEditorContainer) if any
    * create new ValueEditorContainer for ve (widgetify for use in
    HasDropDown)
    * call ve.getDomNode() (in buildRendering)
    * let HasDropDown place the ValueEditorContainer
    - close VE
    * HasDropDown calls destroy() on the ValueEditorContainer
    * ValueEditorContainer calls ve.dispose()
    

Local fix

Problem summary

  • Incorrect management of widget on dispose some are null
    

Problem conclusion

  • The code is fixed
    

Temporary fix

Comments

APAR Information

  • APAR number

    RS02188

  • Reported component name

    WS DECISION CTR

  • Reported component ID

    5725B6900

  • Reported release

    871

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2015-10-26

  • Closed date

    2015-12-12

  • Last modified date

    2015-12-12

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Modules/Macros

  • None
    999
    

Fix information

  • Fixed component name

    WS DECISION CTR

  • Fixed component ID

    5725B6900

Applicable component levels

  • R871 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSQP76","label":"IBM Operational Decision Manager"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.7.1","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
03 November 2021