cancel
Showing results for 
Search instead for 
Did you mean: 

Passing parameter through url

Former Member
0 Kudos

Hi all,

How can I pass a query string between two views (not b/w two application) in an application.If anybody knows,please help me.

Fahad Hamsa

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

HI tripathi,

I will explain the requirement once again.

When the details are submitted to database,one unique no is generated(say ID) and a mail is sent to the person, who submitted the details, with a link in which this ID is a query string.

1)When he clicks on that link, this ID needs to be checked against db and as per that ,the details are to be displayed.

2)If he logs in through EP,there will not be any query string, so he will start from a fresh page.

For both 1) and 2) I am using the same view and as per the query string , I am displaying the values.

ie. If query string is present,I will display values from db.If it is null, I will display a fresh page

Hopes you will get my requirement.

Thanks

Fahad Hamsa

Former Member
0 Kudos

Hi

You can bind the ID value in the Context Attribute and get it in another view

Kind Regards

Mukesh

Former Member
0 Kudos

Hi Fahad Hamsa,

You need to do two things.

1) In your application, check whether the application is running in portal. You can check this using 'WDPortalUtils.IsRunninginPortal()'

2) If your application is running in Portal then you dont need to do anything. If its not running in portal, get the URL Parameters using the code

String iD = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("iD");

I assume your URL will have the 'iD' parameter with some value.

Hope this helps.

Regards,

Shubham

Former Member
0 Kudos

Hi Fahad,

In webdynpro you DO NOT have URL for a view.

Its for an application.

You have to use Context Mapping to pass parameters from one view to another.

Regards,

Shubham

Former Member
0 Kudos

Hi Tripathi,

Thanks for the quick reply.I will tell you my scenario clearly.

In my application,from the first view onwards,I have to check one query string from the url and as per that the elements of webdynpro needs to be displayed.I am trying to use this query string because ,I have to send a mail with a link that contains a query string with unique value so that when he clicks on the link,the value of query string will be checked first.

Without using this url parameters, how can I implement this

Thanks in advance

Fahad Hasma

Former Member
0 Kudos

Hi Fahad,

I am still not clear on what you want.

Please explain with some examples.

Regards,

Shubham

Former Member
0 Kudos

if you have the following url:

http://<server>:<port>/Application?forumID=52

You can read the parameter in you view like this:

public void wdDoInit() {

String forumID = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("forumID");

}

I hope this is helpfull for you