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

Method setStyleForCell doesnt work in HTMLB-Element - NW2004

Hello all together,

I want to implement an IView which display me some information using a HTMLB-Table Element.

In some cases I want to change the color of a row. For that I want to use the method: setStyleForCell(int row, int col, TableCellStyle style)

e.g.:

operationsTable.setStyleForCell(1,1,TableCellStyle.NEGATIVE); operationsTable.setStyleForCell(2,2,TableCellStyle.BADVALUE_DARK);

operationsTable.setStyleForCell(3,3,TableCellStyle.CRITICALVALUE_DARK);

but nothing happens if I start the IView. Each line looks equal.

I don't found some information about this behavior and the standard class documentation doesn't help me.

What can I do?

Thanks in advance.

With best regards,

Stephan

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 20, 2008 at 09:58 AM

    Hi,

    Did you add this in JSP? May be this import is missing.

    <%@ page

    import="com.sapportals.htmlb.enum.TableCellStyle"%>

    Regards,

    Harini S

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 20, 2008 at 10:55 AM

    Hi,

    I implement the Application using the Netweaver Developer Studio for a SAP Portal Release 6.0.

    There I imported the element, as follows:

    // import needed classes

    import com.sapportals.htmlb.enum.TableCellStyle;

    //

    Now I can't say if this is equivalent to your answer. Is it?

    regards Stephan

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Stephan,

      Can you explain where are you writing the piece of code in the cell Renderer or inside a jsp?

      If it is inside the cellRenderer to my knowledge it will not work.

      You need to set the style inside the jsp.

      Thanks,

      Padmaja

  • author's profile photo Former Member
    Former Member
    Posted on May 20, 2008 at 01:25 PM

    Hi,

    I got the solution. I tried to use a method to an object and after that I copied the object to display the values. A beginner failure, isn't it.

    Thanks a lot and have a nice day.

    Stephan

    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.