cancel
Showing results for 
Search instead for 
Did you mean: 

how to display a image in webdynpro view using a bytearry

Former Member
0 Kudos

Hi Frndz..

How to display an image in a view using webdynpro java ..i have bytearry object in context ..like

*byte[] img = wdContext.nodeYywwwdataImport_Input().nodeOutput().nodeOutMime().currentOutMimeElement().getLine();*_

by using this i need to show image in view..

Kindly help me ....

Thankas in Advance

Regards

Rajesh

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

yes

Former Member
0 Kudos

Hi,

byte[] img = wdContext.nodeYywwwdata_Import_Input().nodeOutput().nodeOutMime().currentOutMimeElement().getLine();

use this code to create resource and you need to set this value to the context created to display the image suppose in the image UI and set the source property with this attribute:-

IWDResource res=WDResourceFactory.createCachedResource(b,"MyImage",WDWebResourceType.JPG_IMAGE);

IPrivateAppView.IVn_ImageTabElement imageEle=wdContext.createVn_ImageTabElement();

imageEle .setVa_Name(res.toString());

wdContext.nodeVn_ImageTab().addElement(imageEle);

Hope this may help you.

Deepak

siddharth_jain
Active Contributor
0 Kudos

Hi,

Check the following Blog:

Siddharth

Former Member
0 Kudos

Hi,

Use the following code



byte[] img = wdContext.nodeYywwwdata_Import_Input().nodeOutput().nodeOutMime().currentOutMimeElement().getLine();
IWDResource res=WDResourceFactory.createCachedResource(img,"Image",WDWebResourceType.JPG_IMAGE);
String url = res.getUrl(WDFileDownloadBehaviour.OPEN_INPLACE.ordinal());

set this url to the attribute that is bound to your Image Ui Element

Regards

Ayyapparaj

Former Member
0 Kudos

Hi Ayyapa..

Thank u for ur prompt reply,i did as per ur code ..but no use yaar..i didn't get any output as per my requirement.

if u have any another idea please share with me.

Thanks in Advance.

Regards

Rajesh