cancel
Showing results for 
Search instead for 
Did you mean: 

get current iView name

Former Member
0 Kudos

Hi All,

I want to get the current iView name in the web dynpro application. If possible, can any one provide the code snippet?

Srinivasan T

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi!

In WD you can access the request with WDWebContextAdapter

but I think you can only access URL parameters with:

String name = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("parameter");

so I think you will have to pass the parameter like Satyajit suggested before

regards

Former Member
0 Kudos

hi!

there has to be something like

IPortalComponentRequest request

for WebDynpro, maybe this thread helps you...

regards

Former Member
0 Kudos

Hi,

Can you please tell from where can I download and include the necessary jar file in the buildpath of the project to support IPortalComponentRequest object? I am using EP 6.0 and NWDS SP 15.

Srinivasan T

Former Member
0 Kudos

Hi,

you can use IHttpRequest object instead of IPortalComponentRequest

as following :

IHttpRequest request =(IHttpRequest)WDProtocolAdapter.getProtocolAdapter().getRequestObject();

Former Member
0 Kudos

hi!

never tried this in WebDynpro but

String PCDLocation = componentRequest.getComponentContext().getContextName();

returns iView property PCD Location

regards

Former Member
0 Kudos

Hi,

I tried with the code, but could not find necesary package import for componentRequest. Any solution for the error/ problem?

Srinivasan T

Former Member
0 Kudos

Hi,

There's a workaround for this only if you have access to the portal content. If you have then open the properties of the iView in question and select the property category "Content - Web Dynpro".

You'll see a property "Application Parameters". In the inputfield next to it, enter something like "iViewName=<this iview name>".

Now when you run your webdynpro application, you can read the URL parameter iViewName.

Regards,

Satyajit.

Former Member
0 Kudos

Hi,

I really appreciate your suggestion. Can't passing iview name as application parameter during every iView creation be avoided? Is there any option in the API for fetching the current iView name? solution pls.

Srinivasan T.

Former Member
0 Kudos

Hi Srinivasan

String viewName = wdThis.wdGetAPI().getName(); should give you the current view name.

Regards,

Kushagra.

Former Member
0 Kudos

Hi,

I need to get the current portal iView name in my web dynpro application and not the view in NWDS. Any suggestion?

Srinivasan T