if (handler.getCurrentProviderTypeUid() != null) {
type = DataDisplayerServices.lookup().getDataProviderManager().getProviderTypeByUid(handler.getCurrentProviderTypeUid());
}
if (type != null) {
// Provider type selected, show type editor page.
DataProviderEditor editor = UIBeanLocator.lookup().getEditor(type);
DataProvider dataProvider = editor.getDataProvider();
if (dataProvider == null) {
DataProviderManager dataProviderManager = DataProviderServices.lookup().getDataProviderManager();
dataProvider = dataProviderManager.createDataProvider();
dataProvider.setDataLoader(type.createDataLoader());
editor.setDataProvider(dataProvider);
}
setAttribute("error", Boolean.valueOf(handler.getFieldErrors().size() > 0));
setAttribute("value", handler.getDescriptions());
renderFragment("outputProviderName");
setAttribute("componentPath", editor.getName());
renderFragment("outputEditProviderPage");
} else {
renderFragment("outputCancelButtonNoTypeSelected");
}
if (type != null) renderFragment("outputButtons");