cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the Table column headers dynamically in Web Dynpro Java?

Former Member
0 Kudos

Hi,

We have a requirement in our project that the table column header text should change dynamically.

I had included a table UI element in my view in my Web Dynpro java application and it has mulitple rows. Some of the columns should display the current year and next year. That means the column heading should show 2010 and 2011. If you run this application in the year 2011, it should display 2011 and 2012.

How can we achieve this? Thanks in advance!

Regards

Ram

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member214651
Active Contributor
0 Kudos

HI,

Create a context attibute "columnHeaderText" and bind it to the "text" property of the table column header field and set the required value based on the criteria.

wdContext().currentContextElement().setColumnHeaderText("<value>");

Regards,

Poojith MV

junwu
Active Contributor
0 Kudos

the text attribute of column header is bindable, which allow you to set the text dynamically.