cancel
Showing results for 
Search instead for 
Did you mean: 

Calling Images regarding BAPI' Output data

Former Member
0 Kudos

Hi Guys,

I am using webdynpro java as SPS 16.I am trying to call images at runtime.I have three images and i added all images in my src folders.In my application i created one node and one attribute, finally i binded with my table coloum.Here i have faced problem that i have three images that are showing depending on my output of the tables row.That means if one of the row is empty it shows red image if it is partially then it shows yellow.If row contains all the values then it will show green.

Please anyone help me how to write the coding and where i have to initialise.

Thanks.

John

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Let "Rows" be the table's data source node. Add a calculated attribute "StatusIcon" (type=string) to node "Rows". In the generated get-method, write

String getRowsStatusIcon(IRowsElement element)
{
  if (empty(element)) return "red.gif";
  else if (partial(element)) return "yellow.gif";
  else return "green.gif";
}

Put your images in the folder src/mimes/components/<component-name>

If you use a Caption or Image as table cell editor, bind the imageSource property to attribute "StatusIcon" or add an additional column with a suitable editor.

Armin

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Armin,

Thanks for ur reply.I am not as much familiar with web dynpro.So could u please explain step by step.

Because i executed bapi and i create one Value node and one attribute inside the table bapi's node.

Where i can create others.

Please explain me step by step.

Thanks.