on 06-02-2008 2:34 PM
Hi Experts,
i have a Abstract Portal Component that validates userID & password . i call the Navigation service inside it
...
..some code for user validation/logging here
INavigationService navSrv = (INavigationService)PortalRuntime.getRuntimeResources().getService(INavigationService.KEY );
Hashtable environment = new Hashtable();
IUserContext userContext = request.getUser();
if(userContext!=null)
{
environment.put( INavigationConstants.ENV_PRINCIPAL, userContext );
}
INavigationNode node = navSrv.getFirstNode(environment);
now i wish to navigate to a PAGE at pcd location ROLES://pcd:portal_content/my.org/myorg.ab.eview1
how can i do it ??
Hi,
You have two options, either use EPCM object which has method to navigate:
http://help.sap.com/saphelp_nw70/helpdata/EN/26/71c74030308431e10000000a1550b0/frameset.htm
The second option is to build URL with NavigationTarget parameter:
http://help.sap.com/saphelp_nw70/helpdata/EN/43/014421d21d6fade10000000a11466f/frameset.htm
http://help.sap.com/saphelp_nw70/helpdata/EN/43/0029d0e7371aa2e10000000a422035/frameset.htm
Check this:
http://help.sap.com/saphelp_nw70/helpdata/EN/18/3fb84033a8b533e10000000a155106/frameset.htm
Regards,
Praveen Gudapati
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try this code:
INavigationGenerator navService = (INavigationGenerator) PortalRuntime.getRuntimeResources().getService(INavigationService.KEY);
//navigationNode = The node to which you want to navigate, here you can use navigationNode.getName() or navigationNode.getHashedName() depending on your need.
request.redirect(navService.getPortalURL( request,navigationNode.getName()));
If request.redirect does not work then try response.sendRedirect method.
https://forums.sdn.sap.com/thread.jspa?threadID=870433
Regards,
Praveen Gudapati
Hi Praveen,
getPortalURL is not method of INavigationService & gives me a compile time error.
INavigationNode node = navSrv.getFirstNode(environment);
node.getName();
node.getName gives me the default PCD path to default startup page...however navigation is still not working....
Kind Regards
Prashant
Hi,
If your node is getting pcd path to default startup page, then the node object corresponds to default startup page.
If you want to navigate to some other page then give appropriate node there.
The trick here is to build a proper navigation URL like:
http://myServer:50000/irj/portal?
NavigationTarget=ROLES://portal_content/myFolder/myRole
http://help.sap.com/saphelp_nw70/helpdata/EN/43/014421d21d6fade10000000a11466f/frameset.htm
Once the URL is ready, use request.redirect or response.sendRedirect to redirect to that node.
Regards,
Praveen Gudapati
User | Count |
---|---|
77 | |
9 | |
9 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.