I’m new to Vaadin (and Maven) and am working through the book ‘Data-Centric Applications with Vaadin 8’, but with Vaadin Flow. The sample code provided for the book has been refactored for Flow, however I’m running into an issue with the dependency on paged-tabs and can not get certain projects within the sample code to run.
This is the offending dependency. I see vaadin-tabs-flow-1.0.0.jar and vaadin-tabs-2.0.0.jar available in the Maven dependencies folder, but am not able to get either of those to work either. For instance:
Hi, you would have to provide more details. What is the exact problem? Does the project compile? Does it run? Are there any runtime exceptions? Does the application look wrong?
Hi,
I’m getting the following when trying to build the project in Eclipse:
.
.
.
[INFO]
Downloading: http://maven.vaadin.com/vaadin-addons/org/vaadin/tabs/paged-tabs/2.0.0/paged-tabs-2.0.0.jar
[INFO]
Downloading: https://repo.maven.apache.org/maven2/org/vaadin/tabs/paged-tabs/2.0.0/paged-tabs-2.0.0.jar
[INFO]
------------------------------------------------------------------------
[INFO]
BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO]
Total time: 3.362 s
[INFO]
Finished at: 2018-08-14T12:47:37-07:00
[INFO]
Final Memory: 16M/217M
[INFO]
------------------------------------------------------------------------
[ERROR]
Failed to execute goal on project chapter-07: Could not resolve dependencies for project packt.vaadin.datacentric:chapter-07:war:2.0-SNAPSHOT: Could not find artifact org.vaadin.tabs:paged-tabs:jar:2.0.0 in vaadin-addons (http://maven.vaadin.com/vaadin-addons) -> [Help 1]
I have tried building with both versions 1.0.0 and 2.0.0, since the following jars are in the project:
You should use paged-tabs:1.0.1 which is the most recent (there’s no 2.0.0). However, I just checked on Vaadin Directory and the component is not available with Maven for some reason. I’ll ping the team in charge of this and let you know. Meanwhile you can git clone and mvn install [this project]
(https://github.com/alejandro-du/paged-tabs). to install the dependency in your local Maven repository.
There seems to be a minor problem with the init. When I created 2 tabs eg. tab1 and tab2. When the view first displayed, the tab1 content will be displayed. Clicking on tab2 will display a blank content. However, clicking back on tab1 and then clicking another time on tab2 will then display tab2 content. Is there a way to fix this problem?
P Tan, I wasn’t able to reproduce the issue. My guess is that the problem might be related to how you are composing the content of the tabs. Can you share a minimal runnable project to reproduce the problem?
The tabs were originally working after the component .jar was added for Maven, however once I added a login screen to the project, I am also now experiencing the same problem as P Tan.
Did anyone get to the bottom of that? I currently only have a project utilizing a database… if need be, I can try to create a minimal runnable project.
Darren, it seems the file is corrupted. Can you please attach it again? (make sure you don’t include compiled code by running mvn clean before creating the zip file).