on 01-08-2009 11:33 AM
Hi,
Is there is any posibility to bind context elements in webdynpro to HTML page.
regards,
kishore.
Hi,
You can use the following piece of code to open an HTML page. You can trigger an event on the click of a button :
String urlToDelivery = // URL such as "http://www.google.co.in" ;
if( urlToDelivery != null)
{
if( urlToDelivery.startsWith("http://"))
{
String winTitle = "<Title_for_HTML_page>" ;
IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(urlToDelivery , winTitle );
window.open();
}
else
{
wdComponentAPI.getMessageManager().reportWarning("Invalid URL: Cannot open Internet Explorer");
}
}
else
{
wdComponentAPI.getMessageManager().reportWarning("Invalid URL: Cannot open Internet Explorer");
}
This will work. Let me know if you need any more help.
Regards,
Divyata
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Divyata,
i have worked on code sent by you. I am able to open html page in new window. but i am able to open only some standard urls. My requirement is like I have a customized html page and i want to bind the WD context elements to that HTML page, is it possible or do we have any other solution.
thanks,
kishore.
Hi,
Do one thing...
create String variable say
String htmlcontent=null;
htmlcontent="your html code";
//for example
htmlcontent="<html><table><tr><td>" + wdContextelement + "</html>";
Now, to open this,
try
{
byte[] html=new byte [ 4096 ] ;
html=strHTMLCont.getBytes("UTF-8");
IWDWindow win =wdThis.wdGetAPI().getComponent().getWindowManager()
.createNonModalExternalWindow(WDWebResource.getWebResource(html, WDWebResourceType.HTML).getURL(),"Certificate");
win.show();
}
catch(WDURLException url)
{
wdComponentAPI.getMessageManager().reportException("WDURLException::"+url.toString(),true);
}
catch(UnsupportedEncodingException e)
{
wdComponentAPI.getMessageManager().reportException("UnsupportedEncodingException"+e.toString(),true);
}
catch(Exception e)
{
wdComponentAPI.getMessageManager().reportException("Exception in creating Form"+e.toString(),true);
}
Regards,
Srinivas
Edited by: srinivas sistu on Jan 20, 2009 4:05 PM
Hi,
You can create 'LinkToURL' UI Elements in the view of your Web Dynpro application.
Kind Regards,
Nitin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
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.