cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the image from mime to image ui element?

Former Member
0 Kudos

Hi Experts!

I am new to web dynpro JAVA. I want to get the image from mime repository onto my image ui element. I tried all the possible ways to get it but it does not show the image on my view. Is there any specific format required? What is the procedure to get the image in image ui element? Please reply asap. Its urgent!

Cheers,

Darshna.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

First Keep your image in Sample.jpg in c:\program files\<installation directory>\src\mimes\components\<ur component name>\Sample.jpg

U can display .JPG,.BMP,.GIF

1)Insert Image UI element

2)create an attribute IMAGE and set calculated=True in attribute properties

3)It generate two methods getImage() and setImage() methods

4)Bind the image attribute to image UI element

5)write the following coding in

getImage()

{

return "sample.jpg"

}

6)u have to specify the Image name correctly if it is in uppercase or lowercase

Otherwise,

Insert Image UI element then click image properties---->Source=Sample.jpg

Directly u type the image name Sample.jpg in that source and press Enter,automatically it will bind with tickmark. Then deploy it works...

Regards,

Suresh.T

Former Member
0 Kudos

Hi Suresh,

Where exactly should I paste the image. I followed the same path but its not working. I am putting the correct name in source.

Cheers,

Darshna.

Former Member
0 Kudos

Hi Darsana,

Are you trying to get the image from a 'mime repository' or the mime folder in the project structure?

regards,

Shyam.

Former Member
0 Kudos

Hi Darshan,

In mimes u will have a folder with ur component name say for example Comp.ExComp

Paste it inside that... ok

Urs GS

Former Member
0 Kudos

Hi Shyam,

I have pasted it in SRC folder. Mimees and then components. Am I right?..Or is ther any other way to get it.

Cheers,

Darshna.

Former Member
0 Kudos

Hi,

After pasting the image close your NWDS and open again then try,check whether your image is pasted or not by clicking Webdynpro explorer->ur project>src->mimes->components><ur component name>->Sample.jpg

U paste your image in

src\mimes\components\<ur package.component name>\Sample.jpg

|

|------>your package.compnent name folder inside this u paste the image...........

otherwise give extension in uppercase.JPG and also try another method using attribute

Former Member
0 Kudos

Hi Darshna,

In your first post you had mentioned that you want to fetch the image from a 'Mime Repository'. Did you mean that you want to get the image from a KM repository?

Instead, if you want to get the image from the project structure of ur application, do the following steps:

switch to 'Navigator' view.

Paste the image under src->mimes->components-><your component>

In the source property of the image UI Element, specify the name of the image with extension.

This should work.

regards,

Shyam.

Former Member
0 Kudos

Hi All,

I am still not getting the image. Is there any version problem? Like I am using NDS version 7.0.10 So is there any other setting required?

Plz help me!!

Cheers,

Darshna.

Former Member
0 Kudos

Hi,

Nothing is needed..its not version problem....just u create an .bmp image in Paint then try this....send your mail ID...i will send the sample application already i have.........

Former Member
0 Kudos

Hi Suresh,

My email id is darshna.thole@gmail.com

Cheers,

Darshna.

Former Member
0 Kudos

Hi,

i sent that application to your ID...u check and tell me....

Former Member
0 Kudos

Hi,

Even after palcing it in the right folder if you are not getting the image then their is a problem with your NDS.

Uninstall and reinstall the NDS.

Former Member
0 Kudos

Hi Suresh,

Thanks alot!!

I checked your application. Even in your application its not showing anythng in the view. But when i run it i could see the image. Check your rewards..:)

Thanks again!!

Cheers,

Darshna.

Former Member
0 Kudos

Hi,

Thanks for your points....

May b some problem in your NWDS, so do the following steps it will work properly...

First Close your NWDS.

1) Go to NWDS installation directory, take a backup of your projects from the workspace and delete the .metadata folder from the workspace.

2) Then open the NDS, a new .metadata folder will be created and now you can try opening the NWDS it will open without error

3)Sometimes when your metadata of the NWDS is corrupted then your NWDS will not function properly.

4)Restart ur machine,then its works properly

Regards,

Suresh.T

Answers (2)

Answers (2)

Former Member
0 Kudos

hi,

Give the extension in Upper case... So tht it works...

Former Member
0 Kudos

hi Darshan

You have to specify the image name along with the extension in the property of UI element....(source and alt) Try this...

Urs GS

Former Member
0 Kudos

Hi Sathish,

I tried the same but it just displays the name of the image and cross sign on the view. I tried .gif and .jpg image. Plz help!!

Cheers,

Darshna.

Former Member
0 Kudos

Hi,

Then u have to set the image at proper place...have u checked whether u have place correct image and give correct name....possibe change the image and then try and tell....

Former Member
0 Kudos

Hi,

Check this blog:

/people/bobu.georgeputheeckal/blog/2006/12/22/getting-an-image-from-km-documents-to-be-used-in-web-dynpro

regards,

Shyam.