Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Update Table Header Text after Smart field value Change
Update Table Header Text after Smart field value Change [message #1820943] Sun, 02 February 2020 21:07 Go to next message
Oueslati Anis is currently offline Oueslati AnisFriend
Messages: 128
Registered: June 2014
Location: Paris
Senior Member
Hello All,
I need to change the table header text based on a value change of a smart field.
How can I access the header texts and update the UI after the change event.
Thanks
Re: Update Table Header Text after Smart field value Change [message #1820950 is a reply to message #1820943] Mon, 03 February 2020 08:23 Go to previous messageGo to next message
Andre Wegmueller is currently offline Andre WegmuellerFriend
Messages: 204
Registered: September 2012
Location: Baden-Dättwil, Switzerla...
Senior Member
For some reason this is quite complicated, but this will work:

Table table = getTableField().getTable();
NameColumn column = table.getNameColumn();
((HeaderCell) column.getHeaderCell()).setText("Text from SmartField");
TableEvent event = new TableEvent(table, TableEvent.TYPE_COLUMN_HEADERS_UPDATED);
event.setColumns(table.getColumns());
table.fireTableEventInternal(event);


By sending the event COLUMN_HEADERS_UPDATED the UI will re-render the table-header (and only the table-header).

Cheers,
André



Eclipse Scout Homepage | Documentation | GitHub
Re: Update Table Header Text after Smart field value Change [message #1820980 is a reply to message #1820950] Mon, 03 February 2020 19:31 Go to previous message
Oueslati Anis is currently offline Oueslati AnisFriend
Messages: 128
Registered: June 2014
Location: Paris
Senior Member
That is perfect, thanks
:)

[Updated on: Mon, 03 February 2020 19:32]

Report message to a moderator

Previous Topic:Uploading all files in a directory tree in Scout 9
Next Topic:Aggregating columns in a table according to a different algorithm than the one built-in
Goto Forum:
  


Current Time: Thu Apr 25 19:32:18 GMT 2024

Powered by FUDForum. Page generated in 0.02639 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top