User Tools

Site Tools


rm25232

rm#25232 Browser Compatibility - Chrome DA UX UE assignment issue (expand/collapse function)

Problem nachvollziehen

  • ASN mit 4 UEs erstellen (durch Split)
  • Auf die UX Maske wechseln
  • Nach “UX Number” sortieren
  • 1 UX erzeugen
  • Knopf “1 UX per UE” drücken. Es werden 4 neue UXes erzeugt. Vermutlich mit dieser Aktion wird Datastore kaputt gemacht
  • Jetzt z.B. das oberste UX zuklappen/aufklappen → es wird ein anderes UX zugeklappt/aufgeklappt

Ursache

  • In processUIEvent() (ext-all-debug-w-comments.js:131079) wird in der Zeile 131114 die Methode indexInStore() (ext-all-debug-w-comments.js:143786) verwendet, die einen falschen Index liefert, wenn bei dem Eintritt auf die Seite “Expedition Units” die Tabelle nach der Spalte “UX number” sortiert ist.
  • ASNUXPanel.js
    • createUXPack() erstellt UXes
      • die erstellten UXes werden unter Umständen nicht verwendet (s. Zeile 1027)

Notizen

Ext.view.View

Zeilen 130673 - 131316 in “ext-all-debug-w-comments.js”

Ab Zeile 131079:

    processUIEvent: function(e) {
 
    //...
 
        var me = this,
            // this.getTargetSelector() can be used as a template method, e.g., in features.
            item = e.getTarget(me.getTargetSelector(), me.getTargetEl()),
            map = me.statics().EventMap,
            index, record,
            type = e.type,
            newType = type,
            sm;
        // If the event is a mouseover/mouseout event converted to a mouseenter/mouseleave,
        // use that event type and ensure that the item is correct.
        if (e.newType) {
            newType = e.newType;
            item = e.item;
            // When not buffering mouseover events, the event is a singleton; clear for next usage.
            e.newType = e.item = null;
        }
        // For keydown events, try to get either the last focused item or the selected item.
        // If we have not focused an item, we'll just fire a container keydown event.
        if (!item && type == 'keydown') {
            sm = me.getSelectionModel();
            record = sm.lastFocused || sm.getLastSelected();
            if (record) {
                item = me.getNode(record, true);
            }
        }
        if (item) {
            if (!record) {
                record = me.getRecord(item);
            }
            index = me.indexInStore ? me.indexInStore(record) : me.indexOf(item);
            // It is possible for an event to arrive for which there is no record... this
            // can happen with dblclick where the clicks are on removal actions (think a
            // grid w/"delete row" action column) or if the record was in a page that was
            // pruned by a buffered store.
            if (!record || me.processItemEvent(record, item, index, e) === false) {
                return false;
            }
            if ((me['onBeforeItem' + map[newType]](record, item, index, e) === false) || (me.fireEvent('beforeitem' + newType, me, record, item, index, e) === false) || (me['onItem' + map[newType]](record, item, index, e) === false)) {
                return false;
            }
            me.fireEvent('item' + newType, me, record, item, index, e);
        } else {
            if ((me.processContainerEvent(e) === false) || (me['onBeforeContainer' + map[type]](e) === false) || (me.fireEvent('beforecontainer' + type, me, e) === false) || (me['onContainer' + map[type]](e) === false)) {
                return false;
            }
            me.fireEvent('container' + type, me, e);
        }
        return true;
    },

Ext.view.Table

Zeilen 143051 - 145239 in “ext-all-debug-w-comments.js”

Ab Zeile 143786:

    indexInStore: function(node) {
        // We cannot use the stamped in data-recordindex because that is the index in the original configured store
        // NOT the index in the dataSource that is being used - that may be a GroupStore.
        return this.dataSource.indexOf(this.getRecord(node));
    },
rm25232.txt · Last modified: by kalaschnikow