scala - Vaadin - how to pass actors into UI elements -
I have just started using Wadiin and I have a simple Webdunia project that has 2 servlet and its related daily UI Defines squares. My question is how to design a "push" style system to give information among UI examples.
The first servlet is responsible for collecting data of users (a DataUI
, then it is stored in a database.
The second servlet graph Etc. It is responsible for reporting on the data gathered ... etc. (through a ReportUI
). For various customers who set different data for different users, Examples can be.
I have a Vast Art wanted where a centralized actor system
creates (sitting on the server) and passes ActorRef
example it is created as each DataUI
When DataUI collects some data, sends it through its
ActorRef
as a message and then closes. Similarly every ReportUI A
which will listen for new data related to its report, And according to this, the UI will update. ActorRef
has been passed in
My problem is that I do not understand the wadine infrastructure well enough to understand how you can convert references (like actors) into UI components during your creation. . UI objects seem instant using reflections and only through requests objects or just the web. You can access the string parameters set in the XML file. How do you do dependency injection with Vaadin UI objects?
I know that it is possible to achieve such behavior by using single-object globally accessible - but I would like to have an architecture where I can test the unit for each component in isolation (eg Forcing them into fake actors) without hard-wired them to a single single object or database.
Is it achieved in a standard way? Any help or advice on a good architecture would be greatly appreciated! thank you in advanced.
I am currently using
- vadin 7.1.12
- Akay 2.1.2
In addition to that I am using Scala 2.10.3 and Scalidine Cover Library (scaladin_2.10-3.0.0.jar) - but any basic Java instances will still be highly appreciated - I '
After every single UI has been created for you, protected Zero init (VaadinRequest request)
invokes the method. For example, you can get a suitable actor, for example depending on the request criteria (i.e. the url applicable to the URL) or the factory category that you can configure in web.exm.
Eventually, leaving the charge to make UI context, you can go for the lack of real dependence through the Wadin / CDI extension. This will actually allow you to @enify your dependency in the UI but it is currently in alpha state, not sure if it is acceptable I have used it and it works very well for the basic @ inject material. .
Comments
Post a Comment