Giter Club home page Giter Club logo

guice's People

Contributors

amahdy avatar berndhopp avatar edler-san avatar knoobie avatar peergynt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

guice's Issues

Minimize Vaadin dependencies (vaadin10)

The addon has a dependency on the vaadin (platform) acrtifact and therefore you also get all transitive depencencies of that artifact when you use this addon in a project. In fact, the addon would only need the flow-server and flow-html-components dependecies. As a user i would like this addon to come with a minimal set of depenencies to have more control over them. Especially when it comes to the vaadin version I would like to use. As it is now, I always get all depencencies for the latest Vaadin release.

Vaadin 10+ guide

A lot has changed since vaadin8, a quick guide or minimalistic starter-project would be a nice to have.

Feature request: Support Route annotation type rather than defining extension of UI

Since Vaadin 10, the need to extend the UI class to enter an application has been substituted in favour of the the Router (Route annotation).

To quote the Vaadin documentation

Most things you have previously done in the UI class, can be achieved in alternative, better ways.

I would like to request a new mechanism, to complement the existing UI code, where the Guice Servlet is able to locate and dependency inject Routes without having to define a UI as a single initial entry point. The use of Routes also allows us to easily define multiple URL entry points easily using Vaadin 10 semantics.

Many thanks. If this capability already exists, please correct me via the comments below.

Java 9+ ConcurrentModification in UIScope

With Java 9+ a ConcurrentModification was thrown when the injection of ViewScope Views occured the first time.
The reason is the changed behavior of HashMap::computeIfAbsent. Now a ConcurrentModification is thrown, if the map is changed in the mappingfunction. This pull request seems to fix the problem: #17

`SEVERE:
com.google.inject.ProvisionException: Unable to provision, see the following errors:

  1. Error in custom provider, java.util.ConcurrentModificationException
    at de.test.views.ProdView.class(ProdView.java:15)
    while locating de.test.views.ProdView

1 error
at com.google.inject.internal.InternalProvisionException.toProvisionException(InternalProvisionException.java:226)
at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1053)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1086)
at com.vaadin.guice.server.ViewProviderBase.getView(ViewProviderBase.java:22)
at com.vaadin.guice.server.GuiceViewProvider.createView(GuiceViewProvider.java:95)
at com.vaadin.guice.server.GuiceViewProvider.lambda$getView$5(GuiceViewProvider.java:87)
at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1133)
at com.vaadin.guice.server.GuiceViewProvider.getView(GuiceViewProvider.java:87)
at com.vaadin.navigator.Navigator.navigateTo(Navigator.java:652)
at de.test.views.DefaultView.lambda$new$91da45c0$1(DefaultView.java:18)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:499)
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:273)
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:237)
at com.vaadin.server.AbstractClientConnector.fireEvent(AbstractClientConnector.java:1014)
at com.vaadin.ui.Button.fireClick(Button.java:384)
at com.vaadin.ui.Button$1.click(Button.java:57)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:155)
at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:116)
at com.vaadin.server.communication.ServerRpcHandler.handleInvocation(ServerRpcHandler.java:445)
at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:410)
at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:274)
at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:90)
at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40)
at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1601)
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:445)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:791)
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
at ...`

Unit tests are failing on vaadin8 branch

Results :

Failed tests:   ui_scopes_should_not_overlap_in_same_session(com.vaadin.guice.server.UIScopeTest): Values should be different. Actual: com.vaadin.guice.testClasses.UIScoped1@1d2bd371
  ui_scopes_should_not_overlap_in_different_sessions(com.vaadin.guice.server.UIScopeTest): expected:<com.vaadin.guice.testClasses.UIScoped2@4cf8b2dc> but was:<com.vaadin.guice.testClasses.UIScoped2@708400f6>

Tests run: 13, Failures: 2, Errors: 0, Skipped: 0

Filter support

I'm trying to set up some security javax.servlet.Filters in Vaadin 10 and I realized that injector is being created in servlet init(), not in a context listener, thus not available during the filter init().

Is it really by design?
Is there any way to set a filter using the injector that would be able to filter the VaadinServlet itself?

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.