on 05-09-2008 7:29 AM
I am getting several images as byte[] during a running WDP application.
For displaying them in a view, I want to save them as jpg files under the internal
folder /src/mimes/components under the application file structure.
How to make it happen ?
I tried different WDP classes like WDResourceFactory etc. But I can't understand where it is storing and how to retrieve it afterwards.
Thanks for the help,
Prasad Nutalapati
Hi,
Why do you need to store in that place. You can directly use the byte [] to show the image using the following code.
IWDResource cache = WDResourceFactory.createCachedResource(wdContext.nodeLeaveAssessmentMap().currentLeaveAssessmentMapElement().getEmpImage(),fileName,WDWebResourceType.JPG_IMAGE);
// EmpImage is of type byte [].
// filename is any file name of String type.
wdContext.nodeImage().currentImageElement().setImageSrc(cache.getUrl(0));
// ImageSrc is the attribute mapped to source property of the image UI in the view.
Hope this helps.
thanks & regards,
Manoj
Edited by: Manoj Kumar on May 9, 2008 12:33 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Manoj:
Thanks for the help.
I forgot to mention that I want to conserve the backend connection resources.
It is MDM Server. Those images pretty much are constant for every user.
They are about 100 or more in number.
So I can use the images in the dynamic fashion as you suggested.
Thanks,
Prasad
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.