Results 1 to 2 of 2

Thread: Stopping the SelectionEvent

  1. #1
    Sencha User
    Join Date
    Mar 2014
    Posts
    6

    Default Stopping the SelectionEvent

    Hi ,
    I have the following code below, how do I stop the event from propagating , i.e. event.Stop() or event.kill()
    Code:
    getGrid().getSelectionModel().addSelectionHandler( new SelectionHandler<Client> () {
                    
                    @Override
                    public void onSelection(SelectionEvent<Client> event) {
                        Client client=event.getSelectedItem();
                        //event.stop
                        sendToFav(client);
                        
                        
                    }
                } );

  2. #2
    Sencha Premium Member
    Join Date
    Dec 2012
    Posts
    100

    Default

    I don't know what you want to do exactly. But if you want to cancel the selection you can do something like this:

    Code:
    grid.getSelectionModel().addBeforeSelectionHandler(new BeforeSelectionHandler<DbTestItemCombination>() {
                @Override
                public void onBeforeSelection(BeforeSelectionEvent<DbTestItemCombination> event) {
                    final DbTestItemCombination combination = event.getItem();
                    event.cancel();
                }
            });
    You can get the item before it is selected and use it for your method.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •