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.0How tolink 2 ore more modules?How tolink 2 ore more modules?
Previous
 
Next
New Post
1/24/2008 12:07 PM
 

Hi to all,

 

I've to implement a custom module in order to search, index and manage a collection of companies,

 

since moast funcitions are always the same i'd like to make a module with some (view) controls... I've started a new fresh dnn module with this manifest:

 

 <modules>
        <module>
          <friendlyname>Companies.Matrix</friendlyname>
          <cachetime>0</cachetime>
          <controls>
            <control>              
              <title>Dashboard</title>
              <src>DesktopModules/Companies/View.ascx</src>
              <type>View</type>
              <helpurl></helpurl>
            </control>
          </controls>
        </module>
        <module>
          <friendlyname>Companies.Search</friendlyname>
          <cachetime>0</cachetime>
          <controls>
            <control>
              <title>Search</title>
              <src>DesktopModules/Companies/Search.ascx</src>
              <type>View</type>
              <helpurl></helpurl>
            </control>
          </controls>
        </module>
        <module>
          <friendlyname>Results</friendlyname>
          <cachetime>0</cachetime>
          <controls>
            <control>
              <title>Results</title>
              <src>DesktopModules/Companies/Results.ascx</src>
              <type>View</type>
              <helpurl></helpurl>
            </control>
          </controls>
        </module>
      </modules>

 

than...

 

the first sub-module displays a clustered view  of companies,

the second is a search modul with its form,

and the third sub module will show the result of both the above described sub modules.

 

so i will like to to perform searches by the use of the 1st and 2nd module, than I'd like to use the third module to display and than manage results.

 

Then, how to link the 3rd module to the 1st and to the 2nd?

NOTE: each module must be show alone (ie. without the others)

 

thanks in advice.

 

 

 

 
New Post
1/25/2008 5:28 AM
 

I think you have to look at Blog module source code.

It will helps you in your scenario.

HTH.

 
New Post
1/25/2008 2:26 PM
Accepted Answer 

I've seen this done in a number of ways

1) DNN has a component called InterModule Communication (IMC) which works like Sharepoint in which two distinct modules on a page can share an interface contract and communicate data back and forth.  I haven't seen *much* on this in the past few years, I do'nt know how many people actually used it. 

2) Event Messaging - DNN offers an event messaging system.  You could use that depending what you  need to do to communicate. I've never used the eventing system so I don't know if this is quite the right mix for it. 

3) The most common thing I've seen is using the ctl parameter in the query string to define which control you want to show up (you have to register these controls in the module definitions) in which case you can just pass the mid (module id) and the ctl (which you define the name in definitions) and it will load that screen.  The catch to this method is that it will *only* show the one control, so if other modules are on the page, they will not be visible when you lcick something to show this one ctl.

4) Bubbling events - I'm not a *big* fan of this, but I know it can certainly be an easy approach.  You could look at the Page object of the ModuleBase (which you inherit into your control).  Use Page.FindControl, or recursivly go through the page controls (your approach is up to you) and find an instance of the control you want.  Then cast and link up to some events so on postback it can respond in some way.  This can have a number of drawbacks too (multiple instances on a page, prefecting when you hook your events in, etc).  that will allow you to have separate modules that can communicate in a more "round-a-bout" fashion (whereas IMC is a bit more elegant as well as the DNN event sink). 

HTH,

Chris


------------- w00t!
 
New Post
1/25/2008 11:23 PM
 

What you could also do is create three seperate modules and communicate using querystrings. You would have to do a postback but this is an easy way of communicating between modules.

 
New Post
1/27/2008 5:33 AM
 

I've done... just by nesting controls:

i've made a 2 "control container"s and some others nested controls dynamically loaded by the internal state of the module... then i've used the Attribute() method to build a communication mechanism between controls, so the control container works as a management component that delegates at each nested control a specific task and makes all nested sub components work together.

Well, it not a perfect projecting pattern, but it works in a simple way :) so i've used it...

 

Thanks

/D

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0How tolink 2 ore more modules?How tolink 2 ore more modules?


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