Add the Facet Selectors

Add the Facet Selectors

Top  Previous  Next

We need three facet selectors for the following associations of different types:

1.Person has skill (hierarchical multi-select facet selector)
2.Person member of unit (hierarchical single select facet selector)
3.Person is in team (flat topic of type facet selector)

The hierarchical selectors are provided by the NetworkedPlanet.EPiServerTopicMapIndexModule.WebParts.HierarchyFacetTopicSelectorEPiServerWebPart. This facet selector allows the user to select facet values from a hierarchy. Both Skills and Organisation Units are arranged in a hierarchy. As people have several skills, it makes sense to allow the user to select multiple skills to search for. For example: "I'm looking for a person with both XML and C# skills". As a person only works for one Organisation Unit this does not make sense, so the user will be restricted to selecting only one Unit.

Adding a hierarchy selector is achieved using the following ASPX/ASCX syntax and code-behind:

<EPiParts:HierarchyFacetTopicSelectorEPiServerWebPart

  runat="server"

  ID="hierarchyFacetSelector"

  HierarchySI="http://psi.networkedplanet.com/hierarchy/skills"

  AssociationTypePsi="http://www.networkedplanet.com/psi/organisation/personHasSkill"

  SourceRoleTypePsi="http://www.networkedplanet.com/psi/organisation/personHasSkillTarget"

  TargetRoleTypePsi="http://www.networkedplanet.com/psi/organisation/personHasSkillSource"

  Multiselect="true"

/>

 

// Executes during the OnLoad phase, regardless of whether a postback is occurring or not.

this.hierarchyFacetSelector.GetFso(this.fso.ProvideFso());

The following code adds a single selection hierarchy selector allowing the user to select an organisation unit to restrict the search results by:

<EPiParts:HierarchyFacetTopicSelectorEPiServerWebPart

  runat="server"

  ID="hierarchyFacetSelector2"

  HierarchySI="http://psi.networkedplanet.com/hierarchy/organisationunit"

  AssociationTypePsi="http://www.networkedplanet.com/psi/organisation/personMemberOfUnit"

  SourceRoleTypePsi="http://www.networkedplanet.com/psi/organisation/personMemberOfUnitTarget"

  TargetRoleTypePsi="http://www.networkedplanet.com/psi/organisation/personMemberOfUnitSource"

  Multiselect="false"

/>

 

// Executes during the OnLoad phase, whether a postback is occurring or not.

this.hierarchyFacetSelector2.GetFso(this.fso.ProvideFso());

Finally a topic of type selector can be used to display all the cross-functional teams that people are members of:

<EPiParts:TopicOfTypeTopicSelectorEPiServerWebPart

  runat="server"

  ID="topicOfTypeFacetSelector"

  AssociationTypePsi="http://www.networkedplanet.com/psi/organisation/personInTeam"

  SourceRoleTypePsi="http://www.networkedplanet.com/psi/organisation/personInTeamTarget"

  TargetRoleTypePsi="http://www.networkedplanet.com/psi/organisation/personInTeamSource"

/>

 

// Executes during the OnLoad phase, whether a postback is occurring or not.

this.topicOfTypeFacetSelector.GetFso(this.fso.ProvideFso());

The code-behind line registers the selector with the FSO. If you are deploying the controls in a Web Part environment, this stage is not necessary and you should use the Web Part connection API to do the registration.