on 10-15-2008 12:17 PM
Hi! All
Question 1st:
I have create a html page by webdynpro,
I want display this page in a view ,
but when run this code,
the IE page popup ,
can you help me set the IE page in current view ?
public void wdDoInit()
{
//@@begin wdDoInit()
String text = "<html><head></head><body>this is my test</body><html>";
try
{
IWDCachedWebResource resource = WDWebResource.getWebResource
(
text.getBytes("UTF-8"), WDWebResourceType.UNKNOWN
);
resource.setResourceName("test.html");
IWDWindow window =
wdComponentAPI.getWindowManage().createNonModalExternalWindow(
resource.getUrl(WDFileDownloadBehaviour.OPEN_INPLACE.ordinal()),
resource.getResourceName());
window.show();
}
catch(Exception ex)
{
wdComponentAPI.getMessageManager().reportException( new WDNonFatalException(ex), false );
}
}
Question 2nd:
I have create a value context attribute under context.
it's name is "mywindow"
it's type is "com.sap.tc.webdynpro.services.session.api.IWDWindow"
Do you know how to display "mywindow" in a view ?
I try to put mywindow in a InputField or a IFrame,
but all failed !
Thanks!
Hi,
Please add IFrame and pass the url of the html page to that Iframe UI element
This will solve your problem
Regards
Ponnusamy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
This is the code to open up a window
IWDWindow win = wdComponentAPI.getWindowManager().createModalWindow(wdThis.wdGetAPI().getComponentInfo().findInWindows(<window_name>));
wdContext.currentContextElement().set<window_context>(win);
win.setWindowPosition(WDWindowPos.CENTER);
win.setWindowSize(250,150);
win.setTitle("New Window");
win.show();
This will open up as a pop-up. If you want to open a html page on the same window then put an iframe in your view and set its source property correspondingly.
Regards,
Murtuza
HI! Murtuza,
when I use your code,
1. getComponentInfo() have a redline under it, the message is
"The method getComponentInfo is undefined for thee type IWDviewController"
I can't solve by use click mouse right to improt.
2. when I put an iframe in my view and set its source as my comtext "mywindow",
"mywindow " type is
"com.sap.tc.webdynpro.services.session.api.IWDWindow",
I want select "mywindow" as source , but "mywindow" is no activate, can't select,
Thanks!
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.