I'm using Eclipse RAP and have the following use case:
- enter search text in a
Text
field and start search - change a
Label
text to "searching...." - do actual search (async) and display result in a
Table
The problem, even though the label should change to "searching...." before the actual search is started, it is changed to "searching...." after the search is done.
What I'm looking for is a way to push/force/update the current UI state to the client after the label changed, prior to searching:
- enter search text in a
Text
field and start search - change a
Label
text to "searching...." - push current UI state to client
- do actual search (async) and display result in a
Table
Here some sample code:
Label statusLabel = new Label(parent, SWT.NONE);
Text searchText = new Text(parent, SWT.SEARCH);
searchText.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetDefaultSelected(SelectionEvent e) {
// change label
statusLabel.setText("searching...");
// HERE force client update
// start searching
Display.getCurrent().asyncExec(new Runnable() {
@Override
public void run() {
// do actual search
}
});
}
});