Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add examples of using DS features in Vaadin components #25

Closed
denis-anisimov opened this issue Feb 25, 2019 · 8 comments
Closed

Add examples of using DS features in Vaadin components #25

denis-anisimov opened this issue Feb 25, 2019 · 8 comments

Comments

@denis-anisimov
Copy link

This is a demo for vaadin/flow#5125.

Could be done before vaadin/flow#5125 but won't work until the feature is implemented.

The purpose of this ticket is: demo OSGi DS features used for Vaadin components.
This is quite similar to https://github.com/vaadin/flow-spring-tutorial.

May be @Sandared may help with meaningful examples.

@Sandared
Copy link

Would an example as the Spring one be sufficient?
Or do you need something different?

@denis-anisimov
Copy link
Author

Well, the most obvious example is to "inject" a service into a component.
But this just only one usecase.

Would be good to see some other features in action (may be @activate, etc.) and I'm not aware about any good example for other usecase here.

@Sandared
Copy link

Ok, I will create some examples. Probably over the weekend.

@Sandared
Copy link

Sandared commented Mar 1, 2019

@denis-anisimov I've created a small sample repository with two examples on how OSGi components that are also Routes might look like: https://github.com/Sandared/flow-osgi-example

You can use Gitpod to run the examples or you can run locally from your console. The aliases I use in Gitpod are defined here: https://github.com/Sandared/flow-osgi-example/blob/master/Dockerfile

Example1 is just your Flow Hello World Application. @Activate is used on the consturctor and only one service is referenced.

Example2 additionally makes use of the OSGi eventing system and receives an event every 5 seconds which should result in a Notification being shown in Vaadin. This class does use an activation method instead of the constructor and makes use of ComponentPropertyTypes.

In the parent POM I reference the current Vaadin Flow 12.0.7 vaadin-bom.

If you need any other examples just notify me :)

@denis-anisimov
Copy link
Author

Thank you very much @Sandared for the examples !
Quite short and good demo for OSGi features usage.

@JulianFeinauer
Copy link

Hey, @Sandared could we integrate this with CDI?

@Sandared
Copy link

Hi Julian,
same here as with vaadin/flow#5125 ;)
But maybe @rotty3000 could help you with this.

@pleku
Copy link
Contributor

pleku commented Mar 11, 2021

@pleku pleku closed this as completed Mar 11, 2021
OLD Vaadin Flow ongoing work (Vaadin 10+) automation moved this from Product backlog to Done - pending release Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
OLD Vaadin Flow ongoing work (Vaadin ...
  
Done - pending release
Development

No branches or pull requests

4 participants