labels in table view

Hello,

when using labels in table view we can use the name property to set the “column” name (the header). Unfortunately, this is not i18n compatible.

I understand that the name property cannot be dynamic and the text property has to be dynamic for labels. So what can be done?

Thanks
Patrick

The only solution (today) is to add a header to the form and place buttons (if you want to sort) in that header with the i18n label. I have the same issue but no solution (yet)…

:idea: Excuse me, but you should put your i18n key into the ‘text’ property of your fields for the tableview.

It works well like this

Btw, we named the fields using development language, then put i18n key into the text property of each field. Hope this helps you.

Olivier, you are right as long as you talk about fields.
Labels use the text property for showing their (variable) content. Therefor the text property can’t be used for the header text…

This little problem goes in circles…

All we want is to allow a user to click on a “field” in table view and let a method perform (onAction). Now the problem is this:

  • in table view onAction doesn’t work on fields (not by clicking on it)
  • it does work on labels but these don’t support i18n naming

We don’t care if we have a lable or a field or whatever, but we want to use onAction and i18n. And as far as I see there is no solution for that currently. I remember having asked about onAction on fields in table view and there was some issue to it.

To me this would be the most intuitive behaviour: if a field is set to be non editable, onAction on that field would work just like a button/label.

patrick:

  • in table view onAction doesn’t work on fields (not by clicking on it)

Correct, an editable text_field only fires onAction when pressed enter

patrick:

  • it does work on labels but these don’t support i18n naming

In which way it does not?

patrick:
To me this would be the most intuitive behaviour: if a field is set to be non editable, onAction on that field would work just like a button/label.

It DOES just that, give it a try!

  • you can’t use i18n to name a label column in table view, because for that you need to use the name property of the label, which does not accept “i18n:…”.

  • onAction does NOT work like a button on fields in TABLE VIEW, at least as far as I can figure out.

Again, what we try to accomplish is this:

We want onAction on a field, label or whatever (we don’t care if the thing is editable) in table view and name that column using i18n.

currently not possible. We need an extra property for that.

I reported it more like a feature request anyway :wink: I was asking if anyone had an idea how to overcome the current shortcoming…

The onAction behaviour in tableview(others work already) will work in the Servoy 2.1.1 final release, for the i18n title on labels we need to change(add property) the repository which will be done in Servoy 2.5

Thanks! That changed behaviour of onAction will be very helpful (see also the “double click debate”…).