cancel
Showing results for 
Search instead for 
Did you mean: 

read parameters from URL

Former Member
0 Kudos

Hi friends

I have a link with parameters such as:

http://xxx:50000/irj.......?A=Tom&B=Raul

and when the user clicks on the link called the Init webdynpro

but the problem is how do I read the parameters A and B???

Namely, that syntax to use?

Regards

Banana

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

I have created an iView for webdynpro and the link is in this format:

http://xxx:port/irj/portal?NavigationTarget=ROLES://<PCD Location from role>&A=Tom&B=Raul

the problem is in the Init I put these 2 syntax:

String Param = WDProtocolAdapter.getProtocolAdapter ().getRequestObject ().getParameter ( "A");

String param1 = WDWebContextAdapter.getWebContextAdapter().getRequestParameter ( "A");

wdThis.wdGetAPI ().getComponent ().getMessageManager ().reportSuccess (Param);

wdThis.wdGetAPI ().getComponent ().getMessageManager ().reportSuccess (param1);

and I'm not seeing anything ....

Why???

Banana

Former Member
0 Kudos

You need to pass the parameters to the application and not to the view.

Did you create a WD iView or URL iView?

If it's a URL iView, delete it and create a WD iView.

In the WD iView there is a property to pass parameteres (application parameters) - in there you write "A=Tom&B=Raul"

Former Member
0 Kudos

I have a link like this:

http://xxx:port/irj/portal?NavigationTarget=ROLES://<PCD Location from role>&A=Tom&B=Raul

When I click the iView calls me that within the application's WD.

and inside the application WD Init course there are the following syntax:

String Param = WDProtocolAdapter.getProtocolAdapter ().getRequestObject ().getParameter ( "A");

String param1 = WDWebContextAdapter.getWebContextAdapter().getRequestParameter ( "A");

wdThis.wdGetAPI ().getComponent ().getMessageManager ().reportSuccess (Param);

wdThis.wdGetAPI ().getComponent ().getMessageManager ().reportSuccess (param1);

the link works ... but the problem is that it shows the parameters of the URL of course the values of A and B

Something wrong???

Regards

Banana

Former Member
0 Kudos

Hi Banana,

The one sent by Michael is right.

Use can also use:

String para = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("Param");

Similarly, use can get Parameter Names, Maps and Values under getRequestObject.

Regards,

Tushar Sinha

Former Member
0 Kudos

Hello,

Try this:

String param1 = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("A");

String param2 = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("B");

Regards,

Jan