on 08-30-2006 7:37 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.