Reputation: 60
I'm moving to 7.1 from 7.0.5 version and I begin to change ProgressIndicator class with ProgressBar to refactor with the new polling mechanism.
This is returned error:
Caused by: java.lang.NoSuchMethodError: com/vaadin/ui/AbstractField.getState(Z)Lcom/vaadin/shared/AbstractFieldState; at com.vaadin.ui.ProgressBar.getState(ProgressBar.java:108) at com.vaadin.ui.ProgressBar.getState(ProgressBar.java:33) at com.vaadin.ui.AbstractComponent.isReadOnly(AbstractComponent.java:535) at com.vaadin.ui.AbstractField.isReadOnly(AbstractField.java:201) at com.vaadin.ui.AbstractField.setValue(AbstractField.java:457) at com.vaadin.ui.AbstractField.setValue(AbstractField.java:438) at com.vaadin.ui.ProgressBar.setValue(ProgressBar.java:93) at com.vaadin.ui.ProgressBar.(ProgressBar.java:50) at com.vaadin.ui.ProgressBar.(ProgressBar.java:40)
Anybody can explain me?
Thanks
Upvotes: 0
Views: 2004
Reputation: 21268
I have just upgraded from 7.0.5 to 7.1 and all I had to do in order to use the new, preferred ProgressBar
was to change this:
ProgressIndicator pi = new ProgressIndicator();
pi.setPollingInterval(1000);
to this :
Progressbar pb = new ProgressBar();
UI.getCurrent().setPollInterval(1000);
The second line should be called after the long running operation has been stared, because it causes the UI to poll for changes every second.
If you have a custom theme and don't extend any of Vaadin included themes, also don't forget to update styles for the new ProgressBar. HTML markup is the same, however, the default CSS class name is changed from v-progressindicator
to v-progressbar
;
Upvotes: 2