cancel
Showing results for 
Search instead for 
Did you mean: 

Populate Icon on UI Table

Former Member
0 Kudos

Hello,

I need to implement ICONs on a table. I am using a data structure for the table; so what should be the Type i need to specify for the Icon Column?. Please help me by providing simple examples or links...

Thanks

Vinod V

[Helps will be rewarded!]

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Vinod

First copy all your images into "project/src/mimes/components/<packagename>"

1) First create a new column for image and insert Child "Image" UI Element

2) Create a Context in a view in which you are using Image UI Element

3) Value Node

Name : Image

Cardidality : 1..1

4) create 2 Value Attributes

4)a ImageAlt (Calculate property - true)

4)b ImageSrc (Calculate property - true)

5)Bind the properties of Image

alt - Image.ImageAlt

source - Image.ImageSrc

6) in getImageSrc()

{

//according to your condition use your image

retrun "XX.gif"

}

7) in getImageAlt()

{

return "Image Not Available"

}

Case 2 :

1) Add a new String attribute to your existing context

2) Right click on your table in RootUIElememntContainer

3) Edit Sturcture Binding

4) Select the context which you modified , Select next

5) in the next step for the newly created attribute select imageUIElement as type

If you want to use that in wdDoinit()

bind the two string value attributes to alt and source properties of ImageUIElement and write the following code

in doinit

wdContext.currentContextElement.set<src>("img1.gif") ;

wdContext.currentContextElement.set<alt>("Image not found") ;

Best Regards

Chaitanya.A