on 11-01-2005 1:57 PM
Hello again with a new question ...
I wrote a Web Dynpro Application, that uploads images from the client and stores them in a directory on the server. In the next step the WD Application reads the contents of that directory (for Example 1.jpg, 2.jpg, 3.jpg) and shall display these pics (dynamically).
The only thing that does not work is displaying the images. I do not know how to address them; i simply can not see them.
My application is running on a windows host in path "E:\usr\sap..."
The Pics are uploaded into the server directory "E:\ZZZ\"
<b>Following code shows the pics</b>, when i use a browser on the server itself. When i try it from another machine, is doesn't work. Seems as if the supplied path is a local path, not a server path.
IWDImage image11 = (IWDImage) view.createElement(IWDImage.class, "TestBild" + i);
image11.setAlt("file:///" + files<i>.toString());
image11.setSource("file:///" + files<i>.toString());
// files<i>.toString() contains: \E:ZZZ1.jpg
theGroup.addChild(image11);
<b>Thank you !!</b>
Two remarks:
1. For creating URLs on the server, use the WDURLGenerator class.
2. For creating UI elements with an anonymous ID, simply use view.createElement(<UI element API>, null).
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Armin, thank you, just solved the problem
I found a post telling something about HTTP aliases and this weblog
/people/renjith.andrews/blog/2005/03/31/creating-an-http-alias-in-was
So i created an alias (ZZZ for Hard drive directory "E:\ZZZ") and use it in the code for example:
image11.setAlt("http://netweaver:50000/ZZZ/0000009502_0002000197_2_002.jpg");
image11.setSource("http://netweaver:50000/ZZZ/0000009502_0002000197_2_002.jpg");
Now i see the images within my WDView
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.