cancel
Showing results for 
Search instead for 
Did you mean: 

How to put an image in Webdynpro

Former Member
0 Kudos

HI,

I want to piut a logo in Webdynpro view.I have put the image(logo) in proper place.But I am not able to fetch the data from that folder in to my WD view.

pLease suggest

Regards

-Sandip

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ,

You may proceed in this manner to display image.

> Store the images in the MIME Directory.

-> Declare a simple type data type in the Java Dictionary.

->Give values and description in the enumeration type.

-> Declare a value attribute of Simple type in View Controller.

-> Add a image UI Element and bind it with context whose property is changed to simple type.

Thanx.

Former Member
0 Kudos

hi!

the steps to put image in you webdynpro view is

1)copy your image in mime directory.

2)take a simple type in dictionary then give values and description in the enumeration type.

3)take a value attribute in your controller

4)Add a image UI Element and bind it with the attribute

5)then set current context element in your with the extension of .jpg

thanks

vishal

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi Sandeep

please check this code

// get the image data from somewhere

byte[] data = new byte[1024];

// Create a cached web resource using the

WDResourceFactoryIWDResource res = WDResourceFactory.createCachedResource (data, "image.gif", WDWebResourceType.GIF_IMAGE);

String url = res.getUrl(0); // 0 means "AUTO"

Also check this link

http://www.portalteam.dk/2007/11/dynamic-images-in-web-dynpro-for-java.html

You will find your answer

Regards

Ruturaj

Former Member
0 Kudos

Hi,

Your question is answered in the following thread. step by step procedure is explained.

[]

Regards

Raghu

former_member197348
Active Contributor
0 Kudos

Hi Sandip,

Check this [thread|;

if it is helpful. Are you using the right extension for image file?

Regards,

Siva

Former Member
0 Kudos

Hi,

If it's only a logo then why don't you copy it into mimes folder and pick up from there.

Regards,

Murtuza

Former Member
0 Kudos

Hi,

add Image UI Element and set the following properties

· alt

Determines an alternative text that is displayed when the graphic cannot be opened or found.

· source

Determines the Web address (URL) of the graphic through which the UI element receives the data. If you store the image file in your Web Dynpro project under ® src ® mimes ®Components ® , you only have to specify the file name without a path.

example

source=one.jpg // one.jpg is stored in the above specified path

Regards,

ramesh

Former Member
0 Kudos

Hi Sandip,

You want to embed a TextView UI element and an Image UI element in a Group UI element, kindly have a look :-

http://help.sap.com/saphelp_nw70/helpdata/EN/5d/1d353ed106ec2ce10000000a114084/frameset.htm

URL Generation Service :-

http://help.sap.com/saphelp_nw70/helpdata/EN/9e/a073001903c9419592b14c2aa63669/frameset.htm

Hope this is useful.

Regards,

Anagha