TabPanel - Counter on tab text

I would like to have a counter on the tabs of tabpanels.

[attachment=0]tab_counter.png[/attachment]

The text ist i18n. The Reference/Locale text is something like this:
Products (%%order_order_items.maxRecordIndex%%)

The problem is, that the counter is not updating while selecting different records.
How do I get the counter updated e.g. onRecordSelection?

Best regards

tab_counter.png

Hi
I am doing something similar.
I have this text

Services (%%client_to_contract_current.count_current%% Current)

on a tab, with ‘count_current’ being an aggregate on the related table
and I do

databaseManager.recalculate(client_to_contract);

in the ‘onRecordSelection’
Try something like that ;-)

Thank you @rafig for reply.

I tired your suggestion with an aggregation ‘counter’ on the related table and the databaseManager.recalculate(order_order_items) function in my onRecordSelection() method.
But in NG-Client it doesn’t work. The counter always stuck in the first number of count.

Best regards

What about setting the text property of the tab?

elements.your_element_name.setTabTextAt(tab_number, 'Some text here');

Hi Christian,

I cannot do this with the TabPanel - WebComponent (bootstrapcomponents-tabpanel)!

For that I can create/add the tabs to the tabpanel by function, but not only the tab text.
In my case I have to set the tabs property on the form because of needed relations setting.

Best regards

tgs:
Thank you @rafig for reply.

I tired your suggestion with an aggregation ‘counter’ on the related table and the databaseManager.recalculate(order_order_items) function in my onRecordSelection() method.
But in NG-Client it doesn’t work. The counter always stuck in the first number of count.

Best regards

Not sure why, but maybe add an ‘application.updateUI();’ as well??
What I’m doing works for me in NG…

Just updating my previous post, but it is now NOT working :(
Not sure why, maybe because I have updated to latest version of Servoy, 8.4, along with associated web components update, or something else.

@Thomas, did you find a working solution?

If I manage to fix, I will post again…

I’m currently also on Servoy 8.4 and have always no working solution.