cancel
Showing results for 
Search instead for 
Did you mean: 

Portal navigation search suggestions : Server side API

Amey-Mogare
Contributor
0 Kudos

Hello,

I have a requirement where I need to create a web service which takes a querystring as input and returns matching portal navigation suggestions as output.

I am looking for a server side API that I can use within my stateless session bean which will do this job.

Any ideas/code samples/API links will be of great help.

Thanks & Regards,

Amey

Accepted Solutions (1)

Accepted Solutions (1)

former_member193577
Active Contributor
0 Kudos

Hi,

It would be ofcourse much easier with client side ,as there is the LSAPI just for that.

In server side, you can write a component that uses the INavigationService , and from there getInitialNodes method that gets all the logged in user's roles. (and then inspect the children , etc..)

Best Regards,

Tal

Amey-Mogare
Contributor
0 Kudos

Thanks a lot Tal for prompt & useful reply.

The method getInitialNodes returns all roles for a user in form of an arraylist of NavigationNodes .

And then I need to search within this list for matching navigation node titles?

If possible, could you please also share links to any blog/documentation available for demonstration of how to use this INavigationService ?

Thanks & Regards,

Amey

former_member193577
Active Contributor
0 Kudos

Hi,

I've found an example here -

It iterates the NavigationNodes and fetch its details.

Br,

Tal

Amey-Mogare
Contributor
0 Kudos

Hello Tal,

Thanks for reply. Two queries: -

1. I checked the blog and implementation of method getrootnodes is not mentioned in it

2. I also found below link but it has code only to get current user's initial (top-level) navigation nodes: -

mySiteMap.java - Portal - SAP Library

Any further ideas?

Thanks & Regards,

Amey

former_member193577
Active Contributor
0 Kudos

Hi,

You can check also javadocs of INavigationService -

http://help.sap.com/javadocs/NW73/SPS01/EP/com/sapportals/portal/navigation/INavigationService.html

see the getInitialNodes methods

And in the INavigationNode for each node, you can fetch the children:

http://help.sap.com/javadocs/NW73/SPS01/EP/com/sapportals/portal/navigation/INavigationNode.html

Best Regards,

Tal

Answers (0)