Hi,
I need show the page loading when the user click in button. I use push but not work, the page loading its not show or show in finish and not show the message.
This my code:
@Override
public void actionBotonPresentarRegistrar(ClickEvent event) {
addValidator();
if (isFormValid()) {
UI.getCurrent().setPollInterval(500);
loadingView = new LoadingView();
getNavigator().navigateTo(LoadingView.NAME);
new LoaderProcces().start();
} else {
VaadinUtils.notificacionError(Constantes.ERROR_VAL_FORM);
}
}
And the code LoaderProcees
[code]
class LoaderProcces extends Thread {
@Override
public void run () {
try {
UI.getCurrent().access(new Runnable() {
@Override
public void run() {
try {
buildPantallaFirma();
} catch (Exception e) {
logger.error(Constantes.ERROR_FIRMAR, e);
solicitudView.setErrorMsg(Constantes.ERROR_DEFAULT);
getNavigator().navigateTo(SolicitudView.NAME);
}
}
});
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
[/code]Ths class that load data and show the message for the loading page
private void buildPantallaFirma () throws Exception {
Thread.sleep(6000);
loadingView.setTextoCarga("Validando servicios");
UI.getCurrent().push();
.....
}
Web.xml
The server when running the app is Weblogic 10.3.6 and it have not support version 3.0 with Asynchronous Support in Servlet.
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
.......
<servlet>
<servlet-name>Vaadin Application Servlet</servlet-name>
<servlet-class>com.vaadin.server.VaadinServlet</servlet-class>
<init-param>
<description>Vaadin UI to display</description>
<param-name>UI</param-name>
<param-value>sispecan.sce.formulario.seminormalizado.App</param-value>
</init-param>
<init-param>
<param-name>widgetset</param-name>
<param-value>sispecan.sce.formulario.seminormalizado.DefaultWidgetSet</param-value>
</init-param>
</servlet>
The UI class
@Theme("sede")
@SuppressWarnings("serial")
@Push(PushMode.AUTOMATIC)
public class App extends AppGeneric {
....
}