LSPS documentation logo
LSPS Documentation
Vaadin Upgrade

Forms make use of the Vaadin framework: by default, the LSPS Application uses Vaadin 7. Since 3.3.2082, it is possible to switch to Vaadin 8: mind that Vaadin 8 no longer supports Table and Table Tree, and you will need to tranform your Tables and Table Tree to another components, such as the Grid.

The process differs slightly on whether you have an application that was generated in an LSPS that supports Vaadin 8; that is, dependig on whether you generated your application in an LSPS version prior or after 3.3.2082.

Important: In the Vaadin 8 implementation, the following components are not supported:

  • Calendar
  • Table (use Grid)
  • Tree
  • TreeTable

Upgrading to Vaadin 8 from Before Vaadin 8 Support

To upgrade to Vaadin 8 your custom application which was generated prior to Vaadin 8 support was added, do the following:

  1. Install the LSPS maven repository to the repository used by PDS.

    If you are using the system maven repository, it is typically located in your home directory. Run cd ~/.m2/; unzip <DOWNLOADLOCATION>/lsps-repo<VERSION>.zip

  2. Open <applicationName>-vaadin/pom.xml
    1. Exclude lsps-human-vaadin-v7 from the lsps-human-app dependency.
      <dependency>
        <groupId>com.whitestein.lsps.human-processes</groupId>
        <artifactId>lsps-human-app</artifactId>
        <!-- ADD:-->
        <exclusions>
           <exclusion>
             <groupId>com.whitestein.lsps.human-processes</groupId>
             <artifactId>lsps-human-vaadin-v7</artifactId>
           </exclusion>
        </exclusions>
      </dependency>
      
    2. Add the following dependency as the last dependency:
      <dependency>
              <groupId>com.whitestein.lsps.human-processes</groupId>
              <artifactId>lsps-human-vaadin-v8</artifactId>
      </dependency>
      
  3. Add the following dependency to the root pom in <applicationName>/pom.xml:
    <dependency>
      <groupId>com.whitestein.lsps.human-processes</groupId>
      <artifactId>lsps-human-vaadin-v8</artifactId>
      <version>${lsps.version}</version>
    </dependency>
    
  4. Modify the following java classes in your <applicationName>-vaadin project:
    1. Make DefaultLspsAppConnector in the connectors extend LspsAppConnectorImplV8 instead of LspsAppConnectorImpl.
    2. Change its getFormsComponentFactory() as follows:
      @Override
        public FormComponentFactoryV8 getFormsComponentFactory() {
          return new LspsFormComponentFactory();
      }
    3. Make LspsFormComponentFactory extend FormComponentFactoryV8 instead of FormComponentFactory.
    4. Make LspsUIComponentFactory extend UIComponentFactory_PureV8Impl instead of UIComponentFactoryImpl.
    5. In AppLspsUI, add @Widgetset("com.whitestein.lsps.vaadin.widgets.WidgetSet") annotation above the class declaration.
  5. Rebuild your application.

Upgrading to Vaadin 8

To upgrade to Vaadin 8 your custom application which was generated after the Vaadin 8 support was added, do the following:

  1. Install the LSPS maven repository to the repository used by PDS.

    If you are using the system maven repository, it is typically located in your home directory. Run cd ~/.m2/; unzip <DOWNLOADLOCATION>/lsps-repo<VERSION>.zip

  2. Open <applicationName>-vaadin/pom.xml
    1. Exclude lsps-human-vaadin-v7 from the lsps-human-app dependency.
      <dependency>
        <groupId>com.whitestein.lsps.human-processes</groupId>
        <artifactId>lsps-human-app</artifactId>
        <!-- ADD:-->
        <exclusions>
           <exclusion>
             <groupId>com.whitestein.lsps.human-processes</groupId>
             <artifactId>lsps-human-vaadin-v7</artifactId>
           </exclusion>
        </exclusions>
      </dependency>
      
    2. Uncomment the following dependency:
      <dependency>
              <groupId>com.whitestein.lsps.human-processes</groupId>
              <artifactId>lsps-human-vaadin-v8</artifactId>
      </dependency>
      
  3. Add the following dependency to the root pom in <applicationName>/pom.xml:
    <dependency>
      <groupId>com.whitestein.lsps.human-processes</groupId>
      <artifactId>lsps-human-vaadin-v8</artifactId>
      <version>${lsps.version}</version>
    </dependency>
    
  4. Modify the following in your <applicationName>-vaadin project:
    1. In AppLspsUI, uncomment @Widgetset("com.whitestein.lsps.vaadin.widgets.WidgetSet") annotation above the class declaration.
    2. Remove the connectorsV7 package.
  5. In AppUiProvider.createLspsAppConnector() comment out the "return new DefaultLspsAppConnectorV7(lspsUI)"; and uncomment return new DefaultLspsAppConnector(lspsUI);
  6. Rebuild your application.