You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exception is thrown in client if we put the Grid into dialog and callled "setDataProvider()" "select" twice
Expected outcome
when open the dialog again, fetch the data from DB and set the DataProvider, it should work.
because we often to add some data in some page and go back to another page to open the dialog, that time we should refresh the page content, it should work
private Button sayHello;
Dialog dialog = new Dialog();
List<String> list = new ArrayList<>();
private Grid<String> grid = new Grid<String>();
public HelloWorldView() {
list.add("aa");
list.add("bb");
list.add("cc");
grid.setWidth("300px");
grid.setHeight("300px");
grid.addColumn(String::toString);
dialog.add(grid);
setId("hello-world-view");
sayHello = new Button("Say hello");
add(sayHello);
sayHello.addClickListener(e -> {
// we will fetch the data from db in my actual environment, here I just create one list.
grid.setDataProvider(DataProvider.fromStream(list.stream()));
Random random = new Random();
grid.select(list.get(random.nextInt(3)));
//first time, it will work, everything looks good. But when you call it again ,it will throw exception.
// this is just one demo, it is different with my actual environment. this code just proves the issue.
//and it already blocked our development process. hope it could be resolved soon. thanks.
dialog.open();
});
}
}`
Browsers Affected
[] Chrome
Firefox
Safari
Edge
IE 11
iOS Safari
Android Chrome
The text was updated successfully, but these errors were encountered:
Description
Exception is thrown in client if we put the Grid into dialog and callled "setDataProvider()" "select" twice
Expected outcome
when open the dialog again, fetch the data from DB and set the DataProvider, it should work.
because we often to add some data in some page and go back to another page to open the dialog, that time we should refresh the page content, it should work
Actual outcome
It will throw exception in browser
Live Demo
Steps to reproduce
`@Route(value = "hello", layout = MainView.class)
@PageTitle("Hello World")
@CssImport("./styles/views/helloworld/hello-world-view.css")
@RouteAlias(value = "", layout = MainView.class)
public class HelloWorldView extends HorizontalLayout {
}`
Browsers Affected
The text was updated successfully, but these errors were encountered: