cancel
Showing results for 
Search instead for 
Did you mean: 

NW2004s: Assigning a custom theme to a web dynpro running in the portal

Former Member
0 Kudos

The situation is as follows:

Some web-dynpros (for java) have a custom theme, a theme which is <b>not</b> the default theme of the portal or the default theme for web-dynpros in general.

In NW2004 this worked as follows:

When starting a web-dynpro in the portal it checked if it was started with the right theme. If <b>not</b> the exit plug of the WD interface view was called with an Url of the WD application plus a parameter for the right theme.

This is the famous parameter sap-cssurl.

For that parameter there are some values possible:

1) sap-cssurl=http://<host>:<port>/irj/portalapps/com.sap.portal.design.urdesigndata/themes/portal/mytheme

2) sap-cssurl=http://<host>:<port>/irj/portalapps/com.sap.portal.design.portaldesigndata/themes/portal/mytheme

3) sap-cssurl=http://<portal>:<host>/webdynpro/resources/sap.com/tcwddispwda/global/SSR/themes/mytheme

The first 2 are locations of the portal environment, the last one is a location of the WD runtime environment.

As I noticed this must be a full qualified absolute Url including host and port.

This works in NW2004 for web dynpro's running standalone <b>AND</b> in the portal.

Now for NW2004s:

The 3 variants of the parameter sap-cssurl work for web dynpro's running standalone.

But now for web dynpro's which are integrated in the portal:

The exit-plug with an Url is not possible anymore, this leads to the runtime error:

<i>com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Exit-Plug must no be triggered with an URL when running in portal. Use portal navigation instead to navigate to another application!</i>

Okay, as a first workaround I tried the portal navigation,

but somehow the supplied parameter sap-cssurl has no effect.

The code for that in the on-startup plug of the WD component:

WDPortalNavigation.navigateAbsolute(
  PCD_ID,
  WDPortalNavigationMode.SHOW_INPLACE,
  null,
  null,
  WDPortalNavigationHistoryMode.NO_HISTORY,
  null,
  null,
  "theme_set=X&" + theme,
   theme,
   false,
   true
);

I used there absolute portal navigation and the parameter (sap-cssurl=...) is part of the <b>launcher parameter</b> and the <b>business parameter</b> in the call to <b>WDPortalNavigation.navigateAbsolute</b>.

But as I wrote above, this has no effect on the theme.

In the I-View the parameter "Supply portal theme" is set to <b>NO</b>, otherwise the parameter "sap-cssurl" is supplied twice (this can be seen in the poroperties of the web-page in Internet Explorer).

What I tried afterwards was setting the parameter sap-cssurl hardcoded in the "Application parameters" of the I-View. This doesn't work either.

My question is: Should this be anyway possible for a NW2004s portal?

Did anyone successfully implement this?

Kind regards,

Erich Lind

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Erich,

I am facing the same problem. I am on 04 s and couldnot implement the custom theme to a web dynpro running in the portal. When I run the web dynpro app as stand alone, the custom theme applies fine. But when in portal, it takes the standard theme.

Was wondering if you figured this out.

Thanks