You don’t need to use “new” because it’s done for you in the getInstance() factory method. As I mentioned in the previous post, wrap the line in a try-catch block.
Your Jetty server is not starting cleanly, it throws several exceptions because it can’t resolve jdbc/webdata. As I mentioned in an earlier post, you need to have a WebContent folder that is mapped to / in the deployment assembly. This folder can be created for you by adding the Dynamic Web Module facet. In that folder are WEB-INF and a META-INF, which are the locations for your xml configuration files.
Also, you never attach the grid (or anything) to the UI (
docs here ).
I have a WebContent folder that was created by adding the Dynamic Web Module facet, and I have both WEB-INF and META-INF folder which has the xml configuration files:
Context.xml
Web.xml
I followed your instructions – and shall double check here again:
If you have m2e and m2e-wtp installed in Eclipse, then you can add the Dynamic Web Module facet to your Vaadin archetype project (right click your project, select Properties, choose Project Facets from the left pane). If your project is not already in faceted form, converting it and adding Dynamic Web Module will give you a WebContent folder with a WEB-INF and a META-INF, so you now have a destination for your web.xml and context.xml.
Your deployment assembly (also under project properties) must include the following mappings:
I’ve attached an image that shows you the mappings I have for one of my projects that deploys to a server (instead of using the jetty-maven plugin). Note the options in the “New Assembly Directive” dialog box. If you don’t see these options (e.g. Java Build Path Entries), then make sure m2e and m2e-wtp are installed correctly.
Finally, I recommend making your mysql jdbc connector 5.1.40 a maven dependency instead of a referenced library. You can do that by adding the following lines to your pom.xml in the section:
" or JSF. Totally different. All the same, you got it working.
There is no error in the app. The reason that there is nothing to the right of the grid is because you don’t have any code that puts anything to the right of the grid. All you have is a UI subclass that takes a grid. To get the rest, take the code from a working example and merge that into your init() method on your UI class.
Going to use the download example and add that code into the grid code, then print the CRUD Vaadin example code and add the Create, Update and Delete part.
Thank you!
Sorry to have taken up so much of your time.
Shall always be grateful for your guidance and instruction.