Community
Participate
Working Groups
Contrary to a plain SWT example, setHeaderVisible(false) on a SWT Table has no effect in Riena: final Table table = UIControlsFactory.createTable(tableComposite, ...); table.setHeaderVisible(false); The header is not displayed if the controller does not set a header array. But if such an array is set, the header is displayed no matter what the header visibility flag is.
Yep, the design principle is that ridgets override settings in the widgets. From my POV the solution is to use a null array for the header properties when binding to the model. In that case no header should be shown in the table. Closing as WONTFIX (feel free to reopen if you disagree).
It is confusing to a new user (as I am). It also seems strange to me that there is no way of switching the headers visibility other than rebinding the model. However, if this is a design principle of Riena, I can't argue against it. Please consider adding a note to the documentation of createTable() or bindToModel() (or both).
Personally, I think there is no reason to show the header, unless header titles are given with bindToModel(...). Curious: do you have a good use case for needing to toggle the header visibility?
I thought I did when I opened the bug. It looked like the width of the columns differed between tables with headers and those without. But it turned out to be a SWT layout problem. So no, at the moment, I don't have a use case. One the other hand, I can image that someone might hide the headers to save space but display them on MouseOver or if a button is pressed. But that's hypothetical. Having said that, I still find it confusing that a method from the SWT API has no effect, contrary to plain SWT code. It should be documented somewhere.