on 2007 Jul 02 8:18 AM
See above
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Ideally if you have your NWDS installed, no need to import any java package.
try to check if the above code works fine for you..else you will have to do import jar
called "WDProtocolAdapter" and re-check.
Hope that helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
add the following jar file to the classpath of your NWDS project:
/usr/sap/<J2E>/<JC01>/j2ee/cluster/server0/bin/services/webdynpro/webdynprolib/_webdynpro_services.jar
Just a hint. Next time you are missing a class use a tool (WinRar, JarFinder, etc.) to find out in which jar file your missing class is stored in.
Hope that helps..reward points if it so.
Thanks again. I found the JAR file and now I have the following:
package z.mycompany;
import com.sap.tc.webdynpro.services.sal.adapter.api.WDWebContextAdapter;
import com.sapportals.portal.prt.component.*;
public class LogonRedirect extends AbstractPortalComponent
{
public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
{
String URLParams = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("name");
response.write("Resulting URL name parameter: "+URLParams);
}
}
I packed it as a PAR file and uploaded it but when I make an iView out of this it fails (get the red error text that something went wrong). It works when I only write a small text, it doesn't when I try this, any idea?
I'll reward points, once I have some result.
Praveen kumar Kadi, thanks for your help. It doesn't work the way you descibed but never the less you pointed me in the right direction!
This seems to work better (for futher reference):
package z.mycompany;
import com.sapportals.portal.prt.component.*;
public class LogonRedirect extends AbstractPortalComponent
{
public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
{
String param = request.getParameter("someparam");
response.write("Resulting URL name parameter: "+param);
}
}
And then make sure both the page and iView are set to embedded isolation method.
Hi
To get parameter value, I think you can use following line
String URLParams = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("name");
In addition you can also look at
Set parameters to URL and get the parameter value.
to set parameters:
String deployableObject = wdComponentAPI.getDeployableObjectPart().getDeployableObjectName();
WDDeployableObjectPart dpObj = WDDeployableObject.getDeployableObjectPart(deployableObject,"deployableObjectPart",WDDeployableObjectPartType.APPLICATION);
Map parameters = new HashMap();
parameters.put("name","Mack");
parameters.put("age","23");
String url = WDURLGenerator.getApplicationURL(dpObj,parameters);
================
You can also refer another way of doing.
Yet another way of.....
Hope that helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
67 | |
8 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.