on 08-29-2008 10:16 PM
Hi all,
i want to pass a parameter to my wd app. when its start. How can i do it? where do i have to do it?
Thanx in advance
CP
Hi
My question is
After running the application you need to pass the URL Parameters to the same application which is currently running application.
Get the URL of the current application /some other application
For current application
WDURLGenerator.getApplicationURL(wdThis.wdGetAPI().getDeployableObjectPart())
=============
Then in the action of the View the event handler append the parameters and use window api to open a new window by passing the latest URL
Hope this will solve your answer.
Regards
Kalyan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can define parameter using two methods:
1. Via properties of the iview you have created, system will pass these parameters automatically to the iview.
2. Via Code, you can use Portal Navigation and pass parameters at runtime. Check following sample code:
WDPortalNavigation.navigateAbsolute(
"ROLES://portal_content/myIview/LoadEmployees",
WDPortalNavigationMode.SHOW_INPLACE,
(String) null,
(String) null,
WDPortalNavigationHistoryMode.NO_DUPLICATIONS,
(String) null,
(String) null,
"action=E");
The last parameter is for passing parameters, in the example parameter name: action and its value: E.
Regards,
Jawed Ali
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all,
Thank you all for your quick responses, but my WD app is a standalone application, so i dont create an iview in my portal to run it.
Jawed, if i dont have my app. running within the portal, is this posted code works too? if not, how can i pass to it parameters when its start?
Any idea?
KR,
CP
Hi,
If your application is standalone you need to append the parameters as follows
Ex:http://localhost:50000/webdynpro/dispatcher/demo.sap.com/firstapp/FirstApp?User=Abc&Desc=Abc
In the above example User and desc are passed to the application as parameter with value Abc.
From the application you can access this values using the following api
String userValue = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("User");
String descValue = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("Desc");
Regards
Ayyapparaj
Hi CP,
You can pass a parameter to WD application like this.
In the portal, open Content Administration, navigate to iView created for your WD application.
in iView properties, Parameters property in that enter paratemters like this
name = "value"&name ="value"
2. Select your application->right click & select Edit option -> Open Application Properties Tab
Select New . Select Self defiend radio button -> Click on Browse
Enter Name , value
Click Finish button
You can repeat this , if you want to add more parameters
Regards,
Siva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Claudia,
You will pass the application parameters via the portal iVIew properties.
From the portal when you create a SAP Web Dynpro iView , there is a property called Application paramers. Enter the parameter values you would like to pass to the Web Dynpro application.
These parameter values can access from the Webdynpro application init method using this line:
String value =WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("ParamValue");
if your requirement is some thing different please let us know.
Thanks
Krishna
Edited by: D Krishna Reddy on Aug 30, 2008 2:21 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
That depends on how you are starting your application. If it's from an iview then you need to set it up in the iview properties.
Regards,
Satyajit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.