Hi, I am having a challenge with implementing or rather getting Entities.Modules.Communications.IModuleListener to work.
I have the 2 modules BuyOnlineSideMenu and BuyOnlineViewProducts. I implemented the IModuleCommunicator in the BuyOnlineSideMenu module and the IModuleListener in BuyOnlineViewProducts. Please see the code below. The Sidemenu consists out a treeview, when a category is selected it causes a postback during which it raises the ModuleCommunication event. I have debugged upto this point and can confirm that it works upto here but the handler on the IModuleListener is never reached.
My events seem to be fired in the following order:
1. BuyOnlineSideMenu.Page_load
2. BuyOnlineViewProducts.Page_load
3. BuyOnlineSideMenu.TreeViewOnNodeClickEvent
Any help will be appreciated
Thanks
Wayne
Partial Class BuyOnlineSideMenu
Inherits BaseNetReadyModule
Implements Entities.Modules.Communications.IModuleCommunicator
...
Protected Sub TreeViewOnNodeClickEvent(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeNodeEventArgs)
Dim Moduleargs As New Entities.Modules.Communications.ModuleCommunicationEventArgs
Moduleargs.Sender = "BuyOnlineSideMenu.ascx"
Moduleargs.Target = "BuyOnlineViewProducts.ascx"
Moduleargs.Text = e.Node.Text
Moduleargs.Type = "node clicked"
Moduleargs.Value = e.Node.Value
RaiseEvent ModuleCommunication(Me, Moduleargs)
End Sub
End Class
Partial Class BuyOnlineViewProducts
Inherits BaseNetReadyModule
Implements Entities.Modules.Communications.IModuleListener
...
Public Sub OnModuleCommunication(ByVal s As Object, ByVal e As DotNetNuke.Entities.Modules.Communications.ModuleCommunicationEventArgs) Implements DotNetNuke.Entities.Modules.Communications.IModuleListener.OnModuleCommunication
If e.Target = "BuyOnlineViewProducts.ascx" Then
If CInt(e.Value) > 0 Then
_ProductCategoryID = e.Value
BuildProductDisplay()
End If
End If
End Sub
End Class