on 06-19-2007 5:53 AM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
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
hi,
Give the extension in Upper case... So tht it works...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.