on 04-10-2006 3:17 PM
Hello WebDyn Pro's.
I am thinking that I will create a single Web Dynpro application that serves 6-10 single web pages (views). These 6-10 pages are all very independent from each other. In essence, my application has 6-10 "start pages". I am planning on using this web dynpro to provide all the static HTML content across my portal.
Is it possible to pass a URL parameter to the application such that it knows which exact start page to display (eg; view=startpage1)?
Could you give me a little guidance on how to build a WebDynpro application for this requirement?
Thanks,
Kevin
Hello Kevin,
To achive this you could create one "start page", that just checks for you url parameter and fires a plug to the correct one.
See this tutorial for more information about URL parameters.
http://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/inter-applica... in web dynpro.pdf
Or you could simply create one application for each start view, and start the right application from the portal.
Regards Mattias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
It's great that it worked. Just one note on applications.
A WebDynpro Application is no more than a mapping between an URL and a inbound plug to a view. This means that each WebDynpro Project can have multiple applications which all points to different (or even the same) views within all the components contained in that project.
I find the name "application" a bit confusing, I think of it more as "URL Mapping", kind of like a servlet-mapping in a Java WebApp.
Regards
Mattias
Hi Mehnaaz,
I found this post very helpful in describing how to pass parameters into a Webdynpro application. You may be helped from it too.
You may also be helped by seeing my code in the upfront page that directs traffic. It is listed below. Afer entering the sample code, perform a "Source=>Organize imports"
in order to bring in the class "WDWebContextAdapter".
public void wdDoInit()
{
//@@begin wdDoInit()
//Read Parameter RequestedView
String requestedView =
WDWebContextAdapter.getWebContextAdapter().getRequestParameter("RequestedView");
// Based on RequestedView parameter, display target page.
if (requestedView == null) {
wdThis.wdFirePlugToHome();
} else {
if (requestedView.equalsIgnoreCase("Home")) {
wdThis.wdFirePlugToHome();
} else if (requestedView.equalsIgnoreCase("Logoff")) {
wdThis.wdFirePlugToLogoff();
} else {
wdThis.wdFirePlugToHome();
}
}
//@@end
}
Hi,
I'm trying to do something like this, things worked fine when I test the application outside the portal. But when I put this inside portal using "portal_content/templates/iviews/sap_webdynpro_iview" iview type, I'm unable to reach the URL Parameters.
I've seen very topics about this, and I already tried the 2 ways that are sugested: use the getRequestParameter(your solution), or get that from the interface view in the default plug. Any of them work outside the portal, but in portal doesn't work.
Inside portal, this didn't get the URL parameter but what is in iview property "Application Parameters". I try to put my desired parameter in this property and he get it. But I want this parameter to be dynamic, so I have to get this from URL.
I'm out of ideas.
Anyone know's how to solve this issue?
Thanks
Message was edited by: Pedro Santos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Kevin,
It is possible to dynamically create a URL in a webDynpro application. Also, we can pass any number of parameters across componenets/views in WebDynpro.
As a result of this, either the entire url can be passed as a string parameter, or just the page name, and a URL can be dynamically built in the code.
Look at the java.net package for the details on constructing URL dynamically.
http://java.sun.com/j2se/1.4.2/docs/api/index.html
Data is transferred within a WebDynpro application with Context Mapping.
http://help.sap.com/saphelp_nw04/helpdata/en/44/a2384162316532e10000000a1550b0/frameset.htm
Sumit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.