cancel
Showing results for 
Search instead for 
Did you mean: 

How to Add Image to Webdynpro for java application

Former Member
0 Kudos

Hi Friends,

I wanted to insert an image on the first view of webdynpro application which I am creating in Newweaver.

I tried several ways available in the forums but unsuccessfull.

Please guide.

Thanks

Nitesh.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

You can use Image UIElement to insert image in webdynpro application.

You have to place the image in the folder

src/mimes/Components/<foler>/ and keep in mind to provide exact name with extension in source property of image UIelement.

I hope it would resolve your problem.

Best Regards,

Pankaj Sharma

Former Member
0 Kudos

Hi Pankaj ,

The reply was useful .The image is displayed in the Netweaver but when we deploy and test It is just diplaying the image icon . I pasted the image in the mentioned folder and also provided the same path in the image souce property with extension.

Regards

Nitesh

former_member197348
Active Contributor
0 Kudos

Hi Nitesh,

Simply give the file name e.g. image.JPG. Give JPEG or JPG files only. Other type of files are not supported

Regards,

Siva

Former Member
0 Kudos

Shiva,

I have given the image name as image.jpg and it is coming in the design time but when I am testing it is not displayed.

Can it be browser issue ?? I am using Mozilla firefox to test the application.

Thanks

Nitesh

Former Member
0 Kudos

Hi,

click on the "Navigator" and find the respective project and navigate to the " comp\src\mimes\Components\<ur component name>" you can see all the images ,

just check once the image name your using is matches or not ?

Regards,

ramesh

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

If you have the image in image server and got a URL for that , then you can call that using an IFRAME UI.

You can use the below code in wdDoModifyView

IWDIFrame input = (IWDIFrame)view.createElement(IWDIFrame.class,"ScannedFile_Iframe");

input.setSource(wdContext.currentContextElement().get_Url());

input.setLifeCycle(WDIFrameLifeCycle.UIELEMENT);

input.setWidth("460");

input.setHeight("700");

If you have a local image , you can add it to the mimes folder under SRC folder of your project and load it with an Image UI .

Thanks and regards,

Tony Isaac.

former_member185086
Active Contributor
0 Kudos

Hi

Sinply put your image inside MIMI folder like : D:\workspace\testDC\_comp\src\mimes\Components\com.nypd.article.ArticleComp and specify name of image at context.

BR

Satish Kumar

former_member201361
Active Contributor
0 Kudos

Hi,

Check this link:

[https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/40d983b4-bfc2-2b10-858f-b717e194f2c1]

BR