Obtain CSS files for Portal Theme in Portal Component
I need to integrate the CSS stylesheets of the portal theme in my Portal Component as I want to reuse the style classes in my JSPs. Does anybody know how I can obtain the links to the CSS files?
Thanks and best regards,
Kumar Prashant replied
You can get a handle of the current theme and associated API by this
ILAFService iLAFService = (ILAFService)PortalRuntime.getRuntimeResources().getService("com.sap.portal.themes.lafservice.laf");
String themeRoot = iLAFService.getThemeRootURLPath(request, ILAFService.PORTAL_THEME);
String currentTheme = iLAFService.getCurrentTheme(request).getThemeName();
ILAFService has got some methods through which you can access current theme objets.