String id1 = "type";
String label1 = "converter_type";
ModelModifier modifier1 = new DefaultModelModifier() {
public Object getModelValue(Object model) throws Exception {
//PipeComponentData componentData = (PipeComponentData) model;
ConverterListItem componentImpl = (ConverterListItem) model;
//if(!componentData.getImplementation().implementationExists()) {
// Assume component implementation exists
/*if(!componentImpl.implementationExists()) {
// If implementation is not there, show error...
return "!!! Class not found: "
+ componentImpl.getClassName() + " !!!";
} else {
*/
//PipeComponentIF impl = componentImpl.getInstance();
//return impl.getName();
return componentImpl.getConverter().getName();
//}
}
public void setModelValue(Object model, Object value) throws Exception {
// We don't want to change it, we just want to see it
}
};
// Just want to show it...
UneditingEditor editor1 = new UneditingEditor();
FieldInfo typeFieldInfo = new FieldInfo(id1, label1, modifier1, editor1);
converterFieldInfo.addColumn(typeFieldInfo);
}
// TODO: Converter component's Edit button should be disabled if the Converter does not
// implement GUIConfigurationIF
{
// ---------------
// Edit link field
// ---------------
String id2 = "edit";
String label2 = "edit";
ModelModifier modifier2 = new DefaultModelModifier() {
public Object getModelValue(Object model) throws Exception {
ConverterListItem componentData = (ConverterListItem) model;
HashMap m = new HashMap();
m.put(COMPONENT_ID, componentData.getConverter().getID());
m.put(DATA_ID, componentData.getConverterData().getId().toString());
return m;
}
public void setModelValue(Object model, Object value) throws Exception {