Giter VIP home page Giter VIP logo

web-vaadin8's Introduction

Vaadin 8 Grails 3 profile

This is a basic Grails 3 profile that enables Vaadin8-based development. Requires at least Grails 3.3.0.RC1

Getting Started

For versions of Grails 3.2.11 or lower

grails create-app vaadin --profile me.przepiora.vaadin-grails:web-vaadin8:0.2

The generated app contains a Vaadin UI component grails-app/vaadin/vaadin/VaadinGrailsUI.groovy

If you run the app

./gradlew bootRun

You will be able to see it in:

http://localhost:8080/vaadinui

For versions of Grails 3.3.0 or higher use

grails create-app vaadin --profile me.przepiora.vaadin-grails:web-vaadin8:0.3

The generated app contains a Vaadin UI component src/main/groovy/vaadin/VaadinGrailsUI.groovy

If you run the app

./gradlew bootRun

You will be able to see it in:

http://localhost:8080/vaadinUI

Common Issues

Services are not getting injected in Vaadin components

Services are injected automatically into Vaadin components. You need annotate them with @Autowired to get them injected into Vaadin components.

I get LazyInitializationException when accessing domain classes associations in my Vaadin compponents

When a Vaadin component calls a Grails service, once the service method completes, the Hibernate session is closed which means that any associations not loaded by the query could lead to a LazyInitializationException due to the closed session.

It is therefore critical that your queries always return the data that is required to render the view. This typically leads to better performing queries anyway and will in fact help you design a better performing application.

Distribution

Vaadin 8 Grails Profile is distributed in Bintray

web-vaadin8's People

Contributors

macprzepiora avatar sdelamo avatar

Stargazers

rob d. avatar Carlos Camacho avatar Armando Montoya avatar  avatar  avatar Luigi C. avatar zotona avatar

Watchers

 avatar

Forkers

aaloise

web-vaadin8's Issues

How to use the profile

I am trying to use the profile.

  • I cloned the repository.
  • Installed in maven local with .\gradlew install

I then run:
grails create-app foo โ€”-profile=me.przepiora.vaadin-grails:web-vaadin8:0.3-SNAPSHOT.

The app seems to be created with default web profile.

Am I missing any step?

Duplicate MyGrailsUI class

MyGrailsUI class is duplicated (in MyUI.groovy) which prevents the app from running. This skeleton file should be removed

Issue with multi-word package names in create-app command

If you supply a multi-word package to Grails create-app command:

test $ grails create-app com.demo --profile me.przepiora.vaadin-grails:web-vaadin8:0.2 --inplace

There is an issue:

$ ./gradlew bootRun
Starting a Gradle Daemon, 1 stopped Daemon could not be reused, use --status for details
:compileJava NO-SOURCE
:compileGroovy
startup failed:
/Users/sdelamo/Downloads/vaadin-tests/package-multiple-words/grails-app/vaadin/com/Com.demoGrailsUI.groovy: 14: unexpected token: . @ line 14, column 17.
   public class Com.demoGrailsUI extends UI{
                   ^

1 error

:compileGroovy FAILED

FAILURE: Build failed with an exception.

Grails Version 3.2.11

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.