cancel
Showing results for 
Search instead for 
Did you mean: 

Pass parameters from JSP Dyn Page to WDJ Application

Former Member
0 Kudos

Hi,

I am trying to pass parameters from my JSPDyn Page to WDJ Application.

I am using NWDS 7.1 EHP1

My code is :

function to_WEBDYNHK()

{

EPCM.relaxDocumentDomain();

EPCM.doNavigate

('ROLES://pcd:portal_content/Himanshu.Himanshu/TestDynUIApp?DynamicParameter="hkparam%3Dqwertyuio"');

}

This method is being called on click of a button.

hkparam is the parameter in question.

The JSPDyn page is an iView and the WDJ application is a page and both have been assigned to a role.

In the properties of the WDJ Page, I have removed DymanicParameter from "Do not Forward These Parameters To Web Dynpro" property.

However I am getting null as the value of hkparam in my WDJ application.

The code used is :

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

String param1= request.getParameter("hkparam");

What seems to be missing here.

Please help.

I went through the documentation on SDN but it does not seem to help.

TIA,

Himanshu

Accepted Solutions (1)

Accepted Solutions (1)

Qualiture
Active Contributor
0 Kudos

Hi Himanshu,

You must encode the double-quotes in your DynamicParameter value as well, IIRC

Cheers,

Robin

Former Member
0 Kudos

Hi Robin,

Thanks for the response.

My code now looks like :

EPCM.doNavigate

('ROLES://pcd:portal_content/Himanshu.Himanshu/TestDynUIApp?DynamicParameter=%22hkparam%3Dmypass1123%22');

However this does not help either. The result is still the same.

Thanks and Regards,

Himanshu

Qualiture
Active Contributor
0 Kudos

Hi,

Thinking of it, could you omit the double-quotes at all? So just use the URL-encoded key-value pairs

EPCM.doNavigate

('ROLES://pcd:portal_content/Himanshu.Himanshu/TestDynUIApp?DynamicParameter=hkparam%3Dmypass1123');

Former Member
0 Kudos

Thanks Robin.....this solves it.

Regards,

Himanshu

Former Member
0 Kudos

Hi Himanshu,

Try this code.

EPCM.doNavigate("ROLES:portal_content/Himanshu.Himanshu/TestDynUIApp?hkparam=Dmypass1123")

if the parameter is hkparam and the value to be passed is Dmypass1123. You need not change any design time property of the WD page, and WDProtocolAdapter should retrive the parameter.

Regards,

Vishweshwara P.K.M.

Answers (0)