NaTable Validation [message #1456687] |
Thu, 30 October 2014 12:17  |
Eclipse User |
|
|
|
Based on particaluar value entered in column ,the NatTabel row needs to made non editable or editable.
How can this validation check implemented in effectively NatTable
|
|
|
|
|
|
|
|
Re: NaTable Validation [message #1514247 is a reply to message #1460192] |
Wed, 17 December 2014 01:19   |
Eclipse User |
|
|
|
I have added some ComboBox configurations to my NatTabel as follows :
ComboBoxPainter comboBoxPainter = new ComboBoxPainter();
comboBoxCellEditor = new ComboBoxEditor(objType, propName);
if (comboBoxLabelName != null) {
configRegistry.registerConfigAttribute(
EditConfigAttributes.CELL_EDITOR, comboBoxCellEditor,
DisplayMode.EDIT, comboBoxLabelName);
configRegistry.registerConfigAttribute(
CellConfigAttributes.CELL_PAINTER, comboBoxPainter,
DisplayMode.NORMAL, comboBoxLabelName);
}
I also need to add some custom labels to the tabel,and I have implemented it through accmulateConfigLabel:
colLabelAccumulator = new ColumnOverrideLabelAccumulator(bodyDataLayer){
@Override
public void accumulateConfigLabels(LabelStack configLabels,
int columnPosition, int rowPosition) {
CoverSheetRowData rowObject = (CoverSheetRowData) ((GlazedListsDataProvider) gridLayer.getBodyDataProvider)).getRowObject(rowPosition);
if ((columnPropertyAccessor.getColumnIndex(PartViewUICommon.isNoticeReqIdCol) == columnPosition)) configLabels.addLabel(CoverSheetNatTable.EDITABLE_LABEL);}
else {configLabels .addLabel(CoverSheetNatTable.NONEDITABLE_LABEL);
}
}
}
};
All the columns of NatTabel are registered through:
colLabelAccumulator.registerColumnOverrides(colIndx, colNameLabel);
bodyDataLayer.setConfigLabelAccumulator(colLabelAccumulator);
This overwrites the ComboBox editors on my NatTabel.I need to have both the ComboBox and the custom label.
What is the correct way to apply both on the NatTabel.
|
|
|
|
|
Re: NaTable Validation [message #1515022 is a reply to message #1514844] |
Wed, 17 December 2014 15:15  |
Eclipse User |
|
|
|
No. But you simply need to create an instance of AggregrateConfigLabelAccumulator and add your other IConfigLabelAccumulators to it. Then register the AggregrateConfigLabelAccumulator instance as label accumulator.
|
|
|
Powered by
FUDForum. Page generated in 0.03944 seconds