cancel
Showing results for 
Search instead for 
Did you mean: 

File or Image URL

Former Member
0 Kudos

How can we get the URL of a image stored in a portal folder? I cannot store the image in the mimes folder of my dynpro application because the number of images will be large and the image required is not known at run time.

Accepted Solutions (1)

Accepted Solutions (1)

BeGanz
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Deepak,

in NW04 and NW04s there is no service available to retrieve these URLs for "portal"-images.

1) I see no problem in deploying such images within a Web Dynpro project even in case of a large number.

2) You can use the Web Dynpro Binary Cache service to store dynamic mime objects at runtime. The service also calculates the required URLs you can use for databinding. See Tutotorial on Excel Export and Binary Cache https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/1208c2cd-0401-0010-4ab6-f4736074acc6

Regards, Bertram

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Bertram,

Actually I too have no problem in putting a large number of images in the project folder.

Here I have no option, I am being told that all images will be on the KM system in the portal and I have to retrieve them from there. Now the problem is how can I confirm that an image exists or a URl that I am passing to my image element on the Dynpro actually contains a resource.

I have been through the Excel tutorial and thought that referred to context data being trasferred to an excel sheet and how can I use the central method there where the the data is being converted to binary format?

Here the problem is just confirmation of an image existence on an URL. I suppose in Swing we could have done it by setting up an Imageobserver object or Mediatracker but how to do this in Java dynpros.

Former Member
0 Kudos

Hi Deepak,

You can show an Image from the folder using the File Download UI Element.

Create a Value Attribute named url type String in context and Bind it to the File Download UI Element's property data and to imageSource.

Bind the url at runtime by

wdContext.currentContextElement().setUrl("path of the Folder");

Note:

1.The Photo url should be in WAS(You can create alias name for the local folder).

Kind Regards,

Mukesh.