In my Composite WPF application I have an event that is published when the user double-clicks on a control. Modules subscribe to the event and perform an action when necessary.
This event seems to stop working at random. Sometimes when I run the application I can trigger the event with no problems, other times I can only trigger it a fe...
Is there an equivalent of Microsoft's Prism EventAggregator for Java?
...
When I try to publish an event in my Customer Module, it doesn't work (the subscriber does not receive the object, displays nothing):
public class CustomersRegister : IModule
{
private static IRegionManager regionManager;
private static IRegion region;
private static CustomersMainView view;
private s...
I use Composite WPF(Prism) and I am trying to unit test that my Controller does in fact subscribe to a Composite Event.
My subscription code looks as follows...
//Init Events.
this.eventAggregator.GetEvent<PlantTreeNodeSelectedEvent>().Subscribe(
ShowNodeDetails, ThreadOption.UIThread);
My unit testing code looks as follows (I us...
I'm trying to implement automatic registration of my listeners to a singleton event aggregator when listeners are created by the IoC container - basically what Jeremy D. Miller is doing, but with Castle instead of StructureMap.
So I want to be able to "intercept" Windsor's object creation mechanism and, if the object supports the marker...
I worked my way through the Prism guidance and think I got a grasp of most of their communication vehicles.
Commanding is very straightforward, so it is clear that the DelegateCommand will be used just to connect the View with its Model.
It is somewhat less clear, when it comes to cross Module Communication, specifically when to use E...
I've implemented navigation through my application using a Menu control which publish an event using EventAggregator on click of menu item. Something like as shown below,
this.eventAggregator.GetEvent<ViewRequestedEvent>()
.Publish(new BusinessObject.Model.MenuModel
{
Modu...
I am trying to update a progress bar in my main form while a background task is running.
I am using the EventAggregator from the latest Patterns & Practices release route my application wide events.
I am firing an event from a class listens to BackgroundWorker events and than fires an event as such:
Process on bw fires the BW method
...
I'm working on implementing an event aggregation with Prism. I have a few modules, and I want each of them to subscribe to events that tells them when they are requested. I started out doing an all plain example with both subscribed and publisher in the shell. No problems there. Now; when I move the subscribers out to my modules they don...
Hi, i did some homework and couldn't find any article about best practices about when to use each method..
just for clarification:
When using the event aggregator pattern : each screen has it's own reference of a viewmodel, the viewmodel publish changes using the eventaggregator, which later the observers use to synchronize their state....
Requirement
I'm using PRISM for developing a financial application. Our requirement is to be able to communicate across modules/process/machine boundaries.
For our first delivery we only want to be able to communicate between modules. However, we want to build a design which can be extended to cross-process/machine at a later stage wi...
I have an existing Silverlight application where Page.xaml has some buttons on it that load user controls into a TransitioningContentControl content host. Each of these user controls is bound to a viewmodel. Sometimes when changes are made to one user control, data in others would need to be updated. I have been looking at using the eve...
Hi,
I was looking at Prism EventAggregator and its' great. I part i was most concerned was its capability to marshal thread correctly to UI thread.
I was wondering if i can use this capability to provide module developers a class which could be used to create threads in a similar way as BackgroundWorker. Interface of class can be some...
I'm looking for samples / best practices of Event Aggregator implementation.
Anyone help ?
...
I have a class, that subscribes to an event via PRISMs event aggregator.
As it is somewhat hard to mock the event aggregator as noted here, I just instantiate a real one and pass it to the system under test.
In my test I then publish the event via that aggregator and then check how my system under test reacts to it. Since the event wil...
Is it possible to perform some custom processing when Windsor instantiates a type?
Something similar to:
container.Register(
AllTypes.Pick()
.FromAssembly(Assembly.GetExecutingAssembly())
.BasedOn<MyMarkerInterface>()
.WhenInstantiating(instance...
Hi.
Currently I'm building an application using latest Prism for Silverlight 4.
I've a module and in that module I've two views with view models. Also I've a module view with two regions for each view.
In module initialization I'm registering my views and view models in Unity container and also register views with corresponding regions.
...
Is this thread-safe?
The EventAggregator in Prism is a very simple class with only one method. I was surprised when I noticed that there was no lock around the null check and creation of a new type to add to the private _events collection. If two threads called GetEvent simultaneously for the same type (before it exists in _events) it l...
Working with a fairly large VB.Net back office winforms application. 1 million+ LOC.
Big ball of mud, 90% of all code is in Forms & other UI controls.
Slowly introducing better architecture as time & recources allows, We've been using ideas from the EventAggrgator by Jeremy Miller.
http://codebetter.com/blogs/jeremy.miller/archive/2...
I am using the EventAgregator pattern to subscribe and publish events. If a user subscribes to the event using a lambda expression, they must use a strong reference, not a weak reference, otherwise the expression can be garbage collected before the publish will execute.
I wanted to add a simple check in the DelegateReference so that if ...