cancel
Showing results for 
Search instead for 
Did you mean: 

Image not displaying

Former Member
0 Kudos

Hi SDN,

I am new to WebDynpro for java. Statically i could able to display the image by setting the source property of the image="image file name" but nowI wanna display the image in a view when i click a button.So how can i set the source property dynamically .

Thanks in Advance.

Regards

Basha

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

1.Create a attribute with type string and bond it to the image UIelement's source property and alt.

2. in the Action of button click set the attribute's value like

wdContext.currentContextElement().set<attribure>("image.ext");

You have to place the image in the folder

src/mimes/Components/<foler>/

Kind Regards

Mukesh

Former Member
0 Kudos

Thanks Mukesh.

Now it is working fine. But how to display another image when i click on this currnet image. I hope u got me , i mean chaining the images.

Regards

Basha

Former Member
0 Kudos

Hi

I think there is no action for the Image UI Element.

You can do it in the button click also

Create an attribute with type int and in the action of the button increment the count and occording to the count change the image source.

Kind Regards

Mukesh

Former Member
0 Kudos

ok Thank U.

Former Member
0 Kudos

If you want to have a clickable image with an action, you can use a LinkToAction element.

Armin

Former Member
0 Kudos

Thanks a lot Armin, it works fine.

Regards

Basha