Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

strange listgrid onSelectionChanged call on DataSource saveData

$
0
0
Hello.

On one of my pages, i have a listgrid to the left and a dynamicform to the right. Both backed by the same datasource. Under the form. there's a "savebutton" that when clicked calls savedata on the datasource.

I have an OnSelectionChangedHandler on the listgrid that i use to load the form with the row selected in the grid, like this:

Code:

listGrid.addSelectionChangedHandler(new SelectionChangedHandler() {
            @Override
            public void onSelectionChanged(SelectionEvent event) {
                System.out.println("onSelectionChanged;"+event.getState());
                handleListGridSelectionChange();
            }
        });

My problem is this:

When i do save data, a request goes to my server-side spring service, and then i have a callbackhandler client-side.

But BEFORE my callbackhandler is called, i get an "onSelectionchanged" event, with the same row that is already selected, every time.

I have no idea why this is, the selection always stays the same in the grid, nothing changes.

Is there something you can tell me about this? Is this part of the datasource process somehow?

Viewing all articles
Browse latest Browse all 4756

Trending Articles