cancel
Showing results for 
Search instead for 
Did you mean: 

displaying image in webdynpros

Former Member
0 Kudos

Hi

Im new to webdynpros. I went through the tuorial but unfortunately I do not understand the context part of it.

I created a component and all i want to do is add an image. I insert child : Image. In the Element properties of the Image, in source..how do i add the image here?

Any help is much appreciated

Thanx

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Image.source contains the URL of the image. Either set it fixed in the view designer or create a context attribute of type "string", put the value therein and bind the Image.source property to this attribute.

If you want the image file to be part of the Web Dynpro component, import it into folder src/mimes/Components/<your component>. Then you can simply use the image file name as the URL.

Armin

Answers (5)

Answers (5)

Former Member
0 Kudos

Just got it going, It did not want to work, since i just put in "image" in the source property, but when i added the extension "image.jpg" it works..

Thanx ALL

Former Member
0 Kudos

HI,

That's what I mentioned earlier!

Regards,

RK

Former Member
0 Kudos

Hello,

I am facing a similar problem. The images I am using is for displaying Warning or Success Icon. I can do the same thing with IWDMessageManager but the problem is that I want these messages on a popup window but with Message Manager the message gets displayedon parent screen. So I have kept a image control and displayed the icons with some text. Now the problem once again is that it works fine on a local J2EE but it does not work on our Test server which is Installed in D drive. For a local J2EE putting it in mimes/Components is ok. But there is no similar path in the other system.

How can I solve this. Is there any way to show the message on popup window using Message manager.

Please reply asap.

Regards,

Parminder

Former Member
0 Kudos

Hi,

First go to Window->Show View->Navigator in the netweaver developer Studio. Then paste the required image in the components folder. In the navigator view you will get the options like cut copy and paste.

Jaydeep

Former Member
0 Kudos

hi

add the image you want to add in the folder project/src/mimes/components/<component>/imagename.Then add standard-image UI element into your view. now go to the properties of this UI element and in the source property give the image name. you'll get th image on to your view.

hope this will work.

Former Member
0 Kudos

Hi Namira

Hi You have to place your Image in the following folder of your project/src/mimes/components/<component>/imagename

donot forget to put your image name correctly,don't include extension jpeg letus say if ur putting clouds.jpeg, just give name as clouds and copy on to the folder structure, while giving name to your dynpro image source name give clouds.jpg it will work..

hope this helps you

Regards,

RK

Former Member
0 Kudos

hi

thank you all for your replies!!

I am trying to copy the image to the project/src/mimes/components/<component>/

structure, but it does not allow me to paste it. If I right click on the <component>, it only gives me an option to delete. How would i copy it to the structure?

what i have done is then added the image in the windows explorer to where my project is stored and just copied it to the C:/project/src/mimes/components/<component> folder instead of copying it in the sap dev studio.

I have closed dev studio and reopen, but the image does not appear in project/src/mimes/components/<component>

pls help..

Message was edited by: Namira

Former Member
0 Kudos

Hi Namira,

The "source" should be the path of the image and the "alt" should be the tooltip text

1. You can copy the image files to the following directory "C:\usr\sap\J2E\JC00\j2ee\cluster\server0\temp\webdynpro\web\sap.com\tcwddispwda\global\sapIcons" and you can mention the source as "~sapicons/<<img file name>>"

2. Or you can create a folder in your server hard drive and maintain all your images in that folder. Create a HTTP alias and point the image to that folder. You can use the "http://servername:port/<<alias name>>/<<image file name>>"

For creating HTTP alias refer the following, refer the forum thread

https://www.sdn.sap.com/sdn/collaboration.sdn?node=linkFnode6-1&contenttype=url&content=https://

You can use the approach mentioned by Armin, but if you would like to use the images across all your applications, then you can follow the steps what I mentioned, so that the images will be maintained at one location.

If you require some clarification do let me know.

Regards,

Santhosh.C

Message was edited by: Santhosh Chandran