table reinit scrollbars problem [message #1019198] |
Fri, 15 March 2013 08:20 |
Sascha Smoo Messages: 56 Registered: November 2012 |
Member |
|
|
Hello,
I've got a problem with my nattable implementation.
public class YearlyFactorTable extends NatTable {
public YearlyFactorTable(Composite parent) {
super(parent, false);
init();
}
private void init() {
setConfigRegistry(configRegistry);
dataGrid = new FactorDataGridLayer(configRegistry, structureElement,
globalFactorsMode, editMode, AdminMessages.YEAR_FAC_TAB_NAME);
setLayer(dataGrid);
addCustomSelectionBehaviour();
// configure table
configure();
}
}
The code you see is a snippet from a class extending the super class NatTable. This init method will be called within the constructor of the extending class and will be called again if the table input changes.
Now the problem starts after reinit of the table. Sometimes after reinit the scrollsbars of the table do not work anymore. They are still visible, but scrolling does not influence the table anymore. Tried to refresh the parent composite but nothing seems to help. If I dispose the table and build it up again it works, but I don't want to dispose the table everytime the input changes. Any ideas?
Greetings,
Sascha
|
|
|
|
Re: table reinit scrollbars problem [message #1019209 is a reply to message #1019204] |
Fri, 15 March 2013 08:44 |
Sascha Smoo Messages: 56 Registered: November 2012 |
Member |
|
|
Hello Dirk,
I'm extending the NatTable class because I have some other special helper methods I need in this class. And yes, I'm trying to exchange the whole table because the number of columns/rows changes with the new input. Let me explain my usecase to you. I've got a table showing year based data, with the year selected by a swt combobox outside the table. So if the year changes, the input of the shown table has to change too. The amount and type of shown data changes from year to year.
Greetings,
Sascha
[Updated on: Fri, 15 March 2013 08:50] Report message to a moderator
|
|
|
|
|
Re: table reinit scrollbars problem [message #1021622 is a reply to message #1019221] |
Wed, 20 March 2013 12:07 |
Sascha Smoo Messages: 56 Registered: November 2012 |
Member |
|
|
Dirk, let me ask one last question. I've managed to update my table input without recreating the layer! Just manipulating the data list in the gridlayer now and refreshing the table afterwards. This works fine so far, but there is one problem left. The cell labels won't be updated for "new" cells. I have a class extending the AbstractOverrider to set labels to the cells and set special configurations to every cell. But it seems the dynamic input mechanism does not update the cell labels at all. Any ideas on this?
Greetings,
Sascha
[Updated on: Wed, 20 March 2013 12:08] Report message to a moderator
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04322 seconds