cancel
Showing results for 
Search instead for 
Did you mean: 

Displying Imaged at Runtime

Former Member
0 Kudos

Hi,

In my project there is a requirement that in backend database (oracle) we have stored the image files of all the employees in a company . The number of images will be in thousands . At runtime i have to display them dynamically in webdynpro screen .

Can anybody tell me how to achieve this .

Thanks a lot .

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Refer this blog /people/anilkumar.vippagunta2/blog/2007/02/20/reading-and-writing-images-from-sqlserver-in-webdynpro

Regards

Ayyapparaj

Former Member
0 Kudos

Hi Ayyapparaj,

Thanks a lot for the reply .

Answers (2)

Answers (2)

former_member214651
Active Contributor
0 Kudos

Hi Jain,

If the Image has to be displayed on the webdynpro then get the path from the table field and store it in a Variable.

Declare an UI element of type IFrame in ur Webdynpro view and set the source to the Context Variable to which the path Variable is set.

Do u have a requirement to display all the Images present in the Database on ur WebDynpro Screen at a time????

Hope this helps u.

Regards,

Poojith MV

Former Member
0 Kudos

Hi Jain

First of all create a separate column in your backend to store the image name along with extension{Suppose imgName}

1. Copy your images into <Project Name>\src\mimes\Components\<your component>\

2. Create a Node Attribute "Image" with cardinality Property as 1..1

2)a Create 2 value attrubutes

i) imageAlt [Calculated Property as TRUE]

ii) imageSource [Calculated Property as TRUE]

now in your NWDS do the following

2)b Bind the imageAlt attribute to ImageUIElement's alt

2)c Bind the imageSource attribute to ImageUIElement's source

tmpImageName=wdContext.CurrentContextElement.getimgName[this statement retrieves the image name from back end

tmpImgaeAlt=wdContext.CurrentContextElement.getEmpName[this statement retrieves the name from back end where in

we use this name as the tooltip for the image]

wdContext.currentImageElement.setImageSource(tmpImageName);

wdContext.currentImageElement.setImageAlt(tmpImgaeAlt);

this will increase db retrival speed.

hope this will solve your purpose

Best Regards

Chaitanya.A

Former Member
0 Kudos

Hi Chaitanya,

Thanks a lot for the reply . but suppose in a big MNC there will be lakhs of employees . So in this case if i have to display the photpgraph of empoyees in portal , do i have to take all the one lakh images and store it in this folder mentioned by you .

<Project Name>\src\mimes\Components\<your component>\

Is there any alternate way by which the all images will be in the backend only and from there we will retrive it during runtime .

Thanks a lot .