on 01-29-2007 1:04 PM
Hi,
is there a way to retrieve the available languages in the portal ?
I already looked at :
Interface <a href="https://media.sdn.sap.com/javadocs/NW04/SP12/prtsupp/com/sapportals/admin/wizardframework/util/ILocaleListService.html#method_summary">ILocaleListService</a> :
Locale locale = req.getUser().getLocale();
List ls = ILocaleListService.getListOfLocalesOrderedByDisplayName(locale);
1) This is unfortunately the interface. When clickining in the javadocs on 'use' it appears nowhere to be used.
2) Would using the <a href="https://help.sap.com/javadocs/NW04S/current/se/com/sap/security/api/UMFactory.html">UMFactory.getproperties()</a> be an alternative?
I would prefer to use method 1) though.
Thanks for the help,
Kevin
Hello Kevin,
Check this:
ILocaleListService localeListService =
(ILocaleListService) PortalRuntime.getRuntimeResources().getService(ILocaleListService.KEY);
Greetings,
Praveen Gudapati
p.s. Points are always welcome for helpful answers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the quick replies 🐵
I made the changes to the code, now I get an iView runtime error :
Caused by: java.lang.NoClassDefFoundError: com/sapportals/admin/wizardframework/util/ILocaleListService
at z.imec.km.proxy.navigation.language.navigationProxy.checkLocale(navigationProxy.java:101)
at z.imec.km.proxy.navigation.language.navigationProxy.doOnNodeReady(navigationProxy.java:61)
at com.sapportals.portal.prt.component.AbstractPortalComponent.handleEvent(AbstractPortalComponent.java:388)
at com.sapportals.portal.prt.pom.ComponentNode.handleEvent(ComponentNode.java:252)
at com.sapportals.portal.prt.pom.PortalNode.fireEventOnNode(PortalNode.java:369)
at com.sapportals.portal.prt.pom.AbstractNode.addChildNode(AbstractNode.java:340)
at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:642)
... 21 more
My portalapp.xml looks like this :
<property name="SharingReference" value="com.sap.km.application"/>
My project in NW2004S dev studio SP10 has the com.sap.portal.admin.wizardframework_api.jar added to build path. Seems like this one is missing when running the iView in the portal. Do I need to add some reference to the portalapp.xml or include the jar file in my project?
If you want, I can send you the devstudio project code.
Hi,
This is a portal service. Use the PortalRuntime class to instantiate it, like any portal service, as follows:
IClientNavigationGenerator service = (IClientNavigationGenerator) PortalRuntime.getRuntimeResources().getService(INavigationService.KEY);
Hope that helps.
Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.