cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying colors in a table cell in Web Dynpro for Java application

Former Member
0 Kudos

Hello,

We have a requirement in our Web Dynpro for java project to fill the table cell with color in case of particular values.

How to achieve this?

And also, is there any way that we can change the display color of the text in a table?

Your help is highly appreciated.

Regards

Ram

Accepted Solutions (1)

Accepted Solutions (1)

dao_ha
Active Contributor
0 Kudos

Hi Ram,

Which version of WD are you using?

Check out this blog to see if it works for you

/people/sap.user72/blog/2006/04/25/colourful-table-in-web-dynpro

Hope it helps.

Regards,

Dao

Former Member
0 Kudos

Hi Dao,

Based on the blog I was able to color the table column. My issue was not resolved I am looking for the coloring for the table cell and not the entire column.

I want to color the table cell instead of entire table column, based on the table cell content.

How can we achieve this?

Regards

Ram

former_member185879
Active Contributor
0 Kudos

Hello Ram,

Follow the same concept for table cell also, i dont think there will be a issue.

Create an attribute with the "TextViewSemanticColor" and bind the same to that text view property SemanticColor i.e., for that particular cell. Write coding accordingly to fill the color.

Regards

Nizamudeen SM

dao_ha
Active Contributor
0 Kudos

Hi Ram,

You still didn't mention which version of WD4J you're using.

Anyway, you can use Cell Variants as mentioned by Pankaj. Please refer to the UI docs

https://cw.sdn.sap.com/cw/docs/DOC-111799

You can employ the TextViewSemanticColor as mentioned by Nizamudeen. Check out this thread for related info

Last but not least, it'd be nice (for your end-users) to also implement the legends following the doc provided by Arun.

Regards,

Dao

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

You can acheive this by CellVariant .....

Regards,

Pankaj

p330068
Active Contributor
0 Kudos

Hi Ram,

Please check the [Creating a Color Legend in a Table in Web Dynpro |http://wiki.sdn.sap.com/wiki/display/Snippets/CreatingaColorLegendinaTableinWeb+Dynpro].

Regards

Arun Jaiswal

former_member185879
Active Contributor
0 Kudos

Hello,

We can easily achieve this, you just need to create an attribute for CellDesign in the table node. Loop the table node and check for the values if the values satisfy your condition then set the color for the cell..

The blog which is given is perfect for your requirement.

Revert us for any clarification.

Regards

Nizamudeen SM