on 05-18-2007 10:12 AM
Hi all,
I want diplay a XML file inside a view in webdynpro. I need the particular file to be displayed in XML format.Can anybody help.
Thank you,
Philip Thayil
Hi,
Check this code.
String stFile = new String(wdContext.currentContextElement().getVa_File());
try {
IWDCachedWebResource resource = WDWebResource.getWebResource(stFile.getBytes(), WDWebResourceType.XML);
IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(resource.getAbsoluteURL(),"MyDoc");
window.removeWindowFeature(WDWindowFeature.TOOL_BAR);
window.removeWindowFeature(WDWindowFeature.ADDRESS_BAR);
window.removeWindowFeature(WDWindowFeature.STATUS_BAR);
window.open();
}catch(WDURLException ex){
wdComponentAPI.getMessageManager().reportException("Exception caused: " + ex, true);
}
Regards,
Vijai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check this code.
String stFile ="";
try {
BufferedReader in = new BufferedReader(new FileReader("D:\Sample.xml"));
stFile = in.readLine();
in.close();
} catch (IOException e) {
e.printStackTrace();
}
Use this stFile in the code above.
Remove this line.
String stFile = new String(wdContext.currentContextElement().getVa_File());
Regards,
Vijai
Hi,
In the same class, this method is also available.
public static IWDCachedWebResource getWebResource(byte[] webResource, WDWebResourceType resourceType) ;
By default, it would have taken that line. Delete the whole line. Type it and make sure, u select this method. It works for me.
Regards,
Vijai
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.