Generate SiteMap on a User Event

Topics: Web Client Software Factory, UIP Application Block discussion, User Forum
Sep 28, 2007 at 3:09 PM
Hello,

My Application has Multiple Portals and Each Portals can define its own Tabs . I want to generate the SiteMap (Dynamic) in a User Event, Rather than in the Module Initializer. I already have a Dynamic Authorization module that limits the display of SiteMap Nodes based on the user Logged In. Depending on the Portal, the user is logged into, I want to display the set of tabs for that portal.

I am trying inject a Service Dependency as follows

ServiceDependency
ISiteMapBuilderService service;
public ISiteMapBuilderService SiteMapServices
{
service=value;
}
SiteMapNodeInfo moduleNode = new SiteMapNodeInfo("Providers");
service.AddNode(moduleNode)

I am having a difficulty in Instantiating the SiteMap service.

Please Help!!!!

Sanjeev
Developer
Sep 28, 2007 at 5:15 PM
Hi

It seems to be that you are not using Service Dependecy correctly.
Try doing something like this:

// In the class where you want to use the service.
private ISiteMapBuilderService service;
 
[ServiceDependency]
public ISiteMapBuilderService SiteMapServices
{
    set { service = value; }
}
I recommend you to read the following topics in the WCSF's documentation .
  • Web Client Software Factory - June 2007 -> Developing Web Client Applications -> How to: Register and Use Services.
  • Web Client Software Factory - June 2007 -> Inspecting the Software Factory Assets -> Application Blocks -> Object Builder -> Working with ObjectBuilder.
  • Web Client Software Factory - June 2007 -> Inspecting the Software Factory Assets -> Patterns for Web Client Applications -> Dependency Injection.
Please let me know if this helps.

Mariano Converti
http://staff.southworks.net/blogs/mconverti/