将TableViewer数据保存到属性文件中

时间:2012-10-27 09:48:39

标签: java swt jface tableviewer

如何在重新打开TableViewer时将TableViewer数据保存到属性文件中并填充相同的数据?

private void buildWellBoreDate(
            NearWellBoreModellingData nearWellBoreModellingData, Properties p) {
            List<DownholeComplexityTable> downhole=modelProviderDownholeComplexityTable.INSTANCE.getDownholeComplexityTables();
            for(int i=0;i<downhole.size();i++){
                p.setProperty("row"+i+"."+"NameofZones",((DownholeComplexityTable)downhole).getNameOfZones());
            }

            String fieldNameWell = nearWellBoreModellingData.getFieldNameWell();
            if (fieldNameWell != null) {
                p.setProperty(KEY_FIELDNAME_NEARWELL, fieldNameWell);
            }

while trying this way I am able to save the textfield data but getting error for the table java.lang.ClassCastException:

0 个答案:

没有答案
相关问题