Skip to Content
author's profile photo Former Member
Former Member

Calling Images regarding BAPI' Output data

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 28, 2006 at 04:48 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 28, 2006 at 05:00 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.