on 09-08-2004 2:16 PM
Hi everyone,
I am trying to put on a Button a jpeg.
This is the code :
Button bt1 = new Button("bt1");
bt1.setEncode(false);
bt1.setText("<img src=\"Winter.jpg\">");
The Winter.jpeg is located in the \dist\images folder.
When I run the iView, the image is not found.
Does anyone know how to deal with this.
Thank you.
Hi David,
try this:
bt1.setText("<img src=""+componentRequest.getWebResourcePath() + "/images/Winter.jpg">");
Kind regards
Francisco
Message was edited by: Francisco Villar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just a quick guess, but would
bt1.setText("<img src="images/Winter.jpg">");
work ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have an image placed under my images folder of the portal component. In the code I access the image by setting the SRC attribute of the Image UI to componentRequest.getWebResourcePath()+ "/images/image.jpg". But the image doesn't seem to come up.
When I see the URL of the image that gets generated, it's actually file:///C:/usr/sap/EP62/j2ee/j2ee_10/cluster/server/services/servlet_jsp/work/jspTemp/irj/root/portalapps/<Portal app name>/images/image.jpg.
When it shud have been a HTTP web URL. Any idea how this can be corrected?
Thanks
Shakeel
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.