开发者

Vaadin + Eclipse Visual Editor NOT reloading/updating Composite components

开发者 https://www.devze.com 2023-04-09 03:52 出处:网络
I created a Vaadin Project, then wanted to create a Custom composite and display that as my main window (so i could take advantage of the Visual UI editor). Working with Tomcat Apache Server and the V

I created a Vaadin Project, then wanted to create a Custom composite and display that as my main window (so i could take advantage of the Visual UI editor). Working with Tomcat Apache Server and the Visual Editor has been a pain! Nothing updates even when i start, stop or restart the server. My mainWindow application will display some Vaadin components and not others. Here is an example i have of my main window code

import com.vaadin.Application;
import com.vaadin.ui.*;
public class DApplication extends Application {

@Override
public void init() {
        Window mainWindow = new Window("DApplication");
         //Header header = new Header();
         //header.setSizeFull();
        DHome dHome = new DHome();   //  **HERE IS THE COMPOSITE INSTANCE I CREATED IN ECLIPSE**
        dHome.setSizeFull();
        mainWindow.getContent().setSizeFull();
         mainWindow.addComponent(dHome);
         setMainWindow(mainWindow);

    }

}

Is this a bug or a problem with others using these same tool for making vaadin applications. My applicatio开发者_JAVA技巧n even if i shut off my machine wont update with newly components added to the composite?


When you open the URL for the application, it creates a new user session. The session is preserved even if you reload the page. However, if you use Eclipse, it likes to do hot deployment to Tomcat and you may experience a problem that the application does not return to its initial state after you modify code. As Tomcat likes to persist sessions on server shutdown, the application state can remain even if you restart the server.

Adding the ?restartApplication parameter in the URL tells the Vaadin servlet to create a new Application instance on loading the page. If you also include a URI fragment, the parameter should be given before the fragment.

0

精彩评论

暂无评论...
验证码 换一张
取 消