Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    ListGrid: slave data fetch on selectionChanged prevents dblclick handler notification

    Hi, I noticed that fetching data on a ListGrid's SelectionChangedHandler prevents RecordDoubleClickHandler notification when the user double clicks a record and changes the selection.
    Is there a way to achieve both notifications, provided that selection changes cause some data fetch?

    Here you are a fast snippet written in one go to illustrate the issue
    Code:
    grid.addRecordDoubleClickHandler (new RecordDoubleClickHandler() {
        @Override
        public void onRecordDoubleClick (RecordDoubleClickEvent event) {
            //ISSUE HERE: not triggered on double-click with selectionchange
        }
    });
    grid.addSelectionChangedHandler (new SelectionChangedHandler () {
        @Override
        public void onSelectionChanged (final SelectionEvent event) {
            final ListGridRecord[] records = grid.getSelection ();
    
            relatedGrid.fetchRelatedData (records[0], gridDataSource);
            relatedForm.fetchData (new Criteria ("id", records[0].getAttribute ("id")));
        }
    });
    Using SmartClient Version: SC_SNAPSHOT-2010-12-31/LGPL Development Only (built 2010-12-31)

    #2
    Set showPrompt:false via the DSRequest argument of fetchData() / fetchRelatedData() to prevent an interaction-blocking clickMask from being created, which then blocks the second click.

    Comment


      #3
      Great, it works :-)
      Many thanks

      Originally posted by Isomorphic
      Set showPrompt:false via the DSRequest argument of fetchData() / fetchRelatedData() to prevent an interaction-blocking clickMask from being created, which then blocks the second click.

      Comment

      Working...
      X