cancel
Showing results for 
Search instead for 
Did you mean: 

htmlb:tableView: change header color and add tooltip

daniel_humberg
Contributor
0 Kudos

I used to use a htmlb:tableView with an iterator, and in get_column_definitions, i wrote HTML into the "ls_coldef-title" attribute. Therefore I managed to add a tooltip to the header-row and to change the font-color of the column-definition.

With the latest SP, it is not possible to write HTML into that attribute. HTML-Tags will just be interpreted as normal text.

Is there an alternative way to do that?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Daniel,

Have you tried to use the "title" parameter with something like this:

<span style="color:XXXXXX">col_name</SPAN>

Check the blog that talks about putting an image on the header. And then instead of putting an image put the code that I am giving you..

Regards

Ariel

Former Member
0 Kudos

Thanks for the shout out to my weblog )

However in SP45 and higher the image in the header doesn't work anymore - SAP started to fill some holes I think with the SP. (

daniel_humberg
Contributor
0 Kudos

Craig, the problem with your solution is that it won't work with the latest SPs (45+).

So I guess there's nothing you can do anymore to add HTML-stuff to column-headers, right?

maximilian_schaufler
Active Contributor
0 Kudos

Craig,

I have not tried your image in column-header example ... but why does it not work anymore in SP45?

All occurences of pre-rendered HTML-output in my application behave the same in SP45 ... curios if there is a special case I might run into soon?

Max

Former Member
0 Kudos

Daniel,

Yep my weblog shows that as of SP45 it doesn't work anymore.

Max,

SAP seems to have closed the holes in their TAG's that allowed us to do that as of SP45. Which means that we'll have to wait for them to add the new attributes such as the Image tage to the column definitions.

Or we'll have to play around alot more have you tried using the & lt and all that for the HTML to add it in don't tell though )

maximilian_schaufler
Active Contributor
0 Kudos

Craig, found the problem:

You should not use the double quotes (like src="..."), replace them with single quotes and change your concatenate separators to `.

CONCATENATE
   `<img src='`
   myText
   `' border='0'> Status`
INTO myText.

Can't tell what they changed, didn't debug or so ...

But I still have tons of concatenated strings with double quotes in my render_cell_start method - got loads of javascript in there, so I need the double quotes to be different from the single ones ... working alright there.

If I come across some more information on this I will keep you updated.

Max

Former Member
0 Kudos

Not bad! You found that pretty quick. What they changed is small and why it effects I'm baffeled still but the ' quotes work as well as the ` but they both can give you problems so I didn't bother to update the weblog for that.

The other solution is to encode everything which I'm still testing but hasn't given me too many problems yet.

Answers (0)