cancel
Showing results for 
Search instead for 
Did you mean: 

How to Insert Image From Desktop?

Former Member
0 Kudos

I created image object and I try to attach my desktop image to it.

However, it only allows me to select from the context.

Is there any way that I can insert the image from my local desktop? E.g., "myimage.jpg".

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

1)in ur view add image ui element.

2)in the context of ur view create a value node Myimage and in that create two value attr v_alt and v_src

for both the value attr, in its properties choose "calculated" and set to true.This will create setter and getter methods for the value attr in ur code automatically.

3)set the cardinality of Myimage to 1:1

4)select the image ui element-properties-set the alt property to v_alt and source property to v_src.

5) in the implementation of the view

in the getter method of image source

return "c://myimage.jpg"";

Regards

Jay

Answers (3)

Answers (3)

former_member185086
Active Contributor
0 Kudos

Hi

Webdynpro frame work provide us good utility to put the different resource in some specific location and the reason is no further dependency (In your case desktop)

1.For Image that location is <project-name>/src/mimes/components/<component name >(if u r using more than one component )copy the image here

2. Select the source property of Image UI element and then Browse the component Image ,It will display all those images which u keep there .select one it immediately come into view .

Best Regards

Satish Kumar

chander_kararia4
Contributor
0 Kudos

Hello Shreya,

Do the following steps:

1. Insert Image UI element to the view.

2. In the property Tab, you will find the "Source" property of the image UI element.

3. There if you wish, you can type the full path of the image from your local system (ex. C:\Documents and Settings\chander\Desktop\xx.jpg) or you may map it to the context & set the context value as your desired path during coding the application.

Important:- Remember if you are using the DC, you need to put the same image under your project's following path - "/src/mimes/Components/XXXX/"

It is mandatory or else after deployment you may not find the image.

- One more thing, mention the full path & correct image name with extension. (image name is case sensitive)

Regards

Chander Kararia

# Please close the thread once get the correct answer. Give rewards for answers.

Edited by: Chander Kararia on Feb 27, 2009 10:44 AM

Former Member
0 Kudos

hi

check this link