}
};
SelectEditor editor = new SelectEditor();
for(int i = 0; i < CHARSETS.length; i++)
editor.addOption(new DefaultSelectOption(CHARSETS[i], CHARSETS[i]));
//and finally create the configurationObject
FieldInfo fieldInfo = new FieldInfo(id, id, modifier, editor);
//add the configuration to the context for usage in the http-requests.
addField(id, fieldInfo);
}
{
//set unique id and description labelkey
String id = WRITE_TYPE_ATTR;
ModelModifier modifier = new DefaultModelModifier() {
public Object getModelValue(Object model) throws Exception {
String value = ((LocalFileWriteConverter) model).getData().getAttribute(
WRITE_TYPE_ATTR);
return value != null ? value : WRITE_TYPE_ALWAYS_OVERWRITE;
}
public void setModelValue(Object model, Object value) throws Exception {
((LocalFileWriteConverter) model).getData().setAttribute(
WRITE_TYPE_ATTR,
(String) value);
}
};
SelectEditor editor = new SelectEditor();
editor.addOption(new DefaultSelectOption(WRITE_TYPE_ALWAYS_OVERWRITE, WRITE_TYPE_ALWAYS_OVERWRITE));
editor.addOption(new DefaultSelectOption(WRITE_TYPE_ALWAYS_APPEND, WRITE_TYPE_ALWAYS_APPEND));
editor.addOption(new DefaultSelectOption(WRITE_TYPE_ITERATION_START_OVERWRITE, WRITE_TYPE_ITERATION_START_OVERWRITE));
//and finally create the configurationObject
FieldInfo fieldInfo = new FieldInfo(id, id, modifier, editor);
//add the configuration to the context for usage in the http-requests.