Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Modules and ICMModules and ICM
Previous
 
Next
New Post
8/11/2006 10:30 AM
 
despite Google and the search I cannot resolve my problem with ICM.

I have two modules and I want some communication between the two. I have used the demo code I have found of the ImcExampleInCS.

The problem is ModuleCommunication does not get filled, and therefore no communication is done.

Anyone suggestions ???

Thanx
Patrick
 
New Post
8/14/2006 9:46 AM
 

Huray, got it working. But I am still not quite happy about it. Let me share the sollution and hope someone comes up with a better one.

My first module on the page is a grid displaying my records. When I click on a record and the setting of the module is to use a form, it broadcasts the action using the ModuleCommunication event, which in effect triggers the second module, my form, to display the record.

The main problem I was facing is the following code:

if (ModuleCommunication != null)
   ModuleCommunication(
this, oArgs);

If there is a subscription on the event, it fires the event. Great, but ModuleCommunication was null, and so the event never fired (just fire it, leads to an error :) )

The solution was the order of modules (to damn simple, to try the first time :D:D:D) When I place my grid first in the center pane and the form beneath it on the center pane, the ModuleCommunication event is not subscribed by the form in the PostBack. It first executes the grid and handles it events, then it renders the form and handles its events.

When I first place the form control, it is rendered, handles the events and registers to the ModuleCommunication Event. The second control, the grid, is rendered, handles the event, namely fires up the ModuleCommunication event. Because the first control is registered to the event, it executes the event handler.

 

So, wrapping it up: The order of modules is essential in handling the ModuleCommunication event. Sad but true (to qoute one of my favorite bands). First use the receiver module on the page, after that you can use the sender module. Perhaps something could be thought if for a next release. For instance, first render all modules and let them register to the event and only fire the event after that event.

greetz,

Patrick Baanvinger

 
New Post
8/14/2006 10:34 AM
 

Things are getting stranger with every net thingy found. Now it appears only to be working when I am an authenticated user. In retrospect Order part is not the problem, it only appeared because I was authenticating to change the order. In other words, the communication does not seem te work when I am not authenticated.

This poses a new problem, not for the edit (used guest just because I did not want to login after every compile), for another control. Any suggestions anyone :D

 
New Post
8/24/2006 2:34 PM
 
I experienced the same issue but I have managed to resolve it. The problem for me was the fact that I was declaring the ModuleCommunicationEventHandler at the bottom of the class. Therefore, the eventhandler was not registered before the if(ModuleCommunication != null) code. So I moved the eventhandler declaraion code to the top of the class and it that solved the problem
 
New Post
8/29/2006 8:01 AM
 
This, unfortunaly, did not resolve my problem:( Beside that, the order of declaring should not be a problem at all, given the structure of C#. Guess you were lucky
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Modules and ICMModules and ICM


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out